A full-stack personal finance tracking application built with the MERN stack. Track your daily expenses, set monthly budgets, visualize spending patterns, get AI-powered financial insights, and chat with an AI budget advisor.
π Frontend: https://finance-tracker-gray-xi.vercel.app
π§ Backend API: https://financetracker-w0af.onrender.com
β οΈ The backend is hosted on Render's free tier and may take 30-50 seconds to wake up on the first request.
- π Secure Authentication β JWT-based login/signup with bcrypt password hashing
- πΈ Expense Management β Add, edit, and delete daily expenses
- π Smart Categories β 16 predefined categories (Food, Transport, Grocery, etc.)
- π·οΈ Needs vs Wants β Automatically tag every expense to track spending habits
- π Visual Dashboard β Day-wise area charts and category pie charts
- π° Budget Management β Set monthly budgets with health indicators
- π’ Budget Health β Green/Yellow/Red indicator based on spending percentage
- π Expense History β View and analyze expenses from previous months
- π PDF Report Export β Download monthly reports as beautifully formatted PDFs
- π€ AI Expense Categorizer β Auto-categorize expenses using Google Gemini 2.5 Flash
- π Rule-based Fallback β Smart keyword-based categorization when AI is unavailable
- π¬ RAG Budget Advisor Chatbot β Chat with an AI advisor about your spending habits
- π Smart Spending Insights β AI-generated personalized financial insights
- π JWT Authentication with 30-day expiry
- π bcrypt password hashing (salt rounds: 10)
- π‘οΈ Protected API routes with middleware
- π Environment variables for all secrets
| Technology | Purpose |
|---|---|
| React.js | UI Framework |
| React Router DOM | Client-side routing |
| Recharts | Data visualization |
| Axios | HTTP requests |
| jsPDF + jspdf-autotable | PDF report generation |
| React Toastify | Notifications |
| React Icons | Icon library |
| CSS3 | Custom responsive styling |
| Technology | Purpose |
|---|---|
| Node.js | Runtime environment |
| Express.js | Web framework |
| MongoDB Atlas | Cloud NoSQL database |
| Mongoose | MongoDB ODM |
| JWT | Authentication |
| bcryptjs | Password hashing |
| CORS | Cross-origin requests |
| dotenv | Environment variables |
| Technology | Purpose |
|---|---|
| Google Gemini API | LLM inference |
| Gemini 2.5 Flash | Expense categorization, insights, chatbot |
| Rule-based NLP | Fallback categorization |
| Service | Purpose |
|---|---|
| Vercel | Frontend hosting |
| Render | Backend hosting |
| MongoDB Atlas | Cloud database |
FinanceTracker/
βββ backend/
β βββ config/
β β βββ db.js
β βββ middleware/
β β βββ auth.js
β βββ models/
β β βββ User.js
β β βββ Expense.js
β β βββ Budget.js
β βββ routes/
β β βββ auth.js
β β βββ expenses.js
β β βββ budget.js
β β βββ ai.js
β β βββ insights.js
β β βββ chatbot.js
β βββ services/
β β βββ aiCategorizer.js
β β βββ insightsService.js
β β βββ chatbotService.js
β βββ .env
β βββ package.json
β βββ package-lock.json
β βββ server.js
β
βββ frontend/
β βββ public/
β β βββ index.html
β β βββ favicon.ico
β β βββ manifest.json
β β
β βββ src/
β β βββ components/
β β β βββ Auth/
β β β β βββ PrivateRoute.js
β β β βββ Navbar.js
β β β
β β βββ context/
β β β βββ AuthContext.js
β β β
β β βββ pages/
β β β βββ Login.js
β β β βββ Register.js
β β β βββ Dashboard.js
β β β βββ Expenses.js
β β β βββ Budget.js
β β β βββ History.js
β β β
β β βββ utils/
β β β βββ api.js
β β β βββ pdfReport.js
β β β
β β βββ App.js
β β βββ App.css
β β βββ index.js
β β βββ index.css
β β
β βββ package.json
β βββ package-lock.json
β
βββ .gitignore
βββ LICENSE
βββ README.md
- Node.js v18+
- MongoDB (local) or MongoDB Atlas account
- Google Gemini API key
git clone https://github.com/NikithaDineshKumar/FinanceTracker.git
cd FinanceTrackercd backend
npm installCreate a .env file in the backend folder:
PORT=5000
MONGO_URI=mongodb://localhost:27017/financetracker
JWT_SECRET=your_jwt_secret_key
NODE_ENV=development
GEMINI_API_KEY=your_gemini_api_keyStart the backend server:
npm run devOpen a new terminal:
cd frontend
npm install
npm startGo to http://localhost:3000
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
Login user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/expenses |
Get all expenses |
| POST | /api/expenses |
Add new expense |
| PUT | /api/expenses/:id |
Update expense |
| DELETE | /api/expenses/:id |
Delete expense |
| GET | /api/expenses/summary |
Get monthly summary |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/budget |
Get monthly budget |
| POST | /api/budget |
Set/update budget |
| GET | /api/budget/all |
Get all budgets |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/ai/categorize |
AI expense categorization |
| GET | /api/insights |
Get AI spending insights |
| POST | /api/chatbot |
Chat with budget advisor |
Needs: Food β’ Grocery β’ Vegetables β’ Medicine β’ Hospital β’ Milk β’ Current β’ Tuition
Wants: Shopping β’ Transport β’ Cosmetics β’ Dress β’ Service β’ Maid β’ Stationary β’ Other
| Variable | Description |
|---|---|
PORT |
Server port (default: 5000) |
MONGO_URI |
MongoDB connection string |
JWT_SECRET |
Secret key for JWT tokens |
NODE_ENV |
Environment (development/production) |
GEMINI_API_KEY |
Google Gemini API key |
- User authentication (JWT)
- Expense CRUD operations
- Budget management
- Visual charts and dashboard
- Monthly history
- Responsive design with hamburger menu
- AI expense categorizer (Google Gemini 2.5 Flash)
- Rule-based fallback categorizer
- Smart spending insights
- RAG budget advisor chatbot
- PDF report export
- Deploy to Vercel + Render + MongoDB Atlas
This is a personal project but feel free to fork and build on it!
This project is licensed under the MIT License.
Nikitha Dinesh Kumar
- GitHub: @NikithaDineshKumar
β If you found this project helpful, please give it a star!