2 Commits
Author SHA1 Message Date
mars3142 5995b316af Require OIDC sign-in for every route
CI / build-and-push (push) Canceled after 0s
CI / deploy (push) Canceled after 0s
CI / check (push) Canceled after 41s
Every page now goes through hooks.server.ts's requireAuth, except
/healthz, /login and Auth.js's own /auth/* routes. A generic OIDC
provider (not the named Keycloak one) does the actual sign-in, so
swapping identity providers later is a config change, not a code one.

- src/auth.ts: OIDC provider + Auth.js session, with idToken/accessToken
  and a filtered role list carried into the session.
- routes/login: skips Auth.js's own provider-picker page - pointless
  with exactly one provider - and jumps straight to sign-in.
- routes/logout: ends both the local session and, via the IdP's
  discovered end_session_endpoint (RP-Initiated Logout, not a
  hardcoded Keycloak URL), its SSO session. A named "everywhere"
  action additionally revokes every session through Keycloak's Account
  API before signing out (best-effort, degrades gracefully elsewhere).
- account-menu.svelte / settings: show the real signed-in profile
  instead of the /nav.ts mock, and link out to the IdP's own
  account console instead of a fake editable profile form.
- /session.ts + tests: pure helpers (initials, primaryRole,
  filterRoles) kept separate from the Auth.js config so they're
  testable without spinning up a session.

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
2026-09-04 22:28:27 +02:00
mars3142 208d04e3e9 Scaffold SvelteKit UI with mocked pages
SvelteKit 2 + Svelte 5 (runes) + Tailwind v4 + shadcn-svelte (vega preset)
+ lucide, adapter-node. Warm paper-catalog design system in src/app.css:
Libre Caslon headings, monospace for every number and code, orange #e8590c
reserved for pick-by-light and warnings.

Mobile-first: bottom tab bar under lg, dark sidebar with an account menu at
lg and up. shadcn components under src/lib/components/ui/ are left untouched;
all theming lives in app.css and our own composite components.

Every page is mocked from src/lib/mock/data.ts (no API yet): parts
list/detail, Kastenplan, LCSC import, mobile picking, settings, plus
project/order stubs.

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
2026-09-03 01:07:51 +02:00