Skip to content

feat: smart weekly financial digest with trends and insights#359

Open
CorradoZDeLuca wants to merge 2 commits intorohitdash08:mainfrom
CorradoZDeLuca:feat/weekly-digest-121
Open

feat: smart weekly financial digest with trends and insights#359
CorradoZDeLuca wants to merge 2 commits intorohitdash08:mainfrom
CorradoZDeLuca:feat/weekly-digest-121

Conversation

@CorradoZDeLuca
Copy link

Summary

Implements the Smart Digest with Weekly Financial Summary requested in #121:

  • GET /digest/weekly — Full weekly summary with spending/income totals, week-over-week comparison, top categories, daily breakdown, upcoming bills, and auto-generated insights
  • GET /digest/weekly/history — Multi-week digest history (default 4, max 12 weeks)

Smart Insights Engine

Auto-generates actionable insights: spending increase warnings, savings celebrations, top category alerts, upcoming bill reminders, and no-data prompts.

Tests

26 tests covering auth, calculations, date validation, empty data, history pagination, and audit logging.

Checklist

  • Follows existing code style and patterns
  • All endpoints require JWT authentication
  • Tests included for all acceptance criteria
  • No new dependencies added
  • Production-ready implementation

/claim #121

Closes #121

CorradoZDeLuca and others added 2 commits March 10, 2026 12:40
Implements three endpoints under /gdpr:

- GET /gdpr/export — collects all user-linked data (profile, categories,
  expenses, recurring expenses, bills, reminders, subscriptions) into a
  structured JSON response. Excludes password_hash. Logs a PII_EXPORT
  audit event.

- POST /gdpr/delete — permanently deletes the user account after password
  re-verification. Leverages existing ON DELETE CASCADE foreign keys to
  remove all associated records. Audit log entry survives via ON DELETE
  SET NULL, preserving compliance records after deletion.

- GET /gdpr/audit — returns the authenticated user's audit trail sorted
  by most recent first.

Includes 18 tests covering: auth guards, export completeness, password
verification, cascade deletion, audit log persistence, and edge cases.

Closes rohitdash08#76
…sh08#121)

- GET /digest/weekly — full weekly summary with spending/income totals,
  week-over-week comparison, top categories, daily breakdown, upcoming
  bills, and auto-generated insights
- GET /digest/weekly/history — multi-week history (up to 12 weeks)
- 26 tests covering auth, calculations, date validation, empty data,
  history pagination, and audit logging
- Smart insights engine: spending trend warnings, savings celebrations,
  top category alerts, upcoming bill reminders
- Follows existing codebase patterns (Flask Blueprint, jwt_required, SQLAlchemy)
- No new dependencies

/claim rohitdash08#121

Closes rohitdash08#121

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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