This project is a full-stack rent-a-car application built with React for the frontend and Express, Node.js, and MongoDB for the backend.
The application allows users to:
- Register and log in
- Browse available cars
- View car details
- Make reservations
- View their reservations
- Rate booked car
- Search through their reservations
Administrators can:
- Edit and delete cars
- Add new cars
- View car details
- Approve users' reservations
- View all clients and reservations
- Search through clients and reservations
- User Authentication: Register, login, logout, and profile management.
- Car Management: View all cars, add new cars, update car details, delete cars, and upload car images.
- Reservation Management: Make reservations, view client-specific reservations, and view all reservations.
- Responsive Design: Optimized for various screen sizes using TailwindCSS.
Register Page | Login Page |
Add Car Page | Edit Car Page |
Clients Page | Reservations Page |
- Node.js
- Express
- MongoDB
- Mongoose
- JWT
- Bcrypt
- Multer
- Other Libraries:
cookie-parser
,cors
,dotenv
,fs
,nodemon
.
- React
- Axios
- React Router
- React Hook Form
- Yup
- Date-fns
- React Icons
- TailwindCSS
- React Hot Toast
POST /api/users/register
- Register a new userPOST /api/users/login
- Login a userPOST /api/users/logout
- Logout a userGET /api/users/profile
- Get user profileGET /api/users
- Get all users (admin)
GET /api/cars
- Get all carsGET /api/cars/:id
- Get a specific carPOST /api/cars/add
- Add a new carPOST /api/cars/upload
- Upload car imagePUT /api/cars/update/:id
- Update car detailsDELETE /api/cars/delete/:id
- Delete a carPOST /api/cars/:id/rating
- Rate a car
GET /api/reservations
- Get all reservationsGET /api/reservations/client-reservations
- Get client-specific reservationsPOST /api/reservations/add/:id
- Add a new reservationPUT /api/reservations/:id/rate
POST /api/reservations/:id/approve
- Approve or decline reservations