An Expense Tracker application built using the MERN (MongoDB, Express.js, React, Node.js) stack. This app helps users track their income and expenses with an intuitive interface and real-time updates.
- User authentication (JWT-based login/register)
- Add, edit, and delete expenses/income
- Categorize transactions
- View expense history
- Interactive dashboard with charts
- Responsive design
- Frontend: React, Redux Toolkit, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB, Mongoose
- Authentication: JSON Web Tokens (JWT)
Ensure you have the following installed:
- Node.js (latest stable version)
- MongoDB (local or cloud-based Atlas instance)
-
Clone the repository:
git clone https://github.com/your-username/expense-tracker-mern.git cd expense-tracker-mern
-
Install dependencies:
# Backend cd backend npm install
# Frontend cd ../frontend npm install
-
Setup Environment Variables: Create a
.env
file in the backend directory and add:MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_secret_key PORT=5000
-
Run the application:
# Start backend server cd backend npm start
# Start frontend server cd frontend npm start
POST /api/auth/register
- Register a new userPOST /api/auth/login
- Login user
GET /api/transactions
- Get all transactionsPOST /api/transactions
- Add a new transactionPUT /api/transactions/:id
- Update a transactionDELETE /api/transactions/:id
- Delete a transaction
This project is licensed under the MIT License.