Skip to content

feat: add essential vs discretionary spending split endpoint#885

Open
Mohye24k wants to merge 1 commit intorohitdash08:mainfrom
Mohye24k:fix/issue-120-spending-split
Open

feat: add essential vs discretionary spending split endpoint#885
Mohye24k wants to merge 1 commit intorohitdash08:mainfrom
Mohye24k:fix/issue-120-spending-split

Conversation

@Mohye24k
Copy link
Copy Markdown

Summary

  • Add GET /spending-split endpoint that classifies expenses as essential vs discretionary
  • Essential categories: rent, utilities, groceries, insurance, healthcare, transport, etc.
  • Discretionary categories: dining, entertainment, shopping, travel, hobbies, etc.
  • Return essential_total, discretionary_total, ratio, percentages, and per-category breakdown
  • Add comprehensive test suite (auth required, empty state, with data, ratio calculation)
  • Add TypeScript API client (app/src/api/spendingSplit.ts)
  • Register blueprint in __init__.py

Test plan

  • Auth required returns 401
  • Empty state returns zeroed totals
  • With data classifies Groceries as essential and Entertainment as discretionary
  • Ratio calculation (essential/discretionary) is correct
  • Percentages add up to 100%

/claim #120
Fixes #120

…sh08#120)

- Add GET /spending-split route to classify expenses
- Essential: rent, utilities, groceries, insurance, healthcare, etc.
- Discretionary: dining, entertainment, shopping, etc.
- Return essential_total, discretionary_total, ratio, categories[]
- Add tests for auth, empty state, with data, ratio calculation
- Add TypeScript API client

Fixes rohitdash08#120
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.

Essential vs discretionary spending breakdown

1 participant