Skip to content

feat: multi-account financial overview dashboard#405

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

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

Conversation

@TallowX92
Copy link

@TallowX92 TallowX92 commented Mar 14, 2026

/claim #132

Demo

DEMO2-2026-03-14.mp4

Account creation, balance summary strip, color-coded account cards, and cross-account overview.


Summary

Full-stack multi-account financial dashboard — manage multiple bank/credit/cash/investment accounts with cross-account balance aggregation and transaction history.

Backend — /accounts

Method Endpoint Description
GET /accounts List active accounts with live balance
POST /accounts Create account
GET /accounts/overview Aggregate: total balance, income, spent, net flow, recent txns
GET /accounts/<id> Account detail
PATCH /accounts/<id> Update name/type/currency/balance/color
DELETE /accounts/<id> Soft delete (deactivate)

Account types: BANK, CREDIT, CASH, INVESTMENT, WALLET, OTHER

Balance computation: initial_balance + sum(INCOME credits) − sum(EXPENSE debits) for transactions linked to that account. Fully backward-compatible — account_id on expenses is nullable so existing data is unaffected.

Frontend

  • api/accounts.ts — fully typed API client
  • pages/AccountsOverview.tsx — summary strip (total balance, income, spent, net flow), color-coded account cards with per-account income/spent breakdown, recent transactions list across all accounts, inline create/edit modal with color picker
  • /accounts route added to App.tsx and Navbar

Tests (tests/test_accounts.py — 25 tests, all passing without Redis)

  • Create: minimal, initial balance, color, validation errors, auth required
  • List: empty state, returns own accounts, excludes other users, auth required
  • Get: own account, 404 for other user, 404 nonexistent
  • Update: name, type + currency, empty name rejected, 404 for other user
  • Delete: soft delete (disappears from list), 404 after deletion
  • Overview: empty state, balance sums, net flow fields, auth required, user isolation

Implements full-stack multi-account financial tracking.

Backend:
- FinancialAccount model (BANK/CREDIT/CASH/INVESTMENT/WALLET/OTHER)
- Nullable account_id FK on Expense for backward-compatibility
- GET/POST /accounts — list + create
- GET /accounts/overview — total balance, income, spent, net flow, top spending account, recent transactions across all accounts
- GET/PATCH/DELETE /accounts/:id — detail, update, soft delete
- Schema migration: financial_accounts table + index on expenses.account_id

Frontend:
- api/accounts.ts — typed API client
- pages/AccountsOverview.tsx — balance summary strip, account cards with income/spent breakdown, color-coded accent per account, recent transactions list, create/edit modal with color picker
- /accounts route added to App.tsx and Navbar

Tests (tests/test_accounts.py — 25 tests):
- Create: minimal, initial balance, color, validation errors, auth required
- List: empty, own accounts, user isolation, auth required
- Get: own, 404 for other user, 404 for nonexistent
- Update: name, type + currency, empty name rejected, 404 for other user
- Delete: soft delete (removed from list), 404 for other user
- Overview: empty state, balance sum, net flow fields, auth required, user isolation

All 25 tests pass without Redis dependency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants