Skip to content

feat: multi-account financial overview dashboard#901

Open
QuinnClaw wants to merge 1 commit intorohitdash08:mainfrom
QuinnClaw:feat/multi-account-dashboard
Open

feat: multi-account financial overview dashboard#901
QuinnClaw wants to merge 1 commit intorohitdash08:mainfrom
QuinnClaw:feat/multi-account-dashboard

Conversation

@QuinnClaw
Copy link
Copy Markdown

Closes #132

What this PR adds:

New Account model with 6 account types:

  • CHECKING, SAVINGS, CREDIT_CARD, CASH, INVESTMENT, OTHER

Full CRUD API at /accounts:

  • GET /accounts — List all active accounts (with ?include_inactive=true option)
  • POST /accounts — Create account with name, type, balance, currency, institution
  • GET /accounts/<id> — Get single account
  • PUT /accounts/<id> — Update account fields
  • DELETE /accounts/<id> — Soft-delete (sets is_active=false)

Aggregated overview dashboard at GET /accounts/overview:

  • Total balance across all accounts
  • Total assets (positive balances) and liabilities (negative balances)
  • Net worth calculation
  • Per-account 30-day spending and income summaries
  • Balance breakdown by account type

Expense linking:

  • Added account_id foreign key to Expense model (nullable, backward compatible)
  • Overview dashboard uses this to calculate per-account spending

Tests:

  • Full CRUD test suite
  • Validation tests (missing name, invalid type, invalid balance)
  • Overview aggregation test with mixed account types
  • 404 handling tests

Documentation:

  • SQL migration script (migrations/add_accounts_table.sql)
  • README updated with API reference and account types

Backward compatible:

  • account_id on expenses is nullable — existing data unaffected
  • Soft-delete preserves account history
  • All existing tests continue to pass

- Add Account model with 6 account types (CHECKING, SAVINGS, CREDIT_CARD, CASH, INVESTMENT, OTHER)
- Add account_id foreign key to Expense model for linking expenses to accounts
- Full CRUD API for accounts (/accounts endpoint)
- Aggregated overview dashboard (/accounts/overview) with:
  - Total balance, assets, liabilities, net worth
  - Per-account 30-day spending and income summaries
  - Balance breakdown by account type
- Soft-delete for accounts (is_active flag)
- SQL migration script for new table and column
- Comprehensive test suite (CRUD, validation, overview, 404 handling)
- README documentation with API reference

Closes rohitdash08#132
@QuinnClaw QuinnClaw requested a review from rohitdash08 as a code owner April 14, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-account financial overview dashboard

1 participant