A modern, full-stack rental marketplace platform for renting physical products like clothes, shoes, boots, and accessories. Built with React, Node.js, Express, and MongoDB.
- Browse products by categories with advanced filtering
- Search products by name, brand, or description
- View detailed product information with image gallery
- Check real-time availability before booking
- Book products with date/time selection
- Track booking status (Pending, Confirmed, Completed, Cancelled)
- Leave reviews and ratings after completion
- Wishlist functionality
- Personal dashboard with booking history
- Comprehensive dashboard with statistics and analytics
- Add/Edit/Delete product listings
- Upload multiple product images
- Set rental prices (hourly/daily)
- Manage product availability and time slots
- Handle booking requests (Accept/Reject)
- Track earnings and rental history
- View booking analytics
- JWT-based authentication with role-based access control
- Double-booking prevention with date validation
- RESTful API architecture
- Responsive, mobile-first design
- Smooth animations and hover effects
- Modern gradient-based UI design
- Real-time form validation
- Secure password hashing with bcrypt
- React 18 - UI library
- React Router v6 - Navigation and routing
- Tailwind CSS - Utility-first styling
- Axios - HTTP client
- React Icons - Icon library
- date-fns - Date manipulation
- React DatePicker - Date selection
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM
- JWT - Authentication
- bcryptjs - Password hashing
- CORS - Cross-origin resource sharing
- dotenv - Environment variables
- Node.js (v14 or higher)
- MongoDB (v4.4 or higher)
- npm or yarn
git clone <repository-url>
cd rental-marketplacecd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env with your configuration
# PORT=5000
# MONGODB_URI=mongodb://localhost:27017/rental-marketplace
# JWT_SECRET=your_super_secret_jwt_key
# NODE_ENV=developmentcd frontend
# Install dependencies
npm install
# Optional: Create .env file for custom API URL
echo "REACT_APP_API_URL=http://localhost:5000/api" > .envMake sure MongoDB is running on your system:
# For macOS with Homebrew
brew services start mongodb-community
# For Linux
sudo systemctl start mongod
# For Windows
# Start MongoDB service from Services panel or run mongod.exeTerminal 1 - Backend:
cd backend
npm start
# Server runs on http://localhost:5000Terminal 2 - Frontend:
cd frontend
npm start
# App opens on http://localhost:3000- Visit http://localhost:3000/register
- Choose role: Buyer (to rent items) or Seller (to list items)
- Fill in the registration form
- Login automatically after registration
- Browse products from the homepage or /products page
- Use filters to narrow down search (category, price range)
- Click on a product to view details
- Select rental dates and submit booking request
- Track bookings from the dashboard
- Leave reviews after rental completion
- Access seller dashboard after login
- Click "Add Product" to list new items
- Fill in product details, upload images, set pricing
- Manage incoming booking requests
- Accept/Reject bookings
- Track earnings and statistics
rental-marketplace/
βββ backend/
β βββ controllers/ # Request handlers
β β βββ authController.js
β β βββ productController.js
β β βββ bookingController.js
β β βββ reviewController.js
β βββ models/ # Database schemas
β β βββ User.js
β β βββ Product.js
β β βββ Booking.js
β β βββ Review.js
β βββ routes/ # API routes
β β βββ authRoutes.js
β β βββ productRoutes.js
β β βββ bookingRoutes.js
β β βββ reviewRoutes.js
β βββ middleware/ # Custom middleware
β β βββ auth.js
β βββ server.js # Express app setup
β βββ package.json
β βββ .env.example
β
βββ frontend/
βββ public/
β βββ index.html
βββ src/
β βββ components/ # Reusable components
β β βββ Navbar.js
β β βββ Hero.js
β β βββ Categories.js
β β βββ ProductCard.js
β βββ context/ # React Context
β β βββ AuthContext.js
β βββ pages/ # Page components
β β βββ Home.js
β β βββ Products.js
β β βββ Login.js
β β βββ Register.js
β β βββ seller/
β β β βββ Dashboard.js
β β βββ buyer/
β β βββ Bookings.js
β βββ utils/ # Utilities
β β βββ api.js
β βββ App.js
β βββ index.js
β βββ index.css
βββ package.json
βββ tailwind.config.js
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current userPUT /api/auth/profile- Update user profile
GET /api/products- Get all products (with filters)GET /api/products/featured- Get featured productsGET /api/products/:id- Get single productPOST /api/products- Create product (Seller only)PUT /api/products/:id- Update product (Seller only)DELETE /api/products/:id- Delete product (Seller only)POST /api/products/:id/check-availability- Check availability
POST /api/bookings- Create booking (Buyer only)GET /api/bookings- Get user's bookingsGET /api/bookings/:id- Get single bookingPUT /api/bookings/:id/status- Update booking status (Seller only)PUT /api/bookings/:id/cancel- Cancel booking (Buyer only)GET /api/bookings/stats/dashboard- Get seller statistics
POST /api/reviews- Create review (Buyer only)GET /api/reviews/product/:productId- Get product reviewsGET /api/reviews/my-reviews- Get user's reviews
- Color Scheme: Primary blue (#0ea5e9) with accent purple (#d946ef)
- Typography: Archivo for headings, Inter for body text
- Animations: Smooth transitions, hover effects, fade-in animations
- Responsive: Mobile-first design, works on all screen sizes
- Accessibility: ARIA labels, keyboard navigation, high contrast
- Password hashing with bcryptjs
- JWT token authentication
- Protected routes with role-based access
- Input validation and sanitization
- CORS configuration
- MongoDB injection prevention
- Payment integration (Stripe/PayPal)
- Real-time chat between buyers and sellers
- Email notifications
- Advanced search with Elasticsearch
- Image upload to cloud storage (AWS S3/Cloudinary)
- Social media authentication
- Admin dashboard
- Multi-language support
- Mobile app (React Native)
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For questions or support, please open an issue in the repository.
Built with β€οΈ using React, Node.js, and MongoDB