VroomRent is an API designed to manage car rental services. It provides endpoints for handling various operations such as booking rentals, managing cars, and handling user profiles. This project is built using Node.js and Express, with MongoDB as the database.
- User Authentication: Secure user login and registration using JWT.
- Car Management: Add, update, delete, and view cars available for rent.
- Booking System: Users can book cars for specific dates.
- Admin Panel: Admin users can manage cars and view all bookings.
- Clone the repository:
git clone https://github.com/abdul-nishar/VroomRent.git
- Navigate to the project directory:
cd VroomRent
- Install dependencies:
npm install
- Set up environment variables:
- Create a .env file in the root directory.
- Add the following variables:
PORT=5000 MONGO_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret
- Start the server:
npm start
- The API documentation is available here.
- The server runs on
http://localhost:5000
by default.
- POST
/api/users/register
: Register a new user. - POST
/api/users/login
: Log in a user.
- GET
/api/cars
: View all available cars. - POST
/api/cars
: Add a new car (Admin only).
- POST
/api/bookings
: Book a car. - GET
/api/bookings/user
: View a user's bookings.
Feel free to fork this repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.