A full‑stack MERN expense tracker that lets users sign up / log in, manage categories, add/edit/delete expenses, import expenses from CSV, and view spending breakdowns using interactive charts.
- ✅ Authentication (JWT) – secure sign up / login
- ✅ Categories – create/delete custom categories (unique per user)
- ✅ Expenses CRUD – add, update, delete, list (latest first)
- ✅ CSV Import – bulk-import expenses (auto-creates missing categories)
- ✅ Charts – pie, bar, and line charts of spending
- ✅ Persisted Login – Redux Persist keeps you signed in
Frontend
- React (Vite)
- Redux Toolkit + Redux Persist
- Axios (token interceptor)
- styled-components
- MUI X Charts + MUI Date Pickers
- PapaParse (CSV parsing)
Backend
- Node.js + Express
- MongoDB + Mongoose
- JWT auth
- bcrypt password hashing
cd server
cp .env.example .env
npm install
npm run devServer runs on http://localhost:5100
Health check: GET /health
cd client
cp .env.example .env
npm install
npm run devClient runs on http://localhost:5173
Your CSV should include these headers:
dateStr,description,amount,categoryName
01/15/2026,Coffee,4.75,Food
01/16/2026,Bus pass,112,TransportNotes:
amountmust be numeric- If
categoryNamedoesn't exist yet, it will be created automatically
-
POST /api/auth/signup -
POST /api/auth/login -
GET /api/auth/me -
GET /api/categories -
POST /api/categories -
DELETE /api/categories/:id -
GET /api/expenses -
POST /api/expenses -
PUT /api/expenses/:id -
DELETE /api/expenses/:id -
POST /api/expenses/import/csv
server/
Controllers/
Middleware/
Models/
Routes/
client/
src/
Components/
Pages/
api/
store/