Skip to content

Milestone 1: embedded SvelteKit shell for setup, sign-in, recovery, and status #6

Closed

Description

@TusanHomichi

Problem or outcome

Authentication (#4) is API-only; an operator currently needs curl to initialize an installation. Milestone 1 requires the embedded SvelteKit shell: setup, sign-in, recovery, and status served from the single executable, with no Node.js runtime in production (docs/architecture.md User interface).

Scope

In scope:

  • web/: SvelteKit single-page app (adapter-static, SSR off, SPA fallback) with pages for first-run setup, sign-in, password reset/recovery, and a signed-in status view (agency, user, capabilities, session expiry, health, version, sign-out)
  • Routing guard driven by a new unauthenticated GET /api/instance endpoint ({initialized, version, agency name}) so the UI lands on setup, sign-in, or status correctly
  • Embedding the built assets in the Rust executable; / serves the app, unknown non-/api paths fall back to the SPA index, /api/* keeps JSON semantics; a build without embedded assets serves an honest plain-text notice and logs a warning at startup
  • pr-gate builds the web app (svelte-check + build) before the Rust gates so the embedded bytes are real
  • Rust integration tests for asset serving and fallback behavior; browser end-to-end proof of setup → sign-in → status → sign-out against the real binary
  • ADR 0005: frontend toolchain and embedding decisions

Out of scope:

  • In-app notices UI (arrives with the persisted-notices slice)
  • Any training-domain UI (Milestone 2+)
  • Design-system/visual-identity work beyond a clean, accessible baseline

Acceptance criteria

  • A browser pointed at a fresh installation completes setup, signs in, sees status, resets a password with a code, and signs out — no curl
  • The production binary serves the UI with no Node.js present at runtime
  • /api/* unknown routes still return JSON 404s, not HTML
  • pr-gate stays green while building both stacks
  • All repository gates pass

Expected proof

  • npm ci && npm run check && npm run build in web/
  • cargo fmt --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace
  • Browser E2E run against the compiled binary

Related roadmap, decisions, or issues

Activity

  1. added a commit that references this issue on Aug 28, 2026
    c51e482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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