Skip to content

feat(insights): add weekly financial summary endpoint#684

Open
sungdark wants to merge 1 commit intorohitdash08:mainfrom
sungdark:clean/weekly-digest-v2
Open

feat(insights): add weekly financial summary endpoint#684
sungdark wants to merge 1 commit intorohitdash08:mainfrom
sungdark:clean/weekly-digest-v2

Conversation

@sungdark
Copy link
Copy Markdown

Summary

Adds a smart weekly financial digest endpoint to help users track their weekly spending trends.

Changes

  • New endpoint: GET /insights/weekly-summary with JWT auth
    • Returns income, expenses, net flow, top categories
    • Detects unusual spend (categories up 50%+ vs prior week)
    • Generates actionable insights and tips
    • Gemini AI integration with graceful heuristic fallback
  • Frontend: getWeeklySummary() API client + weekly digest section in Analytics page
  • Tests: 6 test cases covering all functionality
  • Docs: README updated

Acceptance Criteria

  • Production-ready implementation
  • Includes tests
  • Documentation updated

Bounty Reference

/claim #121


This PR addresses the bounty issue #121

Implements weekly financial digest with:
- GET /insights/weekly-summary endpoint with JWT auth
- Weekly income/expense/net flow calculation
- Category breakdown and unusual spend detection
- Gemini AI insights with heuristic fallback
- Frontend analytics integration
- Comprehensive test suite

Addresses bounty issue rohitdash08#121
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.

1 participant