A full‑stack Expense Tracker application built with the MERN stack, featuring secure authentication, income & expense management, analytics dashboards, charts, file uploads, and data export functionality.
This repository follows a monorepo architecture, where the backend and frontend live in separate folders but are maintained in a single codebase.
- JWT‑based authentication
- Secure login & signup
- Protected routes
- User session restoration on refresh
- Add, view, delete income entries
- Emoji/icon picker for income source
- Income overview with bar & pie charts
- Download income data as Excel
- Add, view, delete expense entries
- Expense categorization
- Expense overview & recent transactions
- Download expense data as Excel
- Total balance calculation
- Last 30 days expenses (bar chart)
- Last 60 days income (pie & bar charts)
- Recent income & expense activity
- Interactive charts using Recharts
- Profile image upload support
- Multer‑based local file handling
- Node.js
- Express (ES Modules)
- MongoDB + Mongoose
- JWT Authentication
- Cloudinary (file uploads)
- Multer (file uploads)
- bcrypt (password hashing)
- xlsx (Excel export)
- React (Vite)
- React Router DOM
- Tailwind CSS
- Axios
- Recharts
- Emoji Picker React
- Moment.js
expense-tracker/
│
├── backend/
│ ├── config/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── uploads/
│ ├── server.js
│ └── package.json
│
└── frontend/
├── public/
├── src/
│ ├── components/
│ ├── context/
│ ├── hooks/
│ ├── pages/
│ ├── utils/
│ ├── App.jsx
│ └── main.jsx
└── package.json
Create a .env file in the backend folder:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY= your_cloduinary_api_key
CLOUDINARY_API_SECRET= your_cloudinary_api_secret
No environment variables are required by default.
(If you deploy later, you can add VITE_API_BASE_URL.)
git clone https://github.com/Sarg3n7/expense-tracker.git
cd expense-trackercd backend
npm install
npm run devBackend will run on:
http://localhost:5000
cd frontend
npm install
npm run devFrontend will run on:
http://localhost:5173
| Feature | Endpoint |
|---|---|
| Auth | /api/v1/auth |
| Dashboard | /api/v1/dashboard |
| Income | /api/v1/income |
| Expense | /api/v1/expense |
| Uploads | /uploads |
(All protected routes require JWT in Authorization header.)
npm run dev # Development (nodemon)
npm start # Productionnpm run dev
npm run build
npm run previewContributions are welcome!
- Fork the repository
- Create a new branch
git checkout -b feature/your-feature-name
- Commit your changes
git commit -m "Add: meaningful message" - Push to your fork
git push origin feature/your-feature-name
- Open a Pull Request
- Dark / Light theme toggle
- Cloud storage for uploads (S3 / Cloudinary)
- Monthly & yearly reports
- Budget limits & alerts
- CSV export support
- Deployment with Docker
This project is open‑source and available under the MIT License.
Built with ❤️ by Shashwat Shivam.
Github: https://github.com/Sarg3n7