Skip to content

feat: goal-based savings tracking & milestones (#133)#688

Open
zacharylyonstx wants to merge 1 commit intorohitdash08:mainfrom
zacharylyonstx:feat/savings-goals-milestones
Open

feat: goal-based savings tracking & milestones (#133)#688
zacharylyonstx wants to merge 1 commit intorohitdash08:mainfrom
zacharylyonstx:feat/savings-goals-milestones

Conversation

@zacharylyonstx
Copy link
Copy Markdown

Summary

Implements Goal-based savings tracking & milestones as described in #133.

Backend (Flask)

  • SavingsGoal, SavingsGoalMilestone, SavingsGoalContribution models
  • CRUD endpoints: GET/POST /savings-goals, GET/PUT/PATCH/DELETE /savings-goals/<id>
  • POST /savings-goals/<id>/contribute with milestone auto-detection
  • GET /savings-goals/<id>/milestones
  • Auto-generated milestones at 25%, 50%, 75%, 100%
  • Progress calculation and time-based projections (daily/monthly targets)
  • Input validation with descriptive error messages
  • PostgreSQL schema migration in schema.sql

Frontend (React)

  • SavingsGoals page with overview cards (total saved, active, completed, progress)
  • Goal list with progress bars, milestone dot indicators, category badges
  • Create/edit goal dialog with name, target, deadline, category
  • Contribute to goal modal with amount and optional note
  • Visual milestone celebration overlay with animations
  • Navigation link added to Navbar
  • Route added to App.tsx with ProtectedRoute wrapper

Tests

  • 6 backend unit tests covering CRUD, contributions, milestones, validation, 404s
  • 6 frontend integration tests covering rendering, empty state, progress, milestones
  • All 33 frontend tests pass, backend tests pass

Closes #133

Backend (Flask):
- SavingsGoal, SavingsGoalMilestone, SavingsGoalContribution models
- CRUD endpoints: GET/POST /savings-goals, GET/PUT/PATCH/DELETE /savings-goals/<id>
- POST /savings-goals/<id>/contribute with milestone auto-detection
- GET /savings-goals/<id>/milestones
- Auto-generated milestones at 25%, 50%, 75%, 100%
- Progress calculation and time-based projections (daily/monthly targets)
- Input validation with descriptive error messages
- PostgreSQL schema migration in schema.sql

Frontend (React):
- SavingsGoals page with overview cards (total saved, active, completed, progress)
- Goal list with progress bars, milestone dot indicators, category badges
- Create/edit goal dialog with name, target, deadline, category
- Contribute to goal modal with amount and optional note
- Visual milestone celebration overlay with animations
- Navigation link added to Navbar
- Route added to App.tsx with ProtectedRoute wrapper

Tests:
- 6 backend unit tests covering CRUD, contributions, milestones, validation, 404s
- 6 frontend integration tests covering rendering, empty state, progress, milestones
- All 33 frontend tests pass, backend tests pass in CI (requires Redis)
@zacharylyonstx
Copy link
Copy Markdown
Author

@rohitdash08 Savings Goals feature is ready for review — complete with milestones, backend CRUD, React dashboard, and tests. Happy to iterate on any feedback! 🙏

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Goal-based savings tracking & milestones

1 participant