As a user, I want to seamlessly access my financial data from any device and easily track my spending and savings goals so that I can better manage my finances.
Description
Integrate MongoDB database to store transaction and goal data. Set up Mongoose models and API routes to handle CRUD operations on the data. Update frontend to fetch data from API routes instead of localStorage by using SWR.
Acceptance Criteria
[ ] User workflow in the app remains unaffected by database integration
[ ] User's transaction and goal information is saved to the database and persisted across sessions
[ ] User is shown appropriate feedback in case of network errors when fetching/updating data
[ ] Input validation added on API routes to prevent incorrect data
Tasks
[ ] Create a new git branch for MongoDB integration
[ ] Install MongoDB Node.js driver and Mongoose ODM
[ ] Install SWR for data fetching in frontend
[ ] Create Mongoose schema and model for transactions
[ ] Create Mongoose schema and model for goals
[ ] Set up environment variables to store sensitive database creds
[ ] Implement GET, POST, PUT, DELETE API routes for transactions and goals models
[ ] Use SWR in components to fetch/update data from API routes
[ ] Remove old localStorage transactions/goals logic
[ ] Add input validation and error handling middleware to API routes
[ ] Make sure no sensitive credentials are exposed
Value Proposition
As a user, I want to seamlessly access my financial data from any device and easily track my spending and savings goals so that I can better manage my finances.
Description
Integrate MongoDB database to store transaction and goal data. Set up Mongoose models and API routes to handle CRUD operations on the data. Update frontend to fetch data from API routes instead of localStorage by using SWR.
Acceptance Criteria
Tasks