Three new export formats, all reusing this pipeline's existing
transactions data with no new extraction logic:
- QBO (QuickBooks Web Connect / Quicken): qbo_service.py writes OFX 1.x
SGML directly, including <INTU.BID>3000 so it actually qualifies as a
real QBO/QFX file (corrected same day from an initial build that
produced plain generic OFX with a .qbo extension slapped on - see
CLAUDE.md for the research trail). Needs a reusable, project-scoped
bankAccountProfiles record (pb_migrations/14) so a user isn't re-typing
routing/account numbers on every export of the same real account.
- Xero (import CSV): xero_csv_service.py, no bank-account concept at all
(Xero's own CSV import has none) - genuinely simpler than QBO.
- A plain, generic transactions CSV (csv_service.py) - distinct from
Xero's import-specific shape, writes every row regardless of a missing
date/amount since a plain dump has no structural requirement to violate.
The three original separate download buttons were consolidated into one
Download trigger + hover dropdown (QuickBooks/Xero/CSV/Excel), reusing
the Results dropdown's own zero-dead-zone hover structure. Excel's and
the new CSV's single/all download logic was generalized behind one
DOWNLOAD_FORMATS lookup rather than duplicated.
Also adds a per-transaction "include in downloads" checkbox - a lighter,
reversible alternative to permanently deleting a row: excludedFromExport
lives on the document's own result, read only at download time, with
zero effect on the live review screen's own data/checks.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
R.1 (frontend half) of the staged review-screen plan. An <iframe> has
no overlay hook, so drawing a highlight box on a flagged row's own
printed position (source_page/source_bbox, shipped in the previous
commit) needed real rendering control.
New usePdfViewer.js (installs pdfjs-dist) renders each page to its own
canvas, stacked in one scrollable column - the closest behavioral match
to the iframe's own scrollable multi-page view. The browser's native
PDF toolbar goes away as a direct consequence; zoom is rebuilt to match
useImageZoom.js's own -/+/Fit pattern. The coordinate mapping (bbox
value * zoom, no axis flip) is the exact one already verified correct
against real rendered fixtures in the backend half of this work, reused
here rather than re-derived.
useImageZoom.js gained the same highlight/highlightStyle/showHighlight/
clearHighlight shape for an image upload, reusing its own existing zoom
math. SourceDocumentPanel.vue exposes one unified showHighlight(page,
bbox)/clearHighlight() routing to whichever viewer is active - not
called from anywhere yet, since R.2 (the flagged-row UI that would
trigger it) isn't built. R.1 only builds the capability.
Verified: npm run build passes, the pdf.js worker bundles and serves
correctly (curl'd directly, 200). The app container rebuilt and the
served bundle confirmed to contain the new class/function names.
measure.py unaffected (no backend touched this half). Not
machine-verified, more consequential than usual to leave that way:
canvas rendering, worker loading, zoom, and scroll all depend on real
browser behavior a bundle check can't confirm - Claude-in-Chrome did
not connect this session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The project sidebar was "not impressive" per direct feedback, pointed
at docs/sample_ui.png (a Cloudflare R2 dashboard) as the reference.
Adds AppHeader (brand + breadcrumb + account menu) and AppFooter, and
rebuilds ProjectSidebar into the reference's own left-nav pattern
(search box, icon-led list, bottom-anchored collapse-to-rail toggle).
ProjectSidebar moves from ExtractorView into App.vue's shell, since
it's account-wide chrome, not page-specific - same reasoning as the
new header/footer.
Every unicode-entity icon left over from the original vanilla-JS build
is replaced with a FontAwesome solid icon (installed as a real npm
dependency, not a CDN link, to keep the Docker build offline-
reproducible) - not just in the sidebar, across every button site-wide,
per the explicit ask. Color theme is untouched.
Verified: npm run build passes with the fonts bundled correctly; every
icon class used was grepped against the installed FontAwesome CSS and
confirmed to exist; the app container was rebuilt and curl-checked
end-to-end (bundle, CSS, and font asset all serve correctly, and the
new component/icon class names are present in the built JS). measure.py
re-run, unaffected. Not machine-verified: the actual rendered page -
Claude-in-Chrome did not connect this session, same as every prior UI
change in this project.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Rebuilds templates/index.html (896 lines of vanilla JS, no framework, no
build step) as frontend/, a Vue 3 app per ENTERPRISE_STANDARDS.md's
frontend layering (views -> components -> composables -> services ->
repositories, Pinia for stores) - same agreed scope as Stage 1 (backend):
structure + commenting, not the full SaaS-shaped doc.
The full original file was read in full before starting (every function
enumerated against the plan, not re-derived from memory) to make sure
nothing documented in CLAUDE.md's "Frontend / UI state" section got
simplified away: sticky side-by-side layout with a draggable resizer,
Hide/Show Source Doc, collapsible Result card, per-row pencil-to-edit,
comma-formatted numbers, localStorage persistence with a restore banner,
image zoom controls, the pencil-icon-color and description-autogrow
fixes from earlier this session.
The original ask that started this whole detour - processing-phase text
with an animated ellipsis during /api/process - lands here as the one
genuinely new feature (useProcessingPhases.js + ProcessingIndicator.vue),
honestly simulated rather than claiming real progress (the backend is
one synchronous request with no streaming signal).
backend/app.py now serves frontend/dist (built via a new Dockerfile
multi-stage build: a node stage runs npm ci && npm run build, the Python
stage copies backend/ + that dist/ output) instead of rendering a Jinja
template - a manual SPA-fallback route serves a real static asset if one
exists at the requested path, else index.html. One real bug caught and
fixed before this ever ran: the first version also left Flask's own
automatic static route enabled, registering a duplicate/conflicting rule
against the same /<path:...> pattern as the manual catch-all - fixed by
disabling Flask's own static handling (static_folder=None) entirely.
Verified without a browser (the extension could not connect, tried
repeatedly): npm run build succeeds, formatService.js's pure functions
tested directly in Node, every prop/emit/store reference cross-checked
by hand across all ~20 new files, and full regression through the real
Docker container (SPA serving, static assets, /health, /api/* routing,
dual-engine extraction, measure.py - all unaffected or identical to
baseline). Actual interactive behavior - upload, drag/drop, the
processing-phase animation, editing, zoom, the resizer, persistence/
restore, download - was verified by the user in their own browser, not
by Claude. templates/index.html was kept in place as a fallback until
that confirmation came back, then deleted.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>