A modern car rental platform with a React frontend and a Node.js + Express backend.
The system allows users to book cars, track reservations, and enables owners to manage listings, availability, and bookings.
- Register and login with JWT authentication
- Browse available cars
- Book cars with rental details
- Manage and track booking history
- Switch role to owner
- Add, update, and delete car listings
- Toggle car availability
- View dashboard statistics
- Manage customer bookings (approve, cancel, etc.)
- Responsive UI built with TailwindCSS
- Smooth animations using Framer Motion
- Toast notifications for success and error handling
- REST API with role-based access
Frontend (Client)
- React (Vite)
- TailwindCSS
- Framer Motion
- React Context API
- Axios
- react-hot-toast
Backend (Server)
- Node.js
- Express.js
- MongoDB (Mongoose)
- JWT Authentication
- Bcrypt for password hashing
- Multer for file uploads
- CORS enabled
luxury-rent/ │── client/ # React frontend │ ├── src/ │ │ ├── assets/ │ │ ├── components/ │ │ ├── context/ │ │ ├── pages/ │ │ ├── App.jsx │ │ └── main.jsx │ └── package.json │ │── server/ # Node.js backend │ ├── configs/ │ ├── controllers/ │ ├── middlewares/ │ ├── models/ │ ├── routes/ │ ├── server.js │ └── package.json │ └── README.md # Root documentation
git clone https://github.com/dafriyie7/Car-Rental.git
cd Car-Rental
### 2. Setup the server
```bash
cd server
npm installPORT=7000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secretnpm run devcd client
npm installVITE_CURRENCY=USD
VITE_BASE_URL=http://localhost:7000npm run dev