Skip to content

madhacks-2025/rydr

Repository files navigation

Rydr

Smart carpooling for college students

Rydr is a schedule-aware carpooling app that connects students heading to the same classes and destinations. Save money, reduce your carbon footprint, and build community—one ride at a time.


✨ Features

🗓️ Ride to Class

  • Upload your course schedule (PDF) and automatically match with drivers going to the same classes
  • Smart location matching using Google Maps API
  • See rides filtered by your class locations and times

🚙 Offer & Find Rides

  • Post rides with real-time location autocomplete
  • Search for rides by destination
  • Filter by time, price, parking pass availability, and recurring schedules (MWF/TTh)
  • Only .edu email addresses can sign up for verified student safety

💬 In-App Chat

  • Coordinate pickup spots and timing directly with drivers
  • Real-time messaging powered by Firebase
  • Book rides with one tap—seats automatically update

📊 Track Your Impact

  • Miles carpooled counter on your profile
  • See your environmental and financial savings
  • View upcoming and offered rides in one place

🛠️ Tech Stack

  • Frontend: React Native (Expo)
  • Backend: Node.js + Express (PDF parser)
  • Database: Firebase (Auth + Firestore)
  • APIs: Google Maps (Geocoding, Places Autocomplete, Distance Matrix)
  • Chat: Firebase Realtime + react-native-gifted-chat

🚀 Getting Started

Prerequisites

  • Node.js (v18+)
  • npm or yarn
  • Expo CLI
  • Firebase project
  • Google Maps API key

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/rydr.git
    cd rydr
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env file in the root directory:

    # Firebase
    EXPO_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
    EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
    EXPO_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
    EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
    EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
    EXPO_PUBLIC_FIREBASE_APP_ID=your_app_id
    EXPO_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id
    
    # Google Maps
    EXPO_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_api_key
    
    # Backend (use your local IP for physical devices)
    EXPO_PUBLIC_SCHEDULE_API_URL=http://192.168.x.x:4000/parse-schedule
  4. Start the backend parser server

    node backend/parser-server.js

    The server will listen on http://localhost:4000

  5. Start the Expo app

    npx expo start
  6. Run on device/simulator

    • Press i for iOS simulator
    • Press a for Android emulator
    • Scan QR code with Expo Go for physical device

📱 Usage

For Riders

  1. Sign up with your .edu email
  2. Upload your course schedule (PDF) during signup
  3. Navigate to "Ride to Class" to see rides matching your classes
  4. Or use "Find a Ride" to search by destination
  5. Tap a ride → Chat with the driver → Confirm your seat
  6. View your upcoming rides in "My Rides"

For Drivers

  1. Go to "Offer Ride"
  2. Enter start/end locations (with autocomplete suggestions)
  3. Set time, price, max seats, and optional recurring schedule
  4. Your ride appears to students with matching destinations
  5. Chat with riders and manage your rides in "My Rides"

🗂️ Project Structure

rydr/
├── app/                      # Expo Router pages
│   ├── pages/
│   │   ├── signin-signup.tsx   # Authentication
│   │   ├── HomeScreen.tsx      # Main dashboard
│   │   ├── OfferRide.tsx       # Post a ride
│   │   ├── FindRide.tsx        # Search rides by destination
│   │   ├── RideToClass.tsx     # Schedule-based ride matching
│   │   ├── RideChat.tsx        # Chat & booking
│   │   ├── MyRides.tsx         # View your rides
│   │   └── Profile.tsx         # User profile & stats
│   ├── _layout.tsx
│   └── index.tsx
├── backend/
│   ├── parser-server.js      # Express server for PDF parsing
│   └── parseSchedule.js      # PDF text extraction logic
├── lib/
│   ├── geocode-utils.ts      # Google Maps utilities
│   └── location-cache.ts     # Location caching
├── firebaseConfig.ts         # Firebase initialization
├── .env                      # Environment variables (not tracked)
└── package.json

🔧 Configuration

Firebase Setup

  1. Create a Firebase project at console.firebase.google.com
  2. Enable Authentication (Email/Password)
  3. Enable Firestore Database
  4. Add your Firebase config to .env

Google Maps Setup

  1. Create a project at console.cloud.google.com
  2. Enable these APIs:
    • Geocoding API
    • Places API
    • Distance Matrix API
  3. Create an API key and add to .env

Firestore Structure

users/
  {uid}/
    - name: string
    - email: string
    - phone: string
    - parsedSchedule: object
    - milesCarpooled: number
    bookings/
      {rideId}/
        - startLocation: string
        - endLocation: string
        - time: timestamp
        - pricePerSeat: number
        - status: "upcoming" | "completed"

rideOffered/
  {rideId}/
    - driverId: string
    - startLocation: string
    - endLocation: string
    - startPlaceId: string (Google Maps)
    - endPlaceId: string (Google Maps)
    - time: timestamp
    - recurring: "none" | "MWF" | "TTh"
    - parkingPass: boolean
    - pricePerSeat: number
    - maxSeats: number
    - remainingSeats: number
    - confirmedRiders: string[]
    messages/
      {messageId}/
        - text: string
        - senderId: string
        - senderName: string
        - createdAt: timestamp
        - system: boolean

🎨 Design Philosophy

  • Dark theme with purple accent (#7C3AED) for modern, readable UI
  • Minimal friction: Sign up → Upload schedule → Find rides in < 2 minutes
  • Safety first: .edu verification ensures student-only community
  • Smart matching: Google Maps normalization handles "Morgridge" vs "Morgridge Hall"

🌍 Environmental Impact

If 100 students carpool 10 miles/week:

  • 💰 Save ~$40-80/month per student on gas + parking
  • 🌱 Reduce ~520 lbs CO₂ emissions per week
  • 🚗 Free up ~150 parking spots on campus

🚧 Roadmap

  • Push notifications for ride reminders
  • Driver ratings & reviews
  • Recurring ride automation (auto-post weekly rides)
  • Parking pass sharing integration
  • Multi-campus support
  • In-app payment processing

🤝 Contributing

Built at MadHacks 2025 by DevSync


📄 License

This project is licensed under the MIT License.


🙏 Acknowledgments

  • Expo for the amazing React Native framework
  • Firebase for backend infrastructure
  • Google Maps for location services
  • MadHacks for the hackathon opportunity
  • UW-Madison students for testing and feedback

Ready to ride smarter? Let's carpool! 🚗💨

About

Rydr is a schedule-aware carpooling app that connects students heading to the same classes and destinations. Save money, reduce your carbon footprint, and build community—one ride at a time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors