From b52d81094b2c7f7773907bfa4327410da5df9847 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 10 Mar 2026 00:47:32 +0100 Subject: [PATCH] feat(app): implement dedicated savings goals page with milestones and smart insights --- app/src/App.tsx | 9 ++ app/src/components/layout/Navbar.tsx | 1 + app/src/pages/Goals.tsx | 211 +++++++++++++++++++++++++++ 3 files changed, 221 insertions(+) create mode 100644 app/src/pages/Goals.tsx diff --git a/app/src/App.tsx b/app/src/App.tsx index f0dc594..fb337b4 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -6,6 +6,7 @@ import { BrowserRouter, Routes, Route } from "react-router-dom"; import { Layout } from "./components/layout/Layout"; import { Dashboard } from "./pages/Dashboard"; import { Budgets } from "./pages/Budgets"; +import { Goals } from "./pages/Goals"; import { Bills } from "./pages/Bills"; import { Analytics } from "./pages/Analytics"; import Reminders from "./pages/Reminders"; @@ -51,6 +52,14 @@ const App = () => ( } /> + + + + } + /> +
+
+
+

Savings Goals

+

+ Plan, track, and achieve your financial milestones +

+
+
+ +
+
+
+ +
+
+ {savingsGoals.map((goal) => { + const percentage = (goal.current / goal.target) * 100; + return ( + + +
+
+
+ +
+
+ {goal.title} + {goal.category} • Target: ${goal.target.toLocaleString()} +
+
+ + {goal.status.replace('-', ' ')} + +
+
+ +
+ {/* Progress Bar */} +
+
+ ${goal.current.toLocaleString()} saved + {percentage.toFixed(0)}% Complete +
+
+
+
+
+ + {/* Milestones */} +
+

+ + Milestones +

+
+ {goal.milestones.map((m, idx) => ( +
+
+ + ${m.amount.toLocaleString()} + + {m.completed ? ( + + ) : ( + + )} +
+ + {m.name} + +
+ ))} +
+
+
+ +
+
+ + Deadline: {new Date(goal.deadline).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })} +
+ +
+ + ); + })} +
+ + {/* Sidebar Summary */} +
+ + + Total Savings + + +
+
+
+ +
+
+
$20,450
+
Across 3 active goals
+
+
+ +
+
+ Monthly Contribution + $1,450.00 +
+
+ Remaining for Goals + $44,050.00 +
+
+
+
+
+ + + + Smart Insights + + +

+ Based on your current savings rate, you'll reach your **New Loft Deposit** goal by **October 2026** (2 months later than planned). +

+ +
+
+
+
+
+ ); +}