Skip to content

srshah15/campusride

Repository files navigation

CampusRide

A modern campus vehicle rental platform built with React, TypeScript, and Firebase. Students can easily rent bikes and scooters from their peers, with features like real-time maps, AI-powered descriptions, and comprehensive booking management.

Features

Core Functionality

  • Vehicle Listings: Browse available bikes and scooters with detailed information
  • Smart Search & Filters: Filter by vehicle type and search by name, location, or address
  • Real-time Maps: Interactive maps powered by OpenStreetMap with automatic geocoding
  • Hourly Pricing: Transparent hourly rental rates ($5-15/hour for bikes, $8-20/hour for scooters)
  • Booking System: Complete booking workflow with hour selection and notifications

Map Features

  • Auto-loading Maps: Maps automatically load when viewing vehicle details
  • Geocoding: Automatic address-to-coordinates conversion using OpenStreetMap Nominatim API
  • Interactive View: Browse vehicles on a map with multiple markers
  • Fallback Options: Manual coordinate input and retry options for failed geocoding

AI Integration

  • Smart Descriptions: AI-generated vehicle descriptions using Google Gemini
  • Brand Knowledge: Leverages AI knowledge of bike/scooter brands and models
  • Contextual Pricing: AI suggests competitive hourly rates based on vehicle details
  • One-click Generation: Generate descriptions using all form inputs (name, brand, model, condition, features, location, address)

User Management

  • Authentication: Firebase Authentication with email/password
  • User Profiles: Personalized dashboards for renters and vehicle owners
  • Admin Controls: Admin users can delete any vehicle listing
  • Owner Controls: Users can delete their own vehicle listings

Dashboard Features

  • My Bookings: Track active and completed rentals
  • Notifications: Manage incoming booking requests with accept/reject functionality
  • My Posts: View and manage your vehicle listings
  • History: Complete rental history with pickup locations and hour details
  • Pickup Management: Owners must specify pickup locations when accepting bookings

Modern UI/UX

  • Responsive Design: Works seamlessly on desktop and mobile devices
  • Dark/Light Theme: Consistent theming with shadcn/ui components
  • Loading States: Clear feedback during geocoding and data loading
  • Toast Notifications: Real-time feedback for user actions
  • Professional Design: Clean, modern interface with intuitive navigation

Technology Stack

Frontend

  • React 18 with TypeScript for type-safe development
  • Vite for fast development and building
  • Tailwind CSS for utility-first styling
  • shadcn/ui for consistent, accessible UI components
  • React Router DOM for client-side routing
  • Lucide React for beautiful icons

Backend & Services

  • Firebase Firestore for real-time database
  • Firebase Authentication for user management
  • Firebase Storage for image uploads
  • Google Gemini AI for intelligent content generation
  • OpenStreetMap for mapping and geocoding services

Development Tools

  • ESLint for code linting
  • PostCSS for CSS processing
  • TypeScript for type safety

Usage Guide

For Renters

  1. Browse Vehicles: Use the homepage to view available bikes and scooters
  2. Filter & Search: Use filters to find specific vehicle types or search by location
  3. View Details: Click on any vehicle to see detailed information and map
  4. Book Vehicle: Select dates and hours, then send a booking request
  5. Track Bookings: Monitor your bookings in the dashboard

For Vehicle Owners

  1. List Vehicle: Click "List Your Ride" to add your bike or scooter
  2. AI Description: Use the AI generator to create compelling descriptions
  3. Manage Listings: View and delete your vehicles in "My Posts"
  4. Handle Bookings: Accept or reject booking requests in "Notifications"
  5. Set Pickup: Specify pickup location when accepting bookings

For Admins

  • Login: Use admin@admin.com with password administrator
  • Delete Any Vehicle: Red trash icons appear on all vehicle cards
  • Full Access: Complete administrative control over the platform

Map Features

Automatic Geocoding

  • Addresses are automatically converted to coordinates
  • Uses OpenStreetMap Nominatim API for reliable geocoding
  • Multiple query formats attempted for better results
  • Console logging for debugging geocoding issues

Map Views

  • Individual Vehicle Maps: Show specific vehicle locations
  • Browse Map: View all recent vehicles on a single map
  • Auto-loading: Maps load automatically when viewing vehicle details
  • Fallback Options: Manual coordinate input for failed geocoding

AI Features

Description Generation

The AI system uses Google Gemini to generate compelling vehicle descriptions

Smart Pricing

  • AI suggests competitive hourly rates
  • Considers brand reputation and model quality
  • Typical ranges: $5-15/hour bikes, $8-20/hour scooters
  • Fallback pricing: $8/hour bikes, $12/hour scooters

Deployment

Manual Deployment

  1. Build the project: npm run build
  2. Deploy the dist folder to your hosting service
  3. Configure environment variables in production
  4. Set up Firebase project for production

License

This project is licensed under the MIT License.

Support

For support and questions:

  • Check the console logs for debugging information
  • Review Firebase console for database issues
  • Ensure all environment variables are properly set
  • Verify Firebase project configuration

Recent Updates

  • ✅ Removed daily pricing, now hourly-only
  • ✅ Enhanced AI descriptions with brand knowledge
  • ✅ Auto-loading maps with geocoding
  • ✅ Admin and owner delete functionality
  • ✅ Comprehensive booking system with hour selection
  • ✅ Real-time notifications and pickup management
  • ✅ Responsive design and modern UI components

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages