A simple RESTful API for tracking personal expenses. Users can register, log in, manage their expenses, and view spending summaries. Built with Node.js, Express, MongoDB, and JWT for secure authentication.
- User Authentication 🔐: Register and log in with JWT-based authentication.
- Expense Tracking 💸: Add, update, and delete income/expense records.
- Monthly Summary 📅: View total income, expenses, and remaining balance for the month.
- Security 🔒: Password hashing with bcrypt, JWT for authentication.
- Node.js: JavaScript runtime
- Express.js: Web framework for building REST APIs
- MongoDB: Database for storing user and transaction data
- Mongoose: MongoDB Object Data Modeling (ODM)
- JWT: Authentication with JSON Web Tokens
- bcrypt.js: Password hashing
- dotenv: Manage environment variables
-
Clone the repository:
git clone https://github.com/your-username/expense-tracker-api.git cd expense-tracker-api -
Install dependencies:
npm install
-
Configure environment variables:
Create a
.envfile in the root directory:MONGO_URI=your-mongo-database-uri JWT_SECRET=your-jwt-secret PORT=5000
-
Start the server:
npm run dev
-
The server will run on http://localhost:5000.
-
You can test the API using tools like Postman or Insomnia.
We welcome contributions to improve the Expense Tracker API! To contribute:
- Fork the repository.
- Clone your fork to your local machine.
- Create a new branch:
git checkout -b feature/your-feature. - Make your changes and commit:
git commit -m 'Add new feature or fix bug'. - Push to the branch:
git push origin feature/your-feature. - Submit a pull request to the main repository.
For a list of contributors, check out the Contributors section on GitHub.
This project is licensed under the MIT License - see the LICENSE file for details.
For inquiries or support, please contact:
Abhinav
📧 darkbytecodes@gmail.com