Status: accepted (as-built record, not a forward proposal)
The personal-finance-notion app has been in active development for ~2 months without a written stack rationale. Recording current choices so future-me (or future-collaborator) can tell what was deliberate vs. accidental.
components.json).src/lib/validations/.src/lib/models/ (alias @model/*).src/lib/actions/, alias @actions/*) for in-app calls; REST under src/app/api/integrations/v1/ for external AI-agent push only. Rationale: Server Actions give type-safe RPC for the UI; REST is required by external bearer-authenticated callers and gives a stable public contract.jose + bcryptjs, HTTP-only cookies, Edge middleware (src/middleware.ts) for route protection. Token blacklist + refresh-session models support signout/rotation. Not Auth.js — kept lightweight given solo-user scope.next-pwa + IndexedDB outbox under src/lib/offline/. Writes queue locally and reconcile via per-entity merge logic on reconnect. Entity dispatch is centralized (entity-dispatch.ts) so new models slot in without touching the sync loop.OPENROUTER_MODEL. Normalization is chunked + cached + image-downscaled (src/lib/imports/).tests/pom/; Vitest for unit (mostly the imports pipeline).integrations/v1); rolling own auth means rotation/MFA story is manual; LLM normalization has no automated regression coverage.AGENTS.md, docs/README.md