Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard WASM

WASM clone of the LNbits Dashboard Python extension by Ben Arc. Manage named public dashboards containing links and Material icons. This extension uses its own storage; it does not modify or import the Python extension's existing data.

Features

  • Original Quasar layout: Dashboards and Items tables, search, sorting, pagination, dashboard filter, edit dialogs and the original icon picker.
  • Public icon grid with tooltips, QR sharing and a copyable public URL.
  • CSV export of the current table page, matching the original Dashboard.
  • LNbits theme colors, dark mode and live theme changes through the parent bridge.
  • Create, rename and delete dashboards; create, edit, move and delete items.
  • Paginated public grids, including an empty-dashboard state.

Public URLs are /ext/dashboardwasm/<dashboard-id>. Anyone who has the URL can read that dashboard's name and links. Do not put secrets into public links.

Security and permissions

The component requests only ext.storage.read, ext.storage.write, and ext.storage.read_public. It imports no HTTP, wallet, payment, scheduler or cross-extension API. Link destinations are never fetched by the server.

Private operations use the host's owner-scoped storage. Moving an item validates both its current ownership and the destination dashboard. Public reads use explicit field policies and a dashboard-scoped item query without an owner context. Public callers have no mutation route.

Links accept HTTP(S) URLs without embedded credentials, or local paths beginning with a single /. Script/data/file schemes, protocol-relative URLs, backslashes and control characters are rejected. Material icon names are validated; remote image icons and SVG instructions are not accepted. The UI renders names as text and uses the existing parent navigation confirmation for opening links. CSV export uses the parent bridge's confirmation, limits and formula escaping.

Deleting a dashboard marks it deleted in one write, disabling subsequent public reads without needing a multi-row transaction. Its items stay in the owner's Items list and can be deleted or reassigned. Already downloaded public content cannot be recalled. Concurrent edits to one record use last-write-wins behavior.

Compatibility and differences

Requires LNbits 1.7.1 or later with the theme and CSV bridges in this checkout. No core changes or dependencies were added for this clone.

  • The sandbox opens links through the parent confirmation dialog in a new tab.
  • Per-dashboard standalone PWA installation is not available: the WASM wrapper does not attach extension-defined web manifests. Ordinary public URLs and QR sharing work.
  • Deleted dashboards' items remain visible privately for reassignment, instead of leaving hidden orphaned records as the Python implementation does.
  • The searchable dashboard selector returns up to 100 matches; refine its search for larger collections. List APIs support up to 100 rows per request.
  • URL and icon validation intentionally rejects unsafe inputs accepted by the original extension. International hostnames should use their ASCII form.

Build and verify

Use the repository's existing Node.js, Python environment and cached/pinned @bytecodealliance/jco toolchain (verified with 1.32.1); there are no new runtime dependencies.

make check
make build JCO=/path/to/jco
make runtime-check
make package

make check runs domain/security tests, JavaScript syntax checks and manifest permission checks. make runtime-check runs the compiled component with the real LNbits host and temporary SQLite database, checking migration, CRUD, public reads, two-owner isolation, denied permissions, invalid links and deletion/reassignment. It does not use a live account or wallet.

The package and SHA-256 checksum are in dist/. The installer-validated ZIP has one top-level dashboardwasm/ directory containing configuration, the built WASM component, WIT, UI, static assets, schema, migrations, README and licenses. Python development helpers are excluded from the installable archive.

Install the ZIP through LNbits' WASM extension management, approve its storage permissions and enable it for your user. Building a ZIP does not activate it on a running instance. The Python Dashboard can remain installed independently.

API

The base path is /api/v1/ext/dashboardwasm. Management routes require the normal LNbits user authentication supplied by the parent bridge.

Method Path Action
GET / POST /dashboards List / create dashboards
GET / PUT / DELETE /dashboards/{id} Read / rename / delete a dashboard
GET / POST /items List / create items
GET / PUT / DELETE /items/{id} Read / edit / delete an item
GET /public/{id} Anonymous dashboard name and item page

Create/rename dashboards with { "name": "Links" }. Item writes use { "owner_data_id": "dashboard-id", "name": "Wallet", "link": "/wallet", "icon": "bolt" }. Lists accept limit, offset, search, sort_by, descending; item lists also accept owner_data_id. The public route accepts limit and offset. Responses use { "ok": true, "data": ... } or { "ok": false, "error": "..." }.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages