Commit Graph

4 Commits

Author SHA1 Message Date
Bas van Rossem
3d8524c827 docs: Phase 2 accounts & roles — roadmap, README, session log 2026-06-17 18:04:19 +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