Skip to content

Refactor: become a thin Electron shell over jspod #1

Description

@melvincarvalho

Background

solid-desktop currently bootstraps a Solid pod in-process via createServer({ mashlib: true, ... }) in main.js, pinned to javascript-solid-server@^0.0.81 (the current published JSS is 0.0.201 — ~120 versions behind) and mashlib-jss@^0.1.1. Out of the box it auto-navigates to an external pod (timbl.solidcommunity.net), so a new user doesn't even land on their own data.

Meanwhile, jspod (now published on npm) packages JSS with batteries included:

  • Spawns current JSS with the right flags, finds a free port, persists a JWT token secret
  • First-run bootstrap of the default app bundle (home, plaza, vellum, plume, charlie, app store, …)
  • Seeds welcome / signin / account / docs pages
  • Rung-1 me/me credentials with off-loopback warning
  • jspod install <app|--bundle …> for adding more apps later

Proposal

Drop direct deps on javascript-solid-server + mashlib-jss. Add jspod as the single server dep. Rewrite main.js to spawn jspod as a child process with --no-open (Electron handles the window), wait for readiness, then load the local pod URL in the BrowserWindow.

Keep the purple address-bar overlay — it's still the unique value-add (browse any pod's URI from a single shell) — but change the default URI from the external timbl pod to the user's own local pod.

Tradeoff

jspod today is CLI-only (bin: index.js, no exported JS API), so this means running an extra child process rather than embedding in-process. Cleaner long-term would be to add a programmatic start(options) export to jspod and import it directly, but that's a change to the other repo. Doing this first ships immediately and can be migrated to an in-process import later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions