- Overview
- Key Features
- Tech Stack
- Project Structure
- Getting Started
- Usage
- API Endpoints
- Admin Features
- Deployment
- Screenshots
- Contributing
- License
CAR-RENTAL is a full-featured vehicle rental platform that provides:
- π Extensive car inventory with filters
- π Flexible booking system with date selection
- π Secure user authentication
- π± Responsive design for all devices
- π¨βπΌ Admin dashboard for fleet management
- πΌοΈ Optimized media delivery with ImageKit
Designed to simplify the car rental process for both customers and administrators.
- Browse available cars with filters
- View car details with high-quality images
- Select pickup location and dates
- Manage personal bookings
- User profile management
- Real-time availability checking
- Booking calendar
- Confirmation notifications
- Booking history
- Cancellation option
- Add/Edit/Remove vehicles
- Manage all bookings
- View rental statistics
- User management
- Inventory control
- JWT authentication
- Password encryption
- Protected admin routes
- Image optimization
- Fast loading times
- React with Vite
- Context API for state management
- Axios for HTTP requests
- Tailwind CSS for styling
- React Icons for beautiful icons
- Date-fns for date handling
- Node.js with Express
- MongoDB with Mongoose
- JWT for authentication
- Bcrypt for password hashing
- ImageKit for media management
- Multer for file uploads
- Vercel for frontend hosting
- Render for backend hosting
- GitHub Actions for CI/CD
car-rental/
βββ client/ # Frontend application
β βββ public/ # Static assets
β βββ src/
β β βββ assets/ # Images, icons
β β βββ components/ # Reusable components
β β β βββ owner/ # Admin components
β β β β βββ Login.jsx
β β β β βββ NavbarOwner.jsx
β β β β βββ SideBar.jsx
β β β βββ Banner.jsx
β β β βββ CarCard.jsx
β β β βββ FeaturedSection.jsx
β β β βββ ... # Other components
β β βββ context/ # Global state
β β βββ pages/ # Route pages
β β β βββ owner/ # Admin pages
β β β β βββ AddCar.jsx
β β β β βββ Dashboard.jsx
β β β β βββ ...
β β β βββ CarDetails.jsx
β β β βββ Cars.jsx
β β β βββ Home.jsx
β β βββ ... # Other config files
β
βββ server/ # Backend application
β βββ configs/ # Configuration files
β β βββ db.js # Database config
β β βββ imageKit.js # ImageKit config
β βββ controllers/ # Business logic
β β βββ bookingController.js
β β βββ ownerController.js
β β βββ userController.js
β βββ middleware/ # Middlewares
β β βββ auth.js
β β βββ multer.js
β βββ models/ # Database models
β β βββ Booking.js
β β βββ Car.js
β β βββ User.js
β βββ routes/ # API routes
β β βββ bookingRoutes.js
β β βββ ownerRoutes.js
β β βββ userRoutes.js
β βββ ... # Other server files- Node.js (v18+)
- npm (v9+)
- MongoDB Atlas account or local MongoDB
- ImageKit account (for media storage)
- Clone the repository:
git clone https://github.com/elyse502/car-rental.git
cd car-rental- Install dependencies for both client and server:
# Install client dependencies
cd client && npm install
# Install server dependencies
cd ../server && npm install- Set up environment variables:
Create
.envfiles in bothclientandserverdirectories.
Server (.env)
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key
IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key
IMAGEKIT_URL_ENDPOINT=your_imagekit_endpoint
PORT=5000Client (.env)
VITE_API_BASE_URL=http://localhost:5000- Start the development servers:
# In one terminal (server)
cd server && npm run dev
# In another terminal (client)
cd client && npm run dev- Browse Cars: View available vehicles
- Select Dates: Choose pickup/return dates
- Book Vehicle: Complete booking process
- Manage Bookings: View/cancel reservations
- Login: Access admin dashboard
- Manage Fleet: Add/edit/remove vehicles
- View Bookings: Monitor all reservations
- Analytics: View rental statistics
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register | Register new user |
| POST | /api/auth/login | Login user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/cars | Get all cars |
| POST | /api/cars | Add new car (admin) |
| GET | /api/cars/:id | Get car details |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/bookings | Create new booking |
| GET | /api/bookings/user | Get user bookings |
| DELETE | /api/bookings/:id | Cancel booking |
-
Vehicle Management
- Add new cars with specifications
- Edit existing vehicle details
- Remove vehicles from inventory
-
Booking Oversight
- View all bookings
- Filter bookings by date/status
- Manage booking approvals
-
User Management
- View registered users
- Monitor user activity
- Handle support requests
Deploy to Render, Vercel, or other Node.js hosting services with MongoDB connection.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
For any questions or support, please contact:
- NIYIBIZI ElysΓ©eπ¨πΏβπ» | Github | Linkedin | Twitter.
- Email: elyseniyibizi502@gmail.com
CAR-RENTAL - Your journey starts here! π£οΈβ¨
Made with β€οΈ by ElysΓ©e NIYIBIZI

