feat: Smart digest with weekly financial summary (#121)#772
Open
wocaoac-cpu wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: Smart digest with weekly financial summary (#121)#772wocaoac-cpu wants to merge 1 commit intorohitdash08:mainfrom
wocaoac-cpu wants to merge 1 commit intorohitdash08:mainfrom
Conversation
Implement weekly financial digest endpoint (GET /digest/weekly) that generates comprehensive summaries including: - Income/expense totals with week-over-week change tracking - Per-category spending breakdown with percentage shares - Daily spending trend for the week - Top 5 largest transactions - Upcoming bills due within the week - AI-powered insights via Gemini with heuristic fallback Includes: - services/smart_digest.py: Core aggregation and AI enrichment logic - routes/digest.py: JWT-protected endpoint with Redis caching - tests/test_smart_digest.py: 29 tests (unit + integration) - OpenAPI spec updated with /digest/weekly endpoint and schema Closes rohitdash08#121
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes #121
Implements a Smart Digest feature that generates weekly financial summaries with AI-powered insights.
New Endpoint
GET /digest/weekly?week=YYYY-WwwX-Gemini-Api-KeyheaderX-Insight-PersonaheaderResponse Payload
periodsummarycategory_breakdowndaily_spendingtop_transactionsupcoming_billsinsightsAI Integration
warningsfieldFiles Changed
packages/backend/app/services/smart_digest.py— Core aggregation logic + AI enrichmentpackages/backend/app/routes/digest.py— Blueprint with/weeklyendpointpackages/backend/app/routes/__init__.py— Register digest blueprintpackages/backend/app/openapi.yaml— API documentation withWeeklyDigestschemapackages/backend/tests/test_smart_digest.py— 29 tests covering:parse_week_paramvalidation (7 tests)_week_boundsISO week calculation (2 tests)Test Plan