New third service alongside app/docling - a deliberate, revisited
decision from the documented "no DB" architecture, not an oversight.
pocketbase/Dockerfile - official minimal pattern (no official image
exists), pinned binary, migrations+hooks copied in and run on startup.
pb_migrations/1_create_collections.js - schema as code: users (auth,
self-registration open), projects (owner-scoped), documents (owner-
AND project-scoped - project is REQUIRED, not optional, since a
planned future per-project category-mapping feature needs every
document scoped from day one), with a sourceFile field for the
original PDF/image (stored in R2 once configured).
pb_hooks/ensure_default_project.pb.js - auto-creates each new user's
"General" project (isDefault:true) the moment their account exists -
covers password and Google signup uniformly, guarantees the required
documents.project relation always has somewhere to point.
configure-secrets.sh - the only place R2/Google secrets are handled,
reading from a gitignored .env and PATCHing PocketBase's own REST API.
Never in a migration (those are committed to git).
Frontend: pocketbaseRepository.js (the one SDK instance),
authService.js (login/signup/Google/logout), authStore.js (Pinia,
synced to the SDK's own authStore), LoginView.vue, and App.vue's new
auth gate - talks to PocketBase directly, not proxied through Flask.
Verified via real REST API calls against the running container (not
just read): migrations create the expected collections/rules; a fresh
signup gets exactly one auto-created "General" project; a second
user's token can't see the first user's data; a document created with
no project correctly fails validation (confirming the frontend must
resolve one itself); authService's actual functions exercised via a
live Node script against the real container (signup, hook-created
project visible, logout, re-login). npm run build passes. measure.py
unaffected (no backend code touched).
Not yet verified - needs real R2/Google credentials this session
doesn't have: configure-secrets.sh itself, and the Google OAuth popup
flow (needs a real browser + real Google Cloud OAuth client, both
outside this repo's control - documented as setup prerequisites in
README.md).
This is Stage B.1 of 3 (schema + auth gate). B.2 (document persistence
moves from localStorage to PocketBase) and B.3 (the project sidebar
UI) are not started yet.
Add README.md - what the product is, docker compose up, project
layout, measure.py usage, pointer to CLAUDE.md for the deeper record.
Delete fixtures/ground_truth_sep_reference.xlsx - a bank-description
to accounting-category mapping from the separate bank_statement_
categorizer tool, not this product's own extraction ground truth, and
referenced nowhere in this repo. Nothing to repurpose it into, since
this product deliberately doesn't categorize transactions at all.
Investigate HSBC-Aug's running_balance failure and both fixtures'
engine_agreement findings - confirmed not extraction bugs. Built and
hand-verified fixtures/HSBC-USD-August2026_ground_truth.xlsx (all 31
transactions checked against the rendered PDF, including the Cancelled
wire and its two blank-balance rows) to prove it: 1.0 field accuracy.
The running_balance break is the Cancelled wire's -22,386.00 genuinely
not applying to the real balance chain - the check correctly flagging
that, not smoothing it over. engine_agreement on both fixtures is
Docling missing a table and pdfplumber's result being used instead,
exactly as designed, correctly flagged for lower confidence rather
than silently trusted.