📝 Document the PocketBase and SignalDB stack
The README now describes the PocketBase binary, the per-user settings, the admin UI, the sign-in page and the import-legacy command. PLAN.md records the decisions of the migration and marks the sections that describe the old backend as superseded.
This commit is contained in:
@@ -297,6 +297,25 @@ Switched from online-first/offline-fallback to fully offline-first.
|
||||
- `+layout.svelte`: removed offline banner (no longer meaningful; behaviour is identical online or offline).
|
||||
- `online.ts`: deleted (unused).
|
||||
|
||||
### M12 — PocketBase + SignalDB ✅
|
||||
|
||||
The backend is now an embedded PocketBase (v0.40.6), which replaces `chi`, the hand-rolled SQLite store, the token auth and the sync log. On the client, SignalDB replaces Dexie and the outbox; collections persist in IndexedDB (one database per user) and sync with the server.
|
||||
|
||||
Decisions:
|
||||
|
||||
- Typed PocketBase collections instead of opaque payload blobs (the server computes closed days and weeks).
|
||||
- Open sign-up with owner scoped rules.
|
||||
- Clients are the only writers of entries, settings and balance adjustments.
|
||||
- Day and week closing stay server routes.
|
||||
- All deletes are soft.
|
||||
- `settings.timezone` is the source of truth for day keys instead of the `TZ` environment variable.
|
||||
- 15 character PocketBase ids.
|
||||
- `entries.end_time` 0 means running on the server and `null` in the client.
|
||||
- Stale running entries are stopped at the end of their day by the client and by a server cron.
|
||||
- `wotra import-legacy` imports the old SQLite database (`--email` of an existing account, optional `--tz`, `--dry-run`; replaces all data of that user).
|
||||
|
||||
The Stack, Project Layout, Database Schema, API Surface, Auth, Sync Protocol and Offline Strategy sections above describe the pre-M12 backend and are superseded where they conflict.
|
||||
|
||||
### M11 — Future
|
||||
CSV/JSON export, monthly summary view.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user