Skip to content

Repository files navigation

🚇 MetroMate — Student Ride Pooling

A mobile-first web app that matches verified college students at the same metro station, helps them pool an auto/cab, and compares live prices across Uber, Namma Yatri, Rapido & Ola — all in one premium interface.

✨ Features

  • Station Check-in — Select your metro station and destination
  • Real-time Pool Matching — Find verified students from the same college at the same station in real-time (Firestore real-time listeners)
  • Ride Price Aggregation — Compare prices from Uber, Namma Yatri, Rapido, Ola with fare-split calculations
  • Face Verification — Client-side face matching (face-api.js) against uploaded college ID card
  • Firebase Auth — Email/password + Google sign-in
  • Push Notifications — FCM-powered alerts when someone joins your pool
  • Premium UI — Dark theme, glass-morphism, smooth animations (Framer Motion), Zomato/Swiggy-level polish

🛠️ Tech Stack

Layer Technology
Frontend React 18 + Vite
Styling Tailwind CSS 3
State Zustand
Animations Framer Motion
Backend Node.js + Express
Database Firebase Firestore (real-time)
Auth Firebase Auth
Face Verification face-api.js
Maps Google Maps API
Notifications Firebase Cloud Messaging
Icons Lucide React

🚀 Quick Start

1. Clone & Install

# Frontend
cd metro-ride-pool
npm install

# Backend
cd server
npm install

2. Configure Firebase

  1. Create a Firebase project at console.firebase.google.com
  2. Enable Authentication (Email/Password + Google)
  3. Create a Firestore database
  4. Copy your config to .env:
cp .env.example .env
# Edit .env with your Firebase credentials
  1. For the backend:
cp server/.env.example server/.env
# Add your Firebase service account

3. Face API Models (Optional)

For real face verification, download face-api.js models:

mkdir -p public/models
# Download from: https://github.com/justadudewhohacks/face-api.js/tree/master/weights
# Required: ssd_mobilenetv1, face_landmark_68, face_recognition

The app works in demo mode without models (verification is simulated).

4. Run

# Terminal 1 — Frontend
npm run dev

# Terminal 2 — Backend
cd server
npm run dev

Frontend: http://localhost:3000 Backend: http://localhost:5000

📱 App Flow

Splash → Onboarding → Sign Up → Face Verify → Home
                                                  ↓
                                          Select Station
                                                  ↓
                                       Pool Match (real-time)
                                                  ↓
                                     Compare Rides (aggregated)
                                                  ↓
                                     Redirect to Ride App (deep link)

🗂️ Project Structure

metro-ride-pool/
├── public/
│   └── firebase-messaging-sw.js    # FCM service worker
├── src/
│   ├── components/
│   │   ├── Layout.jsx              # App shell with bottom nav
│   │   └── BottomNav.jsx           # Animated tab bar
│   ├── data/
│   │   └── stations.js             # Metro stations + colleges data
│   ├── lib/
│   │   ├── firebase.js             # Firebase client init
│   │   └── notifications.js        # FCM helpers
│   ├── pages/
│   │   ├── Splash.jsx              # Animated splash screen
│   │   ├── Onboarding.jsx          # 4-slide intro carousel
│   │   ├── Login.jsx               # Email + Google auth
│   │   ├── Signup.jsx              # Registration + college picker
│   │   ├── FaceVerify.jsx          # ID upload + selfie + face matching
│   │   ├── Home.jsx                # Dashboard with stats
│   │   ├── StationSelect.jsx       # Search + select metro station
│   │   ├── PoolMatch.jsx           # Real-time student matching
│   │   ├── RideCompare.jsx         # Price aggregation across apps
│   │   └── Profile.jsx             # User profile & settings
│   ├── store/
│   │   └── index.js                # Zustand global state
│   ├── App.jsx                     # Routes + auth guards
│   ├── main.jsx                    # Entry point
│   └── index.css                   # Tailwind + custom components
├── server/
│   ├── server.js                   # Express API (auth, pools, rides, FCM)
│   └── package.json
├── tailwind.config.js
├── vite.config.js
└── package.json

🔗 Ride App Deep Links

App Deep Link Scheme
Namma Yatri https://nammayatri.in/link/rider/
Uber uber:// → fallback to m.uber.com
Rapido rapido:// → fallback to Play Store
Ola olacabs:// → fallback to Play Store

🔒 Security

  • Firebase Auth ID token verification on all API routes
  • Rate limiting (100 req / 15 min per IP)
  • Helmet.js security headers
  • Face verification ensures real student identity
  • CORS restricted to client URL

📝 License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages