Skip to content

feat(web): add the dashboard server façade + wire Sidequest.start({ dashboard })#203

Open
merencia wants to merge 1 commit into
feat/web-dashboard-appfrom
feat/web-server-facade
Open

feat(web): add the dashboard server façade + wire Sidequest.start({ dashboard })#203
merencia wants to merge 1 commit into
feat/web-dashboard-appfrom
feat/web-server-facade

Conversation

@merencia

@merencia merencia commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

stacked on #202. serveDashboard() in @sidequest/web/server: one hono server mounting the api under <basePath>/api and serving the built spa, with optional basic auth. the piece that makes the v2 dashboard run end to end.

@merencia merencia force-pushed the feat/web-server-facade branch 2 times, most recently from a4a81e1 to e2c1875 Compare July 5, 2026 14:52
@merencia merencia marked this pull request as ready for review July 6, 2026 14:14
@merencia merencia requested a review from GiovaniGuizzo as a code owner July 6, 2026 14:14
}
try {
const specifier = "@sidequest/web/server";
const web = (await import(specifier)) as WebServer;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why dynamic import?

@merencia merencia force-pushed the feat/web-dashboard-app branch from 0616f93 to 994e38c Compare July 8, 2026 15:11
@merencia merencia force-pushed the feat/web-server-facade branch from e2c1875 to 2654e76 Compare July 8, 2026 15:11
…ashboard })

adds `@sidequest/web/server` `serveDashboard()`: one hono server that mounts the
management api under `<basePath>/api` and serves the built spa for everything else,
with optional basic auth. reconciles the client↔api base by injecting
`window.__SQ_DASHBOARD_BASE__` into the served index.html (the spa uses hash routing
and relative assets, so one build serves any base path). the spa build joins
`yarn build` (dist/app) and the server gets its own rollup entry (dist/server).

re-wires the umbrella: `Sidequest.start({ dashboard: { enabled, port, basePath, auth } })`
lazily imports the façade and boots it with the engine's backend and driver; `stop()`
closes it. this also feeds the real driver/version into the /api/system engine-status.
verified end-to-end against a migrated sqlite backend (api, spa, system, base path).
@merencia merencia force-pushed the feat/web-dashboard-app branch from 994e38c to 79d81f6 Compare July 8, 2026 19:35
@merencia merencia force-pushed the feat/web-server-facade branch from 2654e76 to c65ac73 Compare July 8, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants