feat: smart weekly financial digest with trends and insights#902
Open
QuinnClaw wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: smart weekly financial digest with trends and insights#902QuinnClaw wants to merge 1 commit intorohitdash08:mainfrom
QuinnClaw wants to merge 1 commit intorohitdash08:mainfrom
Conversation
…sh08#121) - Add digest service with comprehensive weekly summary generation - Week-over-week income and spending comparison with trend detection - Top 5 spending categories with share percentages - Daily spending/income breakdown for the full week - Upcoming bills for next 7 days - Smart automated insights: - Spending trend warnings (>15% increase) - Savings celebrations (>15% decrease) - Biggest spending day identification - Net positive/negative week alerts - Upcoming bill reminders with manual payment count - Category dominance detection (>50%) - Email delivery support via existing SMTP infrastructure - API endpoints: GET /digest/weekly + POST /digest/weekly/send - Full test suite covering empty state, data aggregation, custom dates, invalid input, insights generation, and week comparison - README documentation 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.
Closes #121
Smart Weekly Financial Digest
Generates comprehensive weekly summaries with trends, insights, and actionable recommendations.
What's included:
Digest Service (
app/services/digest.py):generate_weekly_digest(user_id, end_date)— full digest generationsend_weekly_digest_email(user_id)— generate + email via SMTPSummary metrics:
Week-over-week comparison:
Top 5 spending categories with amounts, transaction counts, and share percentages
Daily breakdown — per-day spending and income for the full 7-day period
Upcoming bills — bills due in the next 7 days with autopay status
Smart insights engine — automated observations:
API endpoints:
GET /digest/weekly— get digest (optional?end_date=YYYY-MM-DD)POST /digest/weekly/send— generate and emailTests: 7 test cases covering empty state, data aggregation, custom dates, invalid input, insights, week comparison, and email sending.
Documentation: README updated with full API reference.