Commit Graph

13 Commits

Author SHA1 Message Date
Bas van Rossem
1765f4036c fix(worker): show paused time in history; reset to stopwatch on logout 2026-06-17 21:10:01 +02:00
Bas van Rossem
ce396ecf2d feat(worker): server-authoritative pause/resume on the stopwatch 2026-06-17 21:06:10 +02:00
Bas van Rossem
1631c1698d feat(worker): add logout + replace admin-only settings with Account screen
The Instellingen tab was activity management, which Phase 2 made admin-only —
workers saw add/edit/delete controls that all 403. Replace it with an Account
tab showing the signed-in name/email (via /api/me) and an Uitloggen button
(wires the existing AuthContext signOut). Activity management belongs to the
Phase 3 admin app, so the worker client drops the Settings screen and its
now-unused activity-mutation hooks (useActivities read stays).

Products affected: SoleLog worker client (apps/worker).
2026-06-17 18:23:42 +02:00
Bas van Rossem
3d8524c827 docs: Phase 2 accounts & roles — roadmap, README, session log 2026-06-17 18:04:19 +02:00
Bas van Rossem
7d200eb8fc feat(worker): login-only client (admin creates users) 2026-06-17 17:53:20 +02:00
Bas van Rossem
ec2bb7eec9 feat(api): seed a dev login account (worker@solelog.local) for testing
db:seed now also creates a ready-made dev account via better-auth (properly
hashed), idempotent, and SKIPPED when NODE_ENV=production so no known-password
account ships to prod. Credentials: worker@solelog.local / werkplaats123.
Documented in the worker README. API tests 37/37 green; verified live (sign-in
returns a bearer token; /api/me returns the user).
2026-06-17 17:05:56 +02:00
Bas van Rossem
34c48d6353 feat(api): drive CORS + trusted origins from CORS_ORIGINS env
Phone/LAN testing previously required editing both app.ts (cors origin) and
auth.ts (better-auth trustedOrigins). Now both read env.WEB_ORIGINS, parsed from
a comma-separated CORS_ORIGINS env var (default http://localhost:5173). To test
from a phone, set CORS_ORIGINS to include the LAN origin and restart the API — no
code edit. Documented in .env.example. Also fixed the worker README (db:migrate
creates ./data/app.db, not ./.tmp; phone step now uses CORS_ORIGINS). API tests
36/36 green; typecheck clean.
2026-06-17 16:50:21 +02:00
Bas van Rossem
bd8e8aff2a docs(worker): run instructions and Phase 1 verification 2026-06-17 16:37:28 +02:00
Bas van Rossem
134e01a2e8 feat(worker): Geschiedenis screen with session list and CSV export 2026-06-17 16:30:34 +02:00
Bas van Rossem
5af5a9c2bb feat(worker): server-authoritative Stopwatch screen with active-session recovery 2026-06-17 16:24:56 +02:00
Bas van Rossem
1ecad6bbb4 feat(worker): Instellingen screen — activities CRUD per zooltype 2026-06-17 16:17:37 +02:00
Bas van Rossem
75679256cd feat(worker): auth gate, Dutch login screen, router and 3-tab shell 2026-06-17 16:11:18 +02:00
Bas van Rossem
3511fd8a89 feat(worker): scaffold Vite+React PWA with token storage and typed API client 2026-06-17 16:03:41 +02:00