This repository was archived by the owner on Jun 19, 2026. It is now read-only.
feat: Goal-based savings tracking & milestones - #165
Open
V1ki wants to merge 1 commit into
Open
Conversation
Track savings goals with progress milestones and contributions. - New SavingsGoal model with target, current amount, deadline, completion status - Full CRUD for goals - Contribution endpoint to add savings towards goals - Auto-completion when target is reached - Progress percentage calculation - 10 test cases covering all functionality API Endpoints: - POST /goals — Create goal - GET /goals — List goals (incomplete first) - GET /goals/:id — Get goal - PATCH /goals/:id — Update goal - POST /goals/:id/contribute — Add contribution - DELETE /goals/:id — Delete goal Closes rohitdash08#133
rohitdash08
suggested changes
Mar 8, 2026
rohitdash08
left a comment
Owner
There was a problem hiding this comment.
@V1ki, the requirement here is user can setup their goals, there can be multiple goals. also have you setup and run the project? tests are failing
| logger = logging.getLogger("finmind.goals") | ||
|
|
||
|
|
||
| def _serialize(g: SavingsGoal) -> dict: |
Owner
There was a problem hiding this comment.
generic use of parameter's name, please change it.
| @bp.post("") | ||
| @jwt_required() | ||
| def create_goal(): | ||
| uid = int(get_jwt_identity()) |
Owner
There was a problem hiding this comment.
not sure how it's helpful while creating multiple goals at the same time, it will override the previous one
| target = data.get("target_amount") | ||
|
|
||
| if not name: | ||
| return jsonify({"error": "name is required"}), 400 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Implements savings goal tracking (#133) with progress milestones and contributions.
Features
API Endpoints
POST /goals— Create goalGET /goals— List (incomplete first)GET /goals/:id— DetailPATCH /goals/:id— UpdatePOST /goals/:id/contribute— Add contributionDELETE /goals/:id— DeleteTests
10 test cases covering CRUD, contributions, auto-complete, validation, auth.
Closes #133
/claim #133