Skip to content
This repository was archived by the owner on Jun 19, 2026. It is now read-only.

feat: Smart Digest - Weekly Financial Summary (#121)#147

Open
George3307 wants to merge 1 commit into
rohitdash08:mainfrom
George3307:feat/weekly-digest-121
Open

feat: Smart Digest - Weekly Financial Summary (#121)#147
George3307 wants to merge 1 commit into
rohitdash08:mainfrom
George3307:feat/weekly-digest-121

Conversation

@George3307

Copy link
Copy Markdown

/claim #121

Summary

Implements the Smart Digest feature — weekly financial summaries highlighting spending trends and insights.

What's New

Backend (packages/backend/):

  • GET /digest/weekly?week=YYYY-WNN — new endpoint returning weekly spending summary
  • app/services/digest.py — business logic: category aggregation, week-over-week comparison, trend detection
  • app/routes/digest.py — route with input validation and JWT auth
  • Blueprint registered in app/routes/__init__.py

Frontend (app/):

  • pages/Digest.tsx — card-based weekly summary page
    • Total spent card
    • Category breakdown with progress bars
    • Week-over-week change badges (red for increase, default for decrease)
    • Trends and insights sections
    • Week navigation (prev/next)
  • API client api/digest.ts with TypeScript types
  • Route added in App.tsx, nav link in Navbar.tsx

Tests (packages/backend/tests/test_digest.py):

  • Empty digest, populated digest, week-over-week comparison
  • Invalid week format (400), auth required (401), default week

Docs:

  • README updated with digest endpoint and UI description

API Response Shape

{
  "week": "2026-W08",
  "period": {"start": "2026-02-16", "end": "2026-02-22"},
  "total_spent": 350.0,
  "category_breakdown": {"Food": 150.0, "Transport": 200.0},
  "week_over_week_change": {
    "Food": {"current": 150.0, "previous": 100.0, "change": 50.0, "change_pct": 50.0}
  },
  "trends": ["Top spending category: Transport (200.00)"],
  "insights": ["You spent 75.0% more this week compared to last week."]
}

Closes #121

…8#121)

- Backend: GET /digest/weekly endpoint with category breakdown,
  week-over-week comparison, trends, and smart insights
- Frontend: Digest page with card-based UI, category bars,
  WoW change badges, week navigation
- Tests: 6 test cases covering empty/populated/WoW/auth/validation
- Docs: Updated README with digest endpoint and UI description

Closes rohitdash08#121
@George3307

Copy link
Copy Markdown
Author

✅ All Tests Passing

19 passed in 15.16s

Full test suite (existing + new digest tests) runs clean:

Test File Tests Status
test_auth.py 3 ✅ PASSED
test_bills.py 2 ✅ PASSED
test_categories.py 1 ✅ PASSED
test_dashboard.py 2 ✅ PASSED
test_digest.py 6 ✅ PASSED
test_expenses.py 5 ✅ PASSED

No regressions. All 19 tests pass on Python 3.13 + SQLite (in-memory) + Redis.

@rohitdash08

Copy link
Copy Markdown
Owner

@George3307, just following up on this are you still working on this? Can you please connect over discord to discuss this further? @geekster007

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smart digest with weekly financial summary

2 participants