A full-stack Expense Tracker web application built with Node.js, Express, MongoDB, and React.
Users can add, view, delete, and summarize their expenses with category breakdown.
- Frontend (React): https://expense-tracker-wheat-seven-72.vercel.app/
- Backend (Express): https://expense-tracker-backend-five-eosin.vercel.app/
- React (Vite)
- Axios (API calls)
- TailwindCSS (styling)
- Node.js + Express
- MongoDB + Mongoose
- dotenv (env management)
- CORS middleware
- Frontend: Vercel
- Backend: Render
- Database: MongoDB Atlas
# Backend
git clone https://github.com/your-username/expense-tracker-backend.git
cd backend
npm install
# Frontend
git clone https://github.com/your-username/expense-tracker-frontend.git
cd frontend
npm install-
Create a
.envfile insideexpense-tracker-backend/MONGO_URI=your_mongo_connection_string PORT=5000
-
Run backend server:
npm start
-
Backend will run at:
http://localhost:5000
-
Update
API_URLinsidesrc/App.jsxwith your backend URL:const API_URL = "http://localhost:5000/api/expenses"; // Local // OR const API_URL = "https://your-backend.onrender.com/api/expenses"; // Deployed
-
Run frontend:
npm run dev
-
Frontend will run at:
http://localhost:5173
- Backend: Deploy to Render (Node service, connect GitHub repo, add
MONGO_URIin env vars). - Frontend: Deploy to Vercel (import GitHub repo, set build command
npm run build, output directorydist).
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/expenses |
Fetch all expenses |
| POST | /api/expenses |
Add a new expense |
| DELETE | /api/expenses/:id |
Delete an expense |
| GET | /api/expenses/summary |
Get category-wise totals |
- Add new expenses with title, amount, category, and date
- View all expenses in a table
- Delete expenses with confirmation
- Category-wise summary (with totals)
- Clean UI with TailwindCSS
- Ready for deployment
- Name: Rudresh
- Role: Engineering Student
- Project: Internship Assignment – Expense Tracker