Commit graph

3 commits

Author SHA1 Message Date
Jean-Michel Tremblay
99b8541da0 Static portable build + env-file launcher for deployment
- build.sh: CGO_ENABLED=0 + -ldflags "-s -w" → fully static binary (pure-Go
  SQLite, no C toolchain), runs on any linux/<arch>; note GOARCH cross-compile.
- scripts/hsa-app.sh: load an env file (default /etc/hsa-app/hsa-app.env, or arg/
  $HSA_ENV_FILE), export it, then exec the binary ($HSA_BIN or ./hsa next to it).
  Suitable as a systemd ExecStart.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 08:32:19 -04:00
Jean-Michel Tremblay
5c21f131fd Add AI auto-fill, tally, recent views, and cheaper-by-default classification
Features (see spec.md v2):
- Wire receipt classification into the upload flow; cheap model (Haiku 4.5)
  is now the default, shown as a footnote with per-scan cost in cents.
- Skip-AI toggle to enter fields by hand.
- Duplicate-transaction warning: live check on date+amount, gated submit.
- Tally tab: person x year totals with margins and grand total.
- Recent uploads / recent receipts tabs with paging and file serving.
- People reconcile on startup: merge stray partial names (e.g. "Jude" ->
  "Jude Tremblay"), reassigning receipts; idempotent seeding.
- scripts/build.sh builds the binary; scripts/run.sh builds and runs with .env.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 22:04:42 -04:00
Jean-Michel Tremblay
8b7252dad4 Initial commit: HSA receipt tracker
Go app for capturing and archiving HSA-eligible receipts: OIDC/PKCE auth
against Authelia, SQLite storage with dual-write (filesystem + DB blob),
mobile-first upload, and DB export.

Adds AI receipt classification: a config.json catalog of people and
categories (seeded into the DB on startup), a prompt builder that derives
name-order/initial variants from the data (with same-surname ambiguity
handling), and an Anthropic tool-use client behind POST /classify. Tests
run against a mock endpoint; a live integration test is env-gated to the
cheapest model.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 21:40:12 -04:00