Commit Graph

38 Commits

Author SHA1 Message Date
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
Bas van Rossem
35f9aa5574 feat(api): seed reference activities and enable CORS for the worker SPA 2026-06-17 15:54:52 +02:00
Bas van Rossem
85184d3287 feat(api): user-scoped CSV export matching legacy format 2026-06-17 15:49:20 +02:00
Bas van Rossem
b067bb65b0 feat(api): session history and active-session recovery endpoints 2026-06-17 15:45:08 +02:00
Bas van Rossem
940b06fd91 feat(api): server-authoritative session start/stop/discard with ownership scoping 2026-06-17 15:40:07 +02:00
Bas van Rossem
5e61b7720d feat(api): user-scoped activities CRUD with shared auth helper 2026-06-17 15:34:42 +02:00
Bas van Rossem
57809985fd feat(api): add activities + work_sessions domain schema and shared contracts 2026-06-17 15:29:14 +02:00
Bas van Rossem
40a2512dfd docs(plan): Phase 1 worker-timing plan (web client, replaces Expo plan) 2026-06-17 15:26:23 +02:00
Bas van Rossem
27ae67449b docs(plan): Phase 1 worker-timing implementation plan 2026-06-17 15:07:43 +02:00
Bas van Rossem
ee113225fb fix(api): create the SQLite parent dir before opening the DB
A fresh local `yarn db:migrate`/`yarn dev` failed with SQLITE_CANTOPEN (14)
because libsql does not create the parent directory for a file: URL and the
gitignored apps/api/data/ does not exist on checkout. Added ensureDbDir() and
call it before createClient in both the client and the migrator. No-op for
non-file URLs and for the Docker /data volume. Verified: fresh db:migrate now
creates data/ and all tables; tests + typecheck still green; live round-trip
(/health, sign-up, sign-in, /api/me, 401) works.
2026-06-17 14:50:47 +02:00
Bas van Rossem
4e9a96644c chore: trim obsolete logFilters from .yarnrc.yml
The suppressed peer-dep warnings (YN0060/YN0002/YN0068/YN0086) and their comment
referenced @lshay/ui, expo-three and @expo/cli — all removed in the cleanup.
Dropping the filters surfaces the remaining warnings, which are now legitimate
signals about the apps/api stack (drizzle vs better-auth peer ranges), not noise.
2026-06-17 14:46:45 +02:00
Bas van Rossem
384797df7d docs: update CLAUDE.md and roadmap for single-backend (apps/api) repo 2026-06-17 14:41:07 +02:00
Bas van Rossem
64f8b2fd2c chore: remove legacy apps/mobile, apps/web, publisher and dead root config 2026-06-17 14:38:46 +02:00
Bas van Rossem
c72086550d docs: extract port-worthy reference from legacy code before full cleanup 2026-06-17 14:35:00 +02:00
Bas van Rossem
3f2c5f0179 chore(mobile): remove @expo/ngrok tunneling dependency
Dropped @expo/ngrok (and its 40 platform binary packages) from apps/mobile.
It was only used by `expo start --tunnel` (public dev-server tunnel) — never
imported in app code and unrelated to token storage (that is expo-secure-store).
Removed per IT request; no functional impact on the app or auth.
2026-06-17 14:25:28 +02:00
Bas van Rossem
8d3f89869a docs: record Phase 0 completion and post-workflow fixes in session log 2026-06-17 14:08:51 +02:00
Bas van Rossem
efff2214d4 fix(api): make migrate.ts direct-run guard work on Windows
The guard compared import.meta.url against `file://${process.argv[1]}`, which
never matches on Windows (argv[1] is a drive-letter/backslash path), so
`yarn db:migrate` silently no-opped for local non-Docker dev. Use
pathToFileURL(process.argv[1]).href instead, which is correct on Windows and
Linux alike. Verified `yarn db:migrate` now creates all tables on Windows; the
Docker start path is unaffected.
2026-06-17 14:07:41 +02:00
Bas van Rossem
41b65f209c fix(api): reconcile better-auth schema with installed better-auth CLI output
The Task 3 schema drifted from what better-auth@1.6.18's CLI generates: it used
mode:'timestamp' (epoch seconds) instead of 'timestamp_ms', left verification
timestamps nullable, and omitted the default expressions and helper indexes.

Regenerated src/db/schema.ts from `@better-auth/cli generate` (authoritative per
the plan's version-drift rule) and rebuilt migration 0000 from scratch (no data
exists yet). Converted the index callbacks from the CLI's array form to the
object form required by drizzle-orm@0.36.4's types. Adds session_userId_idx,
account_userId_idx, verification_identifier_idx and the unixepoch defaults.

Tests (health, db, auth sign-up/sign-in, /api/me round-trip) all pass; typecheck
clean; db:generate reports no pending changes.
2026-06-17 14:06:16 +02:00
Bas van Rossem
bcb305b048 feat(api): dockerize backend with compose, migrations-on-start, and run docs 2026-06-17 13:54:48 +02:00
Bas van Rossem
04cfe0f726 feat(api): add protected GET /api/me and full auth round-trip test 2026-06-17 13:50:31 +02:00
Bas van Rossem
89f892ce0c feat(api): mount better-auth (email+password + bearer) on /api/auth 2026-06-17 13:47:20 +02:00
Bas van Rossem
e8aa2c67e8 feat(api): Drizzle + libsql DB layer with better-auth schema and migrations 2026-06-17 13:40:31 +02:00
Bas van Rossem
62c8597068 feat(api): Hono backend skeleton with /health endpoint and test 2026-06-17 13:35:28 +02:00
Bas van Rossem
f83c9a6384 feat(shared): add @solelog/shared contracts package and wire packages/* workspace 2026-06-17 13:26:07 +02:00
Bas van Rossem
1d395b417b docs: add session log for 2026-06-17 Phase 0 kickoff 2026-06-17 13:20:35 +02:00
Bas van Rossem
74e697054a chore: add .gitattributes and normalize line endings to LF 2026-06-17 13:20:09 +02:00
Bas van Rossem
54d21f300c chore: gitignore local MCP config and personal CLAUDE.local.md 2026-06-17 13:10:00 +02:00
Bas van Rossem
ac2f9c669b docs: add project roadmap and Phase 0 (Foundation) implementation plan
Tracked planning docs under docs/ (the project's documentation source of
truth per CLAUDE.local.md):
- docs/roadmap.md      — vision, decisions, architecture, 6-phase roadmap
- docs/plans/phase-0-foundation.md — TDD plan to stand up the dockerized
  Hono + better-auth + Drizzle + libsql backend with an auth round-trip
2026-06-17 13:09:12 +02:00
Bas van Rossem
b32d91bc4d docs(web): add reverse-engineered db/schema.sql
No migration shipped in the export. Recreates production_tasks and
time_logs (columns derived from the API queries) so the backend can run
against a fresh self-hosted Postgres.
2026-06-17 11:15:55 +02:00
Bas van Rossem
9689b84e8d fix(web): track and repair the /api/logs route
- .gitignore: the bare 'logs' rule was matching the api/logs/ source
  dir, so the route was never committed. Anchor it to /logs/ and repair
  two log globs where '*' had been mangled to '_'.
- route.ts: add the missing 'import sql' — the file used sql but never
  imported it, so every GET/POST /api/logs threw ReferenceError and 500'd.
2026-06-17 11:15:55 +02:00
Bas van Rossem
be280b4b29 chore: reconcile yarn.lock with package.json
The export shipped a lockfile out of sync with the manifest (lock had
expo 54.0.35 etc., package.json pins 54.0.34). yarn install reconciled
the lock down to the manifest versions.
2026-06-17 11:15:54 +02:00
Bas van Rossem
9ca8a454f4 docs: correct CLAUDE.md after reverse-engineering apps/web backend
The backend is not remote: apps/web is a Next.js 16 app with the API
routes, better-auth, and a Neon Postgres data layer. Document the data
model, the mobile<->web API contract, and the missing /api/logs route.
2026-06-17 10:22:20 +02:00
Bas van Rossem
d94d0b188b Initial commit: code as received (Create/Anything export)
Insole-production time tracker exported from the Create/Anything AI
platform. Baseline snapshot before any reverse-engineering or cleanup.

- apps/mobile: Expo Router app (iOS/Android/web), the only workspace
- publisher/: standalone OpenNext/AWS deploy tooling for the web side
- Backend (/api/tasks, /api/logs + DB) lives remotely, not in this repo
2026-06-17 10:19:33 +02:00