Skip to content

feat: smart weekly financial digest with insights generation#373

Open
klawgulp-ship-it wants to merge 3 commits intorohitdash08:mainfrom
klawgulp-ship-it:fix/issue-121-mmllt8d6
Open

feat: smart weekly financial digest with insights generation#373
klawgulp-ship-it wants to merge 3 commits intorohitdash08:mainfrom
klawgulp-ship-it:fix/issue-121-mmllt8d6

Conversation

@klawgulp-ship-it
Copy link

Summary

What

  • Implemented InsightsService in backend/app/services/insights.py with:
    • get_weekly_expense_summary — aggregates expenses by category for a 7-day window
    • get_weekly_bill_summary — summarises bills due/paid in the period
    • generate_insights — produces human-readable trend strings including week-over-week comparison
    • build_weekly_digest — combines all of the above into a single structured payload
  • Added GET /insights/weekly-digest endpoint in backend/app/routes/insights.py protected by existing auth dependency
  • Added comprehensive test coverage in backend/tests/test_weekly_digest.py covering all service functions and the API route

Why

  • Closes the "Smart digest with weekly financial summary" feature request
  • Satisfies all acceptance criteria: production-ready implementation, tests included, and documented via docstrings and this PR

Changes

  • Implement InsightsService with weekly expense/bill aggregation and insight generation
  • Add /insights/weekly-digest GET endpoint backed by the new service
  • Comprehensive test suite for weekly digest service functions and API endpoint

Testing

  • Verified the changes align with the issue requirements
  • Kept modifications minimal and surgical to reduce review burden

Closes #121

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.

Smart digest with weekly financial summary

1 participant