Skip to content

feat: add goal-based savings tracking (#133)#461

Closed
sinatragian wants to merge 1 commit intorohitdash08:mainfrom
sinatragian:feat/goal-based-savings
Closed

feat: add goal-based savings tracking (#133)#461
sinatragian wants to merge 1 commit intorohitdash08:mainfrom
sinatragian:feat/goal-based-savings

Conversation

@sinatragian
Copy link

Summary

Implements goal-based savings tracking with full CRUD API and contribution tracking.

Problem

Users had no way to set savings goals, track progress, or contribute incrementally toward financial targets.

Solution

Added SavingsGoal model and REST endpoints for creating/managing goals with auto-completion when target is reached.

Files changed

File Change
packages/backend/app/models.py Added SavingsGoal model and SavingsGoalStatus enum
packages/backend/app/routes/savings.py Full CRUD routes + contribute endpoint
packages/backend/app/routes/__init__.py Registered savings blueprint at /savings/goals
packages/backend/app/db/schema.sql Added savings_goals table DDL
packages/backend/tests/test_savings.py 15 tests covering all endpoints and edge cases

API Endpoints

Method Endpoint Description
POST /savings/goals Create new goal
GET /savings/goals List all goals with progress %
GET /savings/goals/<id> Get single goal
PUT /savings/goals/<id> Update goal
DELETE /savings/goals/<id> Delete goal
POST /savings/goals/<id>/contribute Add money to goal

Acceptance Criteria

  • Create savings goal with name, target amount, deadline
  • Track current amount vs target (progress_pct field)
  • Add contributions to a goal (auto-completes when target reached)
  • List all goals with progress percentage
  • Update and delete goals
  • Production-ready with proper error handling and logging
  • 15 tests covering all endpoints, edge cases, and user isolation
  • Passes black/flake8/bandit linting

/claim #133

Closes #133

@sinatragian
Copy link
Author

Closing in favor of #391 which is more complete — includes milestone model, 31 tests, and full documentation.

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.

Goal-based savings tracking & milestones

1 participant