feat: Smart weekly financial digest with trends & insights#658
Open
chengyixu wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: Smart weekly financial digest with trends & insights#658chengyixu wants to merge 1 commit intorohitdash08:mainfrom
chengyixu wants to merge 1 commit intorohitdash08:mainfrom
Conversation
…itdash08#121) Implement a comprehensive weekly financial summary digest feature: Backend: - GET /digest/weekly endpoint with ISO week (YYYY-Wnn) and currency params - Weekly income/expense/savings totals with transaction counts - Week-over-week comparison (income, expenses, savings change %) - Per-category breakdown with share percentages and transaction counts - Daily spending pattern (Monday through Sunday) - Trend analysis: UP/DOWN/FLAT/NEW/GONE per category - Upcoming bills alert for next 7 days after digest period - Smart insights engine: savings rate, spending spikes, category anomalies, dominant category warnings, peak spending day, no-spend days, bill alerts - Redis caching (10-min TTL) for performance - Currency filtering support (?currency=EUR) Frontend: - TypeScript API client with full type definitions - Digest page with week navigation (prev/next), summary cards, daily spending bar chart, category breakdown with progress bars, trend badges (UP/DOWN/FLAT/NEW/GONE), color-coded insight cards, and upcoming bills list - Route and navbar integration Tests: - 16 comprehensive test cases covering auth, empty state, income/expenses, category breakdown, daily patterns, week-over-week, trend analysis, insight generation, upcoming bills, currency filter, week validation, and response shape verification Documentation: - OpenAPI 3.0 spec updated with full schema and examples /claim rohitdash08#121 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Implements a comprehensive weekly financial digest feature that generates smart summaries with spending breakdowns, week-over-week trend analysis, daily patterns, and actionable insights — all without requiring an LLM.
/claim #121
What's Included
Backend (
GET /digest/weekly)?week=YYYY-Wnnfor specific weeks,?currency=EURfor currency filteringFrontend (
/digestpage)Tests (16 test cases)
test_digest_requires_authtest_digest_empty_statetest_digest_with_income_and_expensestest_digest_category_breakdowntest_digest_daily_spending_patterntest_digest_week_over_weektest_digest_trend_analysistest_digest_insights_savings_ratetest_digest_insights_spending_spiketest_digest_insights_no_spend_daystest_digest_upcoming_billstest_digest_currency_filtertest_digest_specific_weektest_digest_invalid_week_formattest_digest_week_out_of_rangetest_digest_response_shapeDocumentation
/digest/weeklyFiles Changed
packages/backend/app/services/digest.pypackages/backend/app/routes/digest.pypackages/backend/app/routes/__init__.pypackages/backend/tests/test_digest.pypackages/backend/app/openapi.yamlapp/src/api/digest.tsapp/src/pages/Digest.tsxapp/src/App.tsx/digestrouteapp/src/components/layout/Navbar.tsxTest plan
GET /digest/weeklyreturns valid digest with test dataGET /digest/weekly?week=2026-W13returns correct week dataGET /digest/weekly?currency=USDfilters by currencyGET /digest/weekly?week=badreturns 400🤖 Generated with Claude Code