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).
This commit is contained in:
Bas van Rossem
2026-06-17 17:05:56 +02:00
parent 34c48d6353
commit ec2bb7eec9
3 changed files with 34 additions and 4 deletions

View File

@@ -39,8 +39,10 @@ From the repo root:
yarn workspace @solelog/worker dev # Vite dev server on http://localhost:5173
```
Open **http://localhost:5173** in any browser. There is a sign-up affordance on the login screen for
creating a test account; after signing in you land on the Stopwatch tab.
Open **http://localhost:5173** in any browser. `db:seed` creates a ready-made **dev login**:
**`worker@solelog.local`** / **`werkplaats123`** (dev-only — skipped when `NODE_ENV=production`).
Or use the sign-up affordance on the login screen to create your own account. After signing in you
land on the Stopwatch tab.
The API base URL comes from `VITE_API_URL` (default `http://localhost:3000`).