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>
27 lines
702 B
Go
27 lines
702 B
Go
package web
|
|
|
|
import (
|
|
"embed"
|
|
"html/template"
|
|
)
|
|
|
|
//go:embed templates/*.html
|
|
var templatesFS embed.FS
|
|
|
|
//go:embed static/*
|
|
var staticFS embed.FS
|
|
|
|
// parsePage parses the shared base layout together with a single page template,
|
|
// yielding a template set whose "base" definition renders the full document.
|
|
func parsePage(name string) *template.Template {
|
|
return template.Must(template.ParseFS(templatesFS, "templates/base.html", "templates/"+name))
|
|
}
|
|
|
|
var (
|
|
uploadPage = parsePage("upload.html")
|
|
confirmPage = parsePage("confirm.html")
|
|
managePage = parsePage("manage.html")
|
|
exportPage = parsePage("export.html")
|
|
tallyPage = parsePage("tally.html")
|
|
recentPage = parsePage("recent.html")
|
|
)
|