feat: Goal-based savings tracking & milestones (#133)#619
Open
DeekRoumy wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: Goal-based savings tracking & milestones (#133)#619DeekRoumy wants to merge 1 commit intorohitdash08:mainfrom
DeekRoumy wants to merge 1 commit intorohitdash08:mainfrom
Conversation
Implements full goal savings tracking feature:
Backend (Flask/SQLAlchemy):
- SavingsGoal, SavingsMilestone, SavingsDeposit models
- Full CRUD endpoints at /goals (list, create, get, update, delete)
- Deposit endpoint POST /goals/{id}/deposit with auto milestone detection
- GET /goals/{id}/deposits — deposit history
- POST /goals/{id}/milestones — add custom milestone
- DELETE /goals/{id}/milestones/{id} — remove milestone
- Auto-generated 25/50/75/100% milestones on goal creation
- Goal auto-completes (status=COMPLETED) when target reached
- Status filter: GET /goals?status=active
- Full user isolation (users cannot see each other's goals)
DB:
- savings_goals, savings_milestones, savings_deposits tables added to schema.sql
Tests (21 passing):
- Full CRUD coverage
- Deposit accumulation & auto-completion
- Milestone reached detection on deposit
- Deposit blocked for cancelled goals
- User isolation between accounts
- fakeredis patch for CI-friendly testing (no real Redis needed)
Resolves rohitdash08#133
Author
|
Hi! Just checking in on this PR — it's been over 12 hours since submission. Happy to address any feedback or make adjustments if needed. Looking forward to your review! 🙏 |
Author
|
Hi again! Just checking in — it's now been about 36 hours since the last follow-up. This PR implements goal-based savings tracking as requested in issue #133 and is merge-ready. Happy to make any adjustments if needed. Thanks for your consideration! 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #133
Implements full goal-based savings tracking with milestone detection.
What's included
Backend (Flask + SQLAlchemy)
New models ():
SavingsGoal— name, target_amount, current_amount, currency, deadline, statusSavingsMilestone— label, target_pct (0–100), reached, reached_atSavingsDeposit— amount, note, deposited_atNew endpoints (
/goals):/goals?status=filter)/goals/goals/{id}/goals/{id}/goals/{id}/goals/{id}/deposit/goals/{id}/deposits/goals/{id}/milestones/goals/{id}/milestones/{ms_id}DB migration (
app/db/schema.sql):savings_goals,savings_milestones,savings_depositstablesTests (21 passing, all existing 22 still pass)
fakeredisfor CI-friendly testing (no real Redis required)Acceptance Criteria