This repository was archived by the owner on Jun 19, 2026. It is now read-only.
feat: multi-account financial overview dashboard (#132)#1073
Open
Entr0zy wants to merge 2 commits into
Open
Conversation
Add FinancialAccount model, full CRUD service/routes, and net-worth overview aggregation. New model (models.py): - AccountType enum: CHECKING, SAVINGS, CREDIT, INVESTMENT, CASH, OTHER - FinancialAccount: id, user_id, name, account_type, balance, currency, institution, is_default, notes, created_at, updated_at New service (app/services/accounts.py): - create_account – validates name/type/balance; auto-sets first account as default; clears previous default when is_default=True - get_accounts – ordered default-first then by created_at - get_account – owner-scoped lookup - update_account – partial update with same validations - delete_account – owner-scoped delete - get_overview – aggregates total_assets, total_liabilities (CREDIT), net_worth, by_type breakdown, full account list - account_to_dict – serialiser New routes (app/routes/accounts.py): GET /accounts list all accounts POST /accounts create account GET /accounts/overview net-worth summary GET /accounts/<id> get single account PATCH /accounts/<id> update account DELETE /accounts/<id> delete account (204) All endpoints require JWT; user isolation enforced throughout. Tests (tests/test_accounts.py): 44 tests covering auth gates, CRUD happy paths, validation errors, cross-user isolation, overview aggregation, and all six account types. Closes rohitdash08#132 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
Docs pass added for the
Verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multi-account financial overview dashboard
Implements full multi-account support as described in issue #132.
What's added
Model (app/models.py)
AccountTypeenum — CHECKING | SAVINGS | CREDIT | INVESTMENT | CASH | OTHERFinancialAccount— name, type, balance, currency, institution, is_default, notes, timestampsService (app/services/accounts.py)
create_account— validates name / type / balance; first account auto-flagged as default; settingis_default=Trueatomically clears the previous defaultget_accounts— ordered default-first, then created_at ASCget_account— owner-scopedupdate_account— partial update with same validations; is_default swap supporteddelete_account— owner-scopedget_overview— aggregates total_assets (non-credit), total_liabilities (CREDIT), net_worth, by_type map, full accounts listaccount_to_dict— clean serialiserRoutes (app/routes/accounts.py, registered at /accounts)
All endpoints require JWT; every query is scoped to the authenticated user.
Tests (tests/test_accounts.py) — 44 tests, all green
/claim #132
🤖 Generated with Claude Code