Mini Expense Tracker with Intelligent Insights
FinTrack is a MERN stack Mini Expense Tracker application designed to help users manage their expenses efficiently while providing intelligent insights into their spending patterns. The app allows users to securely authenticate, add, update, delete, and analyze their expenses with dynamic visualizations.
- Frontend: React.js (Vite) | ShadCN for UI components | Tailwind CSS for styling | Recharts for data visualization
- Backend: Node.js | Express.js | MongoDB (Mongoose ORM)
- Authentication: JWT-based authentication with HTTP-only cookies
- Deployment: Vercel (Frontend) | Render (Backend)
- Secure JWT authentication with HTTP-only cookies
- User registration with First Name, Last Name, Email, Password
- Login and Logout functionality
- Token expiry handling with automatic session refresh
- Middleware-based authentication to protect all routes
- Users can add, update, delete, and view expenses
- Each expense includes:
- Amount (numeric, required)
- Category (Food, Travel, Bills, etc.)
- Date (required)
- Description (optional)
- Expenses are paginated and filterable by date range and category
- Total spending per category
- Percentage distribution of expenses across categories
- Graphical representation using Recharts:
- Category-wise expense breakdown (Bar Chart)
- Most expensive category
- Total expenses over time (Line Chart)
- Expense growth rate over 7, 30, 90 days
- Displays a list of all expenses
- Each expense can be edited or deleted
- Popup UI for each table row with Edit and Delete buttons for quick actions
- Dark & Light mode support πβ¨
- Component-based architecture with reusable UI elements
- ShadCN for sleek UI elements (buttons, modals, tables, form inputs)
- Recharts for interactive charts & insights
- State management with React Hooks
- Responsive design with Tailwind CSS
- RESTful API with Express.js
- Mongoose ORM for MongoDB schema & queries
- Authentication middleware (authMiddleware.js) to protect routes
- JWT authentication using HTTP-only cookies
- Optimized query performance for expense analytics
- User Schema: Stores user details & hashed passwords
- Expense Schema: Stores user expenses linked via
userId - Indexes & query optimizations for faster data retrieval
- Secure token storage in HTTP-only cookies
- Middleware-based access control
- Bcrypt.js for password hashing
- Environment variables for sensitive credentials
- Frontend: Deployed on Vercel for fast & scalable hosting
- Backend: Deployed on Render with an always-on server
- MongoDB: Hosted using MongoDB Atlas
POST /api/auth/registerβ Register a new userPOST /api/auth/loginβ Authenticate user and set JWT in cookiesGET /api/auth/userβ Get authenticated user detailsPOST /api/auth/logoutβ Logout and clear JWT
POST /api/expensesβ Add new expenseGET /api/expensesβ Fetch all expenses (paginated & filterable)GET /api/expenses/expense/:idβ Fetch a single expense (using the expense id)PUT /api/expenses/:idβ Update an existing expenseDELETE /api/expenses/:idβ Delete an expenseGET /api/expenses/insightsβ Fetch analytics (category-wise spending, total expense, growth rate)
- Modular, clean, and well-structured React components & Express routes
- Proper state management & efficient API handling
- Reusable UI components for scalability
- Efficient query handling for spending insights
- Pagination & filtering for expenses to optimize data handling
- Optimized authentication & authorization logic
- Interactive, smooth, and modern UI
- Responsive design across devices
- Smooth user experience with modal popups & transitions
- RESTful API design with structured endpoints
- Middleware-based security for protected routes
- Efficient database schema & indexing for performance
git clone https://github.com/yourusername/fintrack.git
cd fintrackcd backend
npm install
npm startcd frontend
npm install
npm run devβ Add income tracking to balance expenses π° β Implement AI-based insights for smarter expense categorization π§ β Allow exporting data to CSV or Excel π β Enable multi-user support for family/group expenses π
- GitHub: github.com/Mahim-Github
- LinkedIn: linkedin.com/in/mahim-sharma-ab0a23247
- Email: mahims2302@gmail.com
π Hope you like my project! Looking forward to the opportunity! π