A full-stack expense tracking application built with React, Node.js, and MongoDB. Track your daily and monthly expenses with detailed visualizations and category-wise analysis.
- 🔐 User Authentication with JWT
- 📊 Interactive Charts & Visualizations
- Pie charts showing expense distribution by category
- Horizontal bar charts for category comparison
- Percentage-based expense analysis
- 💰 Expense Management
- Add, edit, and delete expenses
- Categorize expenses
- Add notes and payment methods
- 📅 Time-based Analysis
- Daily expense tracking
- Monthly summaries
- Historical data view
- 📱 Responsive Design
- Works on desktop and mobile devices
- Clean, modern interface
- React with Vite
- TailwindCSS for styling
- Recharts for data visualization
- Axios for API requests
- React Router for navigation
- Node.js & Express
- MongoDB for database
- JWT for authentication
- Cors for cross-origin requests
- Node.js (v14 or higher)
- MongoDB installed and running
- Git
- Clone the repository:
git clone https://github.com/Deepak06-v/expense-tracker.git
cd expense-tracker- Install frontend dependencies:
# Make sure you're in the expense-tracker root folder
npm install- Install backend dependencies:
# From the expense-tracker root folder
cd backend
npm install- Environment Variables Setup:
- In the backend folder, you'll find
.env.example - Create a new file named
.envin the same backend folder - Copy the content from
.env.exampleand add your credentials - You'll need:
- MongoDB URI (database connection string)
- JWT secret (for authentication)
- If you need help with credentials:
- DM me on GitHub (@Deepak06-v) for the actual credentials
- Or set up your own MongoDB cluster at MongoDB Atlas
- In the backend folder, you'll find
- Start the backend server:
# Make sure you're in the expense-tracker/backend folder
cd backend # if you're in the root folder
npm run dev- In a new terminal, start the frontend:
# Make sure you're in the expense-tracker root folder
# If you're in backend folder, first do:
cd ..
npm run dev- Visit
http://localhost:5173in your browser
- Frontend commands (npm run dev) must be run from the expense-tracker root folder
- Backend commands (npm run dev) must be run from the expense-tracker/backend folder
- Always check your terminal path before running commands!
- The .env file must be in the backend folder
- If you get MongoDB connection errors, make sure your .env file has the correct MONGODB_URI
- For credential issues or demo access, feel free to reach out to me on GitHub (@Deepak06-v)
- Make sure both backend (port 3000) and frontend (port 5173) servers are running
- POST
/user/signup- Register new user - POST
/user/login- User login
- GET
/expense- Get all expenses - GET
/expense/current-month- Get current month expenses - GET
/expense/daily- Get daily expenses - POST
/expense/add- Add new expense - PUT
/expense/:id- Edit expense - DELETE
/expense/:id- Delete expense
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.