fire-planner/fire_planner/api
Viktor Barzin 3bfa46ad4f
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
spending: prefill annual £ from actualbudget trailing 12mo
Adds a thin read-only client for the actualbudget HTTP API
(`fire_planner/actualbudget.py`) and a `GET /spending/annual` endpoint
that returns trailing-N-month spending broken out by category group.

Default exclusions ("Investments and Savings", "Budget Reset") strip
out wealth transfers so the headline number reflects actual
consumption — for Viktor's data, ~£41k/yr instead of the raw £210k
total. Caller can pass `?exclude=...` to override.

Frontend uses the headline `total_gbp` to autofill the Annual spending
input (same pattern as nw_seed from networth), with a small
provenance line below the input showing the window + which groups
were excluded.

Auth: 3 new env vars (ACTUALBUDGET_API_URL/KEY/SYNC_ID) sourced from
Vault `secret/fire-planner` via the existing ExternalSecret —
infra/stacks/fire-planner applied separately. Backend silently keeps
the hardcoded default if the upstream is unreachable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:11:51 +00:00
..
__init__.py api: expand FastAPI surface for scenarios, networth, life-events, goals, simulate 2026-05-09 21:48:36 +00:00
auth.py api: expand FastAPI surface for scenarios, networth, life-events, goals, simulate 2026-05-09 21:48:36 +00:00
dependencies.py api: expand FastAPI surface for scenarios, networth, life-events, goals, simulate 2026-05-09 21:48:36 +00:00
goals.py api: drop bearer-token gate from /api/* CRUD + simulate 2026-05-09 23:56:37 +00:00
life_events.py api: drop bearer-token gate from /api/* CRUD + simulate 2026-05-09 23:56:37 +00:00
networth.py api: expand FastAPI surface for scenarios, networth, life-events, goals, simulate 2026-05-09 21:48:36 +00:00
scenarios.py api: drop bearer-token gate from /api/* CRUD + simulate 2026-05-09 23:56:37 +00:00
schemas.py spending: prefill annual £ from actualbudget trailing 12mo 2026-05-10 11:11:51 +00:00
simulate.py whatif: drop glide-path, compact form into 4 sections 2026-05-10 01:51:24 +00:00
spending.py spending: prefill annual £ from actualbudget trailing 12mo 2026-05-10 11:11:51 +00:00