A full-stack personal finance management application with React frontend and Node.js backend.
- Frontend: React 19 + TypeScript + Vite
A modern, full-stack Personal Finance Management Web App that helps you take control of your money.
With this app, you can add, view, and analyze your daily transactions, manage budgets, and gain insights into your spending patterns using charts powered by Recharts.
- Add & Manage Transactions — Track income and expenses easily.
- Visual Analytics — Dynamic charts to visualize your spending trends.
- Categories & Budgets — Organize transactions by category and set monthly limits.
- Date Filters — View reports for custom date ranges.
- MongoDB Integration — Persistent data storage with Mongoose ORM.
- Modern Stack — React 19 + TypeScript + Vite + Node.js + Express.
- Environment Secure — Configurable
.envfile for sensitive keys. - Scalable Design — Ready for authentication and cloud deployment.
| Layer | Technology |
|---|---|
| Frontend | React 19, TypeScript, Vite, Recharts |
| Backend | Node.js, Express.js |
| Database | MongoDB + Mongoose |
| Styling | TailwindCSS |
| API Test | Postman / Thunder Client |
| Deploy | Vercel / Render / MongoDB Atlas |
git clone https://github.com/dhanush342/Personal-Finance-Tracker.git
cd Personal-Finance-TrackerBackend
cd backend
npm installFrontend
cd ../frontend
npm installCreate a .env file in /backend and add:
MONGODB_URI=mongodb://localhost:27017/finance-tracker
PORT=5000
JWT_SECRET=change_this_to_a_long_random_string
NODE_ENV=developmentCreate .env.local in /frontend and add:
VITE_API_URL=/apiVite dev proxy forwards /api to the backend at http://localhost:5000 (see frontend/vite.config.ts).
cd backend
npm run init-dbThis seeds default income and expense categories.
Start backend and frontend in separate terminals:
Backend
cd backend
npm run devFrontend
cd frontend
npm run devThen open the shown URL (usually http://localhost:3000 or http://localhost:3002).
You can use the helper script to launch everything automatically:
start-app.batThis will:
- Start MongoDB (if running as service)
- Initialize default categories
- Start backend on port 5000
- Start frontend on port 3000 (or pick 3001/3002 if busy)
- Open the app in your browser
Add screenshots of the dashboard, charts, and transaction forms here.
- JWT-based Authentication (login/logout, roles)
- Mobile-friendly responsive UI improvements
- Cloud deployment (Render / Vercel + MongoDB Atlas)
- AI-based expense insights
- Export transactions (CSV, Excel, PDF)
Base URL: http://localhost:5000/api
Transactions
GET /transactions— list (supports category, type, startDate, endDate)POST /transactions— createGET /transactions/:id— get onePUT /transactions/:id— updateDELETE /transactions/:id— deleteGET /transactions/statistics— summary by type and category
Budgets
GET /budgets— list all (optional: month)POST /budgets— createPUT /budgets/:id— updateDELETE /budgets/:id— deleteGET /budgets/status?month=YYYY-MM— spending vs budget
Categories
GET /categories— list allPOST /categories— createPUT /categories/:id— updateDELETE /categories/:id— deletePOST /categories/init/defaults— seed defaults
Backend (from backend/)
npm run dev # start dev server (nodemon)
npm start # start production server
npm run init-db # seed default categories
npm run test-api # quick end-to-end API testFrontend (from frontend/)
npm run dev # start Vite dev server
npm run build # build for production
npm run preview # preview production buildweb/
├─ backend/
│ ├─ controllers/ # Business logic
│ ├─ models/ # Mongoose schemas
│ ├─ routes/ # API endpoints
│ ├─ middleware/ # Auth, error handling
│ ├─ server.js # Express app
│ ├─ initDatabase.js # Seed script
│ ├─ testAPI.js # API smoke test
│ └─ package.json
│
├─ frontend/
│ ├─ components/ # UI components (Dashboard, Summary, etc.)
│ ├─ context/ # Auth context
│ ├─ services/ # API client wrappers
│ ├─ hooks/ # Custom hooks
│ ├─ App.tsx # App routing
│ └─ package.json
│
├─ start-app.bat # Windows quick start
├─ quick-start.bat # Windows install helper
└─ README.md
Port 5000 already in use (backend)
netstat -ano | findstr :5000
taskkill /PID <PID_FROM_PREVIOUS_COMMAND> /F
# then restart: cd backend; npm run devMongoDB not running
- If installed as a Windows service, run PowerShell as Administrator:
Get-Service *mongo*
Start-Service MongoDBHealth check
curl http://localhost:5000/api/health“Failed to fetch” in the browser
- Make sure the backend is running and the health check works.
- Ensure you are logged in; protected routes need a token.
- The frontend uses Vite proxy (
/api->http://localhost:5000).