BoltBike
E-Bike Rental Platform built on Django and React
Install / Use
/learn @manjurulhoque/BoltBikeREADME
E-Bike Rental Platform
A comprehensive peer-to-peer e-bike rental platform built with Django REST Framework and React. This platform allows users to list their e-bikes for rent and discover available e-bikes in their area.
Connect bike owners with renters in a seamless, user-friendly marketplace that makes e-bike sharing accessible to everyone.
📸 Screenshots
Home Page

Bike Details & Booking

Dashboard & Management

Bookings & Reviews

✨ Features
🚴♂️ For Bike Owners
- Easy Bike Listing: Add your e-bike with detailed specifications, photos, and pricing
- Inventory Management: View and manage all your listed bikes in one place
- Status Control: Toggle bike availability (available/unavailable/maintenance)
- Earnings Tracking: Monitor your rental income and booking history
🔍 For Renters
- Advanced Search & Filtering: Find bikes by location, type, price range, and battery range
- Multiple View Modes: Browse bikes in grid, list, or map view
- Detailed Bike Information: View comprehensive bike specs, features, and photos
- Real-time Availability: See which bikes are available for your dates
🛠️ Technical Features
- Responsive Design: Works seamlessly on desktop, tablet, and mobile
- Real-time Updates: Live status updates and notifications
- Secure Authentication: JWT-based user authentication
- RESTful API: Well-documented API with Swagger/OpenAPI
- Image Management: Support for multiple bike photos
- Maintenance System: Track and manage bike maintenance issues
Tech Stack
Backend
- Django 5.2
- Django REST Framework
- PostgreSQL
- JWT Authentication
- Stripe Integration
- AWS S3 (optional)
Frontend
- React 18
- TypeScript
- Tailwind CSS
- Shadcn/ui Components
- React Router
- TanStack Query
- Lucide React Icons
Getting Started
Prerequisites
- Python 3.8+
- Node.js 16+
- PostgreSQL
- Stripe account (for payments) # not added yet
Quick Setup (Recommended)
- Clone the repository:
git clone git@github.com:manjurulhoque/BoltBike.git
cd BoltBike
- Run the automated setup script:
python setup_backend.py
This script will:
- Install all Python dependencies
- Create database migrations
- Apply migrations
- Optionally create a superuser account
- Start the backend server:
cd backend
python manage.py runserver
Manual Backend Setup
If you prefer manual setup or the automated script doesn't work:
- Create and activate a virtual environment:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create and apply migrations:
python manage.py makemigrations
python manage.py migrate
- Create a superuser:
python manage.py createsuperuser
- Run the development server:
python manage.py runserver
The backend API will be available at http://localhost:8000/api/v1/
Frontend Setup
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
- Start the development server:
npm run dev
The frontend will be available at http://localhost:3000
🚀 Usage Guide
For Bike Owners
- Sign up/Login to your account
- List a Bike:
- Click "Rent your e-bike" in the header
- Fill in bike details (title, description, location, pricing)
- Add bike specifications (type, battery range, max speed, weight)
- Upload photos and add features
- Publish your listing
- Manage Your Bikes:
- Visit "My Bikes" to see all your listings
- Toggle availability status
- Edit bike details
- View booking requests
For Renters
- Browse Bikes:
- Visit the "Bikes" page to see all available bikes
- Use filters to narrow down options (type, location, price range)
- Switch between grid, list, and map views
- Search & Filter:
- Search by bike title or description
- Filter by bike type (City, Mountain, Road, etc.)
- Set price and battery range filters
- Sort by price, rating, or newest listings
- View Details:
- Click on any bike to see detailed information
- View photos, specifications, and features
- Check availability and pricing
📚 API Documentation
The API provides comprehensive endpoints for bike management:
Bike Endpoints
GET /api/v1/bikes/- List all bikes with filteringPOST /api/v1/bikes/- Create a new bike listingGET /api/v1/bikes/{id}/- Get bike detailsPATCH /api/v1/bikes/{id}/- Update bike informationDELETE /api/v1/bikes/{id}/- Delete a bikeGET /api/v1/bikes/my-bikes/- Get current user's bikesPOST /api/v1/bikes/{id}/toggle-status/- Toggle bike availability
Available Filters
search- Search in title and descriptionbike_type- Filter by bike typelocation- Filter by locationmin_price/max_price- Price range filteringavailable_only- Show only available bikesowner- Filter by owner (use 'me' for current user)ordering- Sort results (created_at, daily_rate, etc.)
Interactive Documentation
- Swagger UI:
http://localhost:8000/swagger/ - ReDoc:
http://localhost:8000/redoc/
Testing
Backend Tests
cd backend
python manage.py test
Frontend Tests
cd frontend
npm test
Deployment
- Set up a PostgreSQL database
- Configure environment variables for production
- Set up a web server (e.g., Nginx)
- Set up a WSGI server (e.g., Gunicorn)
- Configure SSL certificates
- Set up AWS S3 for media storage (optional)
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
