How magnus009/budget-tracker works
Budget Tracker is a local-first browser app for budgeting by cutoff (budget cycle). Users create and manage cutoffs, inspect dashboard totals, drill into category plans and transactions, then save changes locally or share cutoff data as JSON. The graph shows the app controller routing views and coordinating state, the distinct dashboard/cutoff/category stages, query and normalization layers, and IndexedDB/localStorage persistence. The README documents responsive use and cutoff JSON sharing; source excerpts show those modules and their controller connections. Other UI details are omitted where excerpts do not establish their wiring.
Main entry points: app.js App controller · storage.js Storage adapter · import-export.js Cutoff JSON sharing · queries.js Budget queries
Components 13
Budget views
- App controller
app.js - Cutoff dashboard
modules/dashboard-page.js - Cutoff overview
modules/cutoff-page.js - Category plans
modules/category-page.js
Budget domain
- Budget queries
modules/queries.js - State normalization
modules/state.js - Display formatting
modules/formatters.js
Local persistence
- Storage adapter
modules/storage.js - IndexedDB
- localStorage
JSON sharing
- Cutoff JSON sharing
modules/import-export.js - JSON file
Other components
- Budget user
Connections 18
- Budget user → App controller: uses
README.md - App controller → Cutoff dashboard: routes rendering
app.js - App controller → Cutoff overview: routes rendering
app.js - App controller → Category plans: routes rendering
app.js - App controller → Budget queries: calls
app.js - App controller → Display formatting: formats values
app.js - Cutoff dashboard → Budget queries: gets totals
modules/dashboard-page.js - Cutoff overview → Budget queries: gets ledger totals
modules/cutoff-page.js - Category plans → App controller: renders edits
app.js - App controller → Storage adapter: loads and saves
app.js - Storage adapter → IndexedDB: reads and writes
modules/storage.js - Storage adapter → localStorage: fallback reads and writes
modules/storage.js - Storage adapter → State normalization: normalizes state
modules/storage.js - App controller → State normalization: normalizes data
app.js - App controller → Cutoff JSON sharing: imports and exports
app.js - Cutoff JSON sharing → State normalization: normalizes packages
modules/import-export.js - Cutoff JSON sharing → JSON file: downloads or reads
modules/import-export.js - Budget user → JSON file: shares cutoff
README.md