A comprehensive expense tracking application built with the MERN stack (MongoDB, Express.js, React.js, Node.js).
- User Authentication - Secure JWT-based authentication
- Dashboard Overview - Visual summary of financial data
- Income Management - Track and categorize income sources
- Expense Management - Monitor and categorize expenses
- Interactive Charts - Pie charts showing expense distribution
- Recent Transactions - Quick view of latest activities
- Export Functionality - Download data as CSV files
- Mobile Responsive - Works on all device sizes
- Real-time Updates - Instant data synchronization
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- JWT - Authentication
- bcryptjs - Password hashing
- React.js - UI library
- React Router - Navigation
- Axios - HTTP client
- Recharts - Chart library
- React Hot Toast - Notifications
- Lucide React - Icons
- Node.js (v14 or higher)
- MongoDB (local or cloud)
- npm or yarn
-
Navigate to backend directory: ```bash cd backend ```
-
Install dependencies: ```bash npm install ```
-
Create
.envfile: ```env PORT=5000 MONGODB_URI=mongodb://localhost:27017/expense-tracker JWT_SECRET=your-super-secret-jwt-key-here NODE_ENV=development ``` -
Start the server: ```bash npm run dev ```
-
Navigate to frontend directory: ```bash cd frontend ```
-
Install dependencies: ```bash npm install ```
-
Start the development server: ```bash npm start ```
From the root directory: ```bash npm run install-deps npm run dev ```
``` mern-expense-tracker/ ├── backend/ │ ├── models/ │ │ ├── User.js │ │ └── Transaction.js │ ├── routes/ │ │ ├── auth.js │ │ └── transactions.js │ ├── middleware/ │ │ └── auth.js │ ├── .env │ ├── server.js │ └── package.json ├── frontend/ │ ├── public/ │ ├── src/ │ │ ├── components/ │ │ ├── contexts/ │ │ ├── pages/ │ │ ├── App.js │ │ ├── index.js │ │ └── index.css │ └── package.json ├── package.json └── README.md ```
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user
GET /api/transactions- Get all user transactionsPOST /api/transactions- Create new transactionPUT /api/transactions/:id- Update transactionDELETE /api/transactions/:id- Delete transactionGET /api/transactions/stats- Get transaction statistics
- Register/Login - Create an account or login with existing credentials
- Dashboard - View your financial overview with summary cards and charts
- Add Income - Navigate to Income page and add your income sources
- Add Expenses - Navigate to Expenses page and categorize your spending
- View Analytics - Check the pie chart for expense distribution
- Export Data - Download your financial data as CSV files
- Manage Transactions - Edit or delete transactions as needed
For testing purposes, you can use:
- Email: demo@example.com
- Password: password123
- 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.
If you encounter any issues or have questions, please create an issue in the repository.