Monthly budget view with snapshot and applied tracking #4

Merged
claude-code merged 5 commits from feat/3-monthly-view into main 2026-04-17 11:59:09 -06:00
Showing only changes of commit b2d16120d2 - Show all commits

View file

@ -2,19 +2,22 @@
Household budget tracker. FastAPI + HTMX frontend, SQLite backend. Household budget tracker. FastAPI + HTMX frontend, SQLite backend.
## Sections ## Pages
The budget page shows one card per section. Every section accepts a name and * `/` budget configuration. One section per category (Incomes, Fixed Amount
amount per entry and displays a running total, except *Primary Debt Target*, Bills, Debt Minimums, Primary Debt Target, Food and Essentials,
which is a pointer to one of the *Debt Minimums* rows. Subscriptions, Other). Every section accepts name + amount entries and
shows a running total. The Primary Debt Target is a pointer to a Debt
Minimums row.
* `/month/YYYY-MM` monthly view. Snapshots the budget at creation time and
tracks an `applied` amount per entry alongside the planned amount. Each
row is annotated when its name or planned value has been edited away
from the snapshot, or when the row was added after creation. Per-month
debt target is independent of the budget's target after snapshot.
* Incomes Navigate between months with the prev / next buttons or the dropdown
* Fixed Amount Bills picker. A "This month" link on `/` jumps to the current `YYYY-MM`; if it
* Debt Minimums has not been created yet, you land on the create flow.
* Primary Debt Target (pointer)
* Food and Essentials
* Subscriptions
* Other
## Requirements ## Requirements
@ -68,19 +71,22 @@ over `quartermaster.db`, and restart.
``` ```
src/quartermaster/ src/quartermaster/
main.py FastAPI app factory main.py FastAPI app factory
routes.py HTTP handlers, HTMX partials routes.py Budget configuration HTTP handlers
service.py Queries, totals, target logic routes_month.py Monthly view HTTP handlers
models.py SQLAlchemy models and Section enum service.py Budget queries, totals, target logic
db.py Engine, session, PRAGMA foreign_keys=ON month_service.py Snapshot, deviation, per-month CRUD
config.py DB URL resolution models.py SQLAlchemy models and Section enum
templates/ Jinja2 templates (base, index, partials) db.py Engine, session, PRAGMA foreign_keys=ON
static/ CSS config.py DB URL resolution
alembic/ Migrations templates/ Jinja2 templates (base, index, month, partials)
tests/ pytest suite static/ CSS
alembic/ Migrations
tests/ pytest suite
``` ```
## Scope ## Deferred
Single-month budget. Multi-month support is planned for a later milestone A transaction log that rolls up into `applied` on a per-entry per-month
and is intentionally not modelled yet. basis is deferred. Once implemented it may replace the hand-edited applied
field.