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

Feat/weekly digest - #388

Closed
Suraj-kumar00 wants to merge 2 commits into
rohitdash08:mainfrom
Suraj-kumar00:feat/weekly-digest
Closed

Feat/weekly digest#388
Suraj-kumar00 wants to merge 2 commits into
rohitdash08:mainfrom
Suraj-kumar00:feat/weekly-digest

Conversation

@Suraj-kumar00

@Suraj-kumar00 Suraj-kumar00 commented Mar 13, 2026

Copy link
Copy Markdown

Summary

  • What changed: Added a weekly financial digest feature (Issue Smart digest with weekly financial summary #121) that aggregates 7-day spending data, generates AI-powered intelligence via Gemini (with heuristic fallback), and delivers beautifully formatted personalized HTML summaries via Resend emails.
  • Why: To proactively help users track their financial health, understand their spending trends week-over-week, and stay aware of upcoming bills without needing to log into the dashboard daily.

Validation

  • Frontend lint: cd app && npm run lint (N/A - Backend only feature)
  • Frontend tests: cd app && npm test -- --runInBand (N/A - Backend only feature)
  • Backend tests: ./scripts/test-backend.ps1 (35/35 passing, 100% clean)
  • Updated docs if needed

Security and Ownership

  • PR opened from a fork (not direct push to main)
  • CODEOWNERS review requested

Checklist

  • No secrets added
  • No unrelated files changed
  • Breaking changes documented

Implementation Details:

  • Endpoints: GET /digest/weekly, GET /digest/weekly/history, POST /digest/weekly/send?week_start=YYYY-MM-DD
  • Idempotency: Unique DB constraint avoids duplicate digests for the same (user_id, week_start).
  • Email: Migrated to Resend SDK for primary email delivery (HTML supported), with SMTP fallback.
  • Cache: Redis 1-hour TTL implemented for the GET endpoint.

Files Changed:

New:

  • packages/backend/app/services/digest.py
  • packages/backend/app/routes/digest.py
  • packages/backend/tests/test_digest.py

Modified:

  • packages/backend/app/models.py
  • packages/backend/app/db/schema.sql
  • packages/backend/app/init.py
  • packages/backend/app/routes/init.py
  • packages/backend/app/services/reminders.py
  • packages/backend/app/config.py
  • packages/backend/requirements.txt
  • packages/backend/app/openapi.yaml
  • README.md
  • .env.example

Video Walkthrough

To be added...

Screenshots / API response

GET /digest/weekly (sample response)
FinMind  weekly financial digest

/claim #121

from flask import Blueprint, jsonify, request
from flask_jwt_extended import jwt_required, get_jwt_identity

from ..extensions import db

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the imports throughout instead of using .. use the package name instead

@rohitdash08

Copy link
Copy Markdown
Owner

Closing this one as the contributor didn't accept the terms.

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.

2 participants