Skip to content

Add weekly financial digest endpoint#1031

Open
darshan-Jahagirdar wants to merge 1 commit into
rohitdash08:mainfrom
darshan-Jahagirdar:codex/weekly-financial-digest
Open

Add weekly financial digest endpoint#1031
darshan-Jahagirdar wants to merge 1 commit into
rohitdash08:mainfrom
darshan-Jahagirdar:codex/weekly-financial-digest

Conversation

@darshan-Jahagirdar
Copy link
Copy Markdown

@darshan-Jahagirdar darshan-Jahagirdar commented May 13, 2026

Summary

  • Add GET /insights/weekly-digest for authenticated users
  • Summarize weekly income, expenses, net flow, prior-week comparison, top categories, trend insights, and recommended actions
  • Keep the digest deterministic and usable without paid AI API keys
  • Add focused tests and README documentation

Closes #121

Validation

  • From packages/backend: .\.venv-backend-test\Scripts\python.exe -m pytest tests\test_insights.py -q -k weekly_digest -> 2 passed, 3 deselected
  • From packages/backend: .\.venv-backend-test\Scripts\python.exe -m black --check app\services\digests.py app\routes\insights.py tests\test_insights.py
  • From packages/backend: .\.venv-backend-test\Scripts\python.exe -m flake8 app\services\digests.py app\routes\insights.py tests\test_insights.py
  • python -m py_compile packages\backend\app\services\digests.py packages\backend\app\routes\insights.py packages\backend\tests\test_insights.py
  • git diff --check

Note: the new digest tests mint JWTs directly so they can run locally without Redis; the existing auth fixture in this repo still requires Redis for full-module runs.

/claim #121

@darshan-Jahagirdar
Copy link
Copy Markdown
Author

Validation update for this PR:

python -m compileall -q packages\backend\app
git diff --check

Result: both passed locally.

I also tried the full backend pytest suite in a temporary Python 3.11 virtualenv with packages/backend/requirements.txt installed. That run is blocked in this local environment because auth-dependent tests try to connect to Redis at redis:6379, which is not resolvable here.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smart digest with weekly financial summary

1 participant