Skip to content

feat: Smart digest with weekly financial summary (#121)#339

Open
lucascrespo23 wants to merge 1 commit intorohitdash08:mainfrom
lucascrespo23:feature/weekly-summary
Open

feat: Smart digest with weekly financial summary (#121)#339
lucascrespo23 wants to merge 1 commit intorohitdash08:mainfrom
lucascrespo23:feature/weekly-summary

Conversation

@lucascrespo23
Copy link

Summary

Implements the Smart Digest with Weekly Financial Summary feature (closes #121).

Backend

  • New service weekly_summary.py that aggregates:
    • Weekly totals (income, expenses, net flow, transaction count)
    • Daily spending breakdown (all 7 days)
    • Category breakdown with percentage shares
    • Top 5 expenses
    • Upcoming bills (current + next week)
    • Week-over-week trends (% change vs previous week)
  • New endpoint GET /weekly-summary?week_of=YYYY-MM-DD with JWT auth
  • Redis caching for completed weeks (1 hour TTL)
  • Cache invalidation integrated with existing patterns

Frontend

  • New WeeklyDigest page at /digest
  • Summary cards (income, expenses, net, transactions) with trend indicators
  • Daily spending bar chart
  • Top expenses list
  • Category breakdown with progress bars
  • Upcoming bills section
  • Week navigation (previous/next/this week)
  • Added nav link in Navbar

Tests

  • 7 pytest tests covering: response structure, expenses, income, trends, bills, auth, invalid input
  • 6 vitest tests covering: page rendering, summary cards, top expenses, bills, categories, navigation

Documentation

  • README updated with Weekly Digest feature documentation

Files Changed

  • packages/backend/app/services/weekly_summary.py (new)
  • packages/backend/app/routes/weekly_summary.py (new)
  • packages/backend/app/routes/__init__.py (updated)
  • packages/backend/tests/test_weekly_summary.py (new)
  • app/src/api/weekly-summary.ts (new)
  • app/src/pages/WeeklyDigest.tsx (new)
  • app/src/__tests__/WeeklyDigest.integration.test.tsx (new)
  • app/src/App.tsx (updated)
  • app/src/components/layout/Navbar.tsx (updated)
  • README.md (updated)

- Add weekly summary service with totals, daily/category breakdown, trends
- Add GET /weekly-summary endpoint with JWT auth and Redis caching
- Add WeeklyDigest React page at /digest with navigation
- Add nav link in Navbar
- Add backend tests (pytest) and frontend tests (vitest)
- Update README with feature documentation
@lucascrespo23
Copy link
Author

Hi @rohitdash08 👋 Just checking in on this PR — happy to address any feedback or make adjustments if needed. Thanks for your time!

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