feat: Add savings goals with milestones tracking (#133) - #158
Conversation
Implements goal-based savings tracking functionality: - SavingsGoal and SavingsMilestone models - API endpoints for CRUD operations on goals - Milestone management within goals - Contribution endpoint to add money to goals - Auto-completion when target is reached - Progress tracking with percentage calculation /claim rohitdash08#133
rohitdash08
left a comment
There was a problem hiding this comment.
this solution need to be reworked, @ryantryor please review the comments also please run the test cases before submitting the rework.
| created_at TIMESTAMP NOT NULL DEFAULT NOW() | ||
| ); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS household_members ( |
There was a problem hiding this comment.
it will create conflicts with the other requirements which we are having related to multiple user using the same dashboard please remove the household members if not required.
| app.register_blueprint(categories_bp, url_prefix="/categories") | ||
| app.register_blueprint(docs_bp, url_prefix="/docs") | ||
| app.register_blueprint(dashboard_bp, url_prefix="/dashboard") | ||
| app.register_blueprint(households_bp, url_prefix="/households") |
There was a problem hiding this comment.
Let's keep it to savings scope only.
| target_amount = data.get("target_amount") | ||
| currency = data.get("currency", "INR") | ||
| deadline = data.get("deadline") | ||
| icon = data.get("icon") |
There was a problem hiding this comment.
not sure where the icon is coming from, keep create_goal simple user can easily add the name of the goal and the amount and the deadline currency should be default not dynamic.
| color = data.get("color") | ||
|
|
||
| if not name: | ||
| return jsonify({"error": "Goal name is required"}), 400 |
There was a problem hiding this comment.
it should be 412 instead of 400
|
@ryantryor, will be closing this one if no response withing 48 hours. |
Summary
Implements Goal-based Savings Tracking feature as requested in #133.
Users can now create savings goals, track progress, and set milestones!
Features
Savings Goals
Milestones
API Endpoints
/savings/goals/savings/goals/savings/goals/<id>/savings/goals/<id>/savings/goals/<id>/savings/goals/<id>/contribute/savings/goals/<id>/milestones/savings/goals/<id>/milestones/<mid>Changes
SavingsGoal,SavingsMilestonesavings_goalsandsavings_milestonestablesTesting
All code syntax validated:
/claim #133