Skip to content

feat: smart weekly financial digest with trends and insights#902

Open
QuinnClaw wants to merge 1 commit intorohitdash08:mainfrom
QuinnClaw:feat/weekly-financial-digest
Open

feat: smart weekly financial digest with trends and insights#902
QuinnClaw wants to merge 1 commit intorohitdash08:mainfrom
QuinnClaw:feat/weekly-financial-digest

Conversation

@QuinnClaw
Copy link
Copy Markdown

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 generation
  • send_weekly_digest_email(user_id) — generate + email via SMTP

Summary metrics:

  • Total income, spending, net flow
  • Transaction count and average daily spending

Week-over-week comparison:

  • Income and spending change percentages
  • Trend direction (up/down/flat)

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:

  • ⚠️ Spending increased >15% vs last week
  • ✅ Savings week (spending down >15%)
  • ℹ️ Biggest spending day identification
  • ✅/⚠️ Net positive or negative week
  • 🔔 Upcoming bill reminders (counts manual payments)
  • ℹ️ Category dominance (>50% of spending)

API endpoints:

  • GET /digest/weekly — get digest (optional ?end_date=YYYY-MM-DD)
  • POST /digest/weekly/send — generate and email

Tests: 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.

…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
@QuinnClaw QuinnClaw requested a review from rohitdash08 as a code owner April 14, 2026 01:13
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