A modern, full-stack ride-sharing application built with Next.js, Firebase, and Google Maps API. Connect with travelers heading your way for smart, affordable, and eco-friendly transportation.
- User Authentication - Secure signup/login with Firebase Auth
- Real-time Ride Matching - Find and offer rides in real-time
- Interactive Maps - Google Maps integration for location services
- Responsive Design - Beautiful UI that works on all devices
- Real-time Notifications - Stay updated with ride requests and messages
- Eco-friendly Tracking - Monitor your carbon footprint reduction
- Rating System - Build trust with driver/passenger ratings
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS, Radix UI Components
- Backend: Firebase (Auth, Firestore, Storage)
- Maps: Google Maps JavaScript API
- State Management: React Context API
- Deployment: Vercel (recommended)
Before you begin, ensure you have the following installed:
- Node.js 18+
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/yourusername/ridematch.git cd ridematch -
Install dependencies
npm install # or yarn install -
Set up environment variables
cp env.example .env.local
-
Configure Firebase
- Go to Firebase Console
- Create a new project
- Enable Authentication (Email/Password)
- Create a Firestore database
- Get your project configuration
-
Configure Google Maps API
- Go to Google Cloud Console
- Create a new project or select existing
- Enable these APIs:
- Maps JavaScript API
- Geocoding API
- Directions API
- Places API (optional)
- Create an API key
-
Update environment variables Edit
.env.localand add your configuration:# Firebase Configuration NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id # Google Maps API Key NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_api_key
-
Development mode
npm run dev # or yarn dev -
Build for production
npm run build npm start
-
Open your browser Navigate to http://localhost:3000
RideMatch/
├── app/ # Next.js app directory
│ ├── auth/ # Authentication pages
│ ├── dashboard/ # Main dashboard
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # Reusable components
│ ├── ui/ # UI components (Radix)
│ ├── Header.tsx # Navigation header
│ ├── RideMap.tsx # Interactive map component
│ └── ProtectedRoute.tsx # Auth protection wrapper
├── lib/ # Utility libraries
│ ├── firebase.ts # Firebase configuration
│ ├── auth.ts # Authentication functions
│ ├── rides.ts # Ride management functions
│ ├── maps.ts # Google Maps utilities
│ └── utils.ts # General utilities
├── types/ # TypeScript type definitions
├── contexts/ # React contexts
└── public/ # Static assets
- In Firebase Console, go to Authentication
- Enable Email/Password sign-in method
- Set up password reset (optional)
- Create a Firestore database
- Set up security rules:
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { // Users can read/write their own data match /users/{userId} { allow read, write: if request.auth != null && request.auth.uid == userId; } // Rides can be read by all authenticated users, written by owners match /rides/{rideId} { allow read: if request.auth != null; allow write: if request.auth != null && request.auth.uid == resource.data.driverId; } // Ride requests match /rideRequests/{requestId} { allow read, write: if request.auth != null; } } }
- Enable Firebase Storage
- Set up storage rules for profile pictures
-
Enable APIs in Google Cloud Console:
- Maps JavaScript API
- Geocoding API
- Directions API
- Places API (for autocomplete)
-
Set up billing (required for API usage)
-
Restrict API key to your domain for security
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy!
The app can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
# Run linting
npm run lint
# Run type checking
npm run type-check
# Run tests (when implemented)
npm test- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues:
- Check the Issues page
- Create a new issue with detailed information
- Include your environment details and error messages
- Real-time messaging
- Push notifications
- Payment integration
- Driver verification
- Ride history
- Mobile app
- Advanced filtering
- Route optimization
- Next.js for the amazing framework
- Firebase for backend services
- Tailwind CSS for styling
- Radix UI for accessible components
- Google Maps for mapping services
Made with ❤️ for the community