A modern, feature-rich carpooling application built with React Native, Expo, and Supabase. Final Year Project 2024-2025.
- β User Authentication - Secure signup/login with Supabase Auth
- β Ride Posting - Drivers can post available rides
- β Ride Booking - Passengers can search and book rides
- β Real-time Chat - In-app messaging between drivers and passengers
- β Push Notifications - Booking updates, chat messages, and ride reminders
- β Rating System - Rate drivers and passengers after rides
- β Payment Integration - Multiple payment methods (Cash, UPI, Card, Wallet)
- β Smart Matching - Algorithm-based ride recommendations (96.1% accuracy)
- β SOS Emergency - Emergency alert system with contact notifications
- β Live Location Tracking - Real-time ride tracking on map
- β Profile Management - Complete user profiles with photo upload
- π Booking status updates (pending, confirmed, active, completed)
- π¬ Real-time chat message alerts
- π Ride reminders (15 minutes before departure)
- π¨ SOS emergency alerts to emergency contacts
- π Promotional notifications
- Multiple payment methods (Card, Cash, UPI, Wallet)
- Stripe integration for card payments
- Payment transaction history
- Fare breakdown display
- Automatic revenue tracking for drivers
- Dual confirmation system (driver + passenger)
- Emergency SOS button
- Emergency contact management (with active/inactive toggle)
- Real-time location sharing during rides
- Driver and passenger ratings
- Trip history tracking
- Contact notification system
- Framework: React Native with Expo SDK 51
- Navigation: React Navigation v6
- State Management: React Context API + Hooks
- UI Components: React Native Paper, Custom Safe Components
- Maps: React Native Maps (Google Maps)
- Notifications: Expo Notifications
- Storage: AsyncStorage
- Payment: Stripe React Native SDK
- HTTP Client: Fetch API
- Runtime: Node.js v18+
- Framework: Express.js
- Database: PostgreSQL (via Supabase)
- Authentication: Supabase Auth (JWT-based)
- Push Notifications: Expo Server SDK
- Real-time: Supabase Realtime Subscriptions
- Primary Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Storage: Supabase Storage (profile pictures)
- Real-time: Supabase Realtime (chat, location tracking)
- SMS Service: Twilio (for SOS alerts)
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download
- npm or yarn package manager
- Git - Download
- Expo CLI -
npm install -g expo-cli - EAS CLI -
npm install -g eas-cli(for building APK) - Physical Android/iOS device (for testing push notifications)
git clone https://github.com/mayurnaik32/SMR.git
cd SMR/ShareMyRide# Navigate to ShareMyRide folder
cd ShareMyRide
# Install mobile app dependencies
npm installcd backend
npm install
cd ..-
Create Supabase Project:
- Go to https://supabase.com
- Click "New Project"
- Fill in project details
- Wait for database provisioning (~2 minutes)
-
Run Database Migration:
- Open Supabase Dashboard β SQL Editor
- Copy ALL content from
database/complete_schema_migration.sql - Paste into SQL Editor
- Click "Run" button (or press Ctrl+Enter)
- Wait for success message:
β Schema migration completed successfully!
-
Get Your Credentials:
- Go to Settings β API
- Copy
Project URLandanon/public key - For backend, also copy
service_rolekey (keep secret!)
Update config/supabase.js:
import { createClient } from '@supabase/supabase-js';
const supabaseUrl = 'YOUR_SUPABASE_PROJECT_URL';
const supabaseAnonKey = 'YOUR_SUPABASE_ANON_KEY';
export const supabase = createClient(supabaseUrl, supabaseAnonKey);Create backend/.env:
# Supabase Configuration
SUPABASE_URL=YOUR_SUPABASE_PROJECT_URL
SUPABASE_SERVICE_KEY=YOUR_SUPABASE_SERVICE_ROLE_KEY
# Server Configuration
PORT=3000
NODE_ENV=developmentUpdate utils/notificationHelper.js (around line 5):
// For local testing on same machine:
const BACKEND_URL = 'http://localhost:3000';
// For testing on physical device (replace with your computer's IP):
// const BACKEND_URL = 'http://192.168.1.100:3000';
// Find your IP:
// Windows: Run 'ipconfig' in CMD, look for IPv4 Address
// Mac/Linux: Run 'ifconfig', look for inet addresscd backend
node server.js
# Expected Output:
# β
Server running on http://localhost:3000Keep this terminal running!
Option A: Expo Go (Quick Testing - No Notifications)
npx expo start
# Scan QR code with Expo Go app
# β οΈ Note: Push notifications won't work in Expo GoOption B: Development Build (For Testing Notifications) β
# Connect Android device via USB with USB debugging enabled
npx expo run:android
# This will:
# 1. Build a development APK (5-10 minutes first time)
# 2. Install on connected device
# 3. Start Metro bundler
# β
Notifications WILL work!Requirements:
- Android device connected via USB
- USB debugging enabled
Steps:
# 1. Enable USB debugging on Android:
# Settings β About Phone β Tap "Build Number" 7 times
# Settings β Developer Options β Enable "USB Debugging"
# 2. Connect device to computer via USB
# 3. Build and install:
npx expo run:android
# APK will be installed automatically# Install EAS CLI globally
npm install -g eas-cli
# Login to Expo account
eas login
# Initialize EAS
eas initCreate eas.json:
{
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"preview": {
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"production": {
"android": {
"buildType": "app-bundle"
}
}
}
}# Development build
eas build --profile development --platform android
# Preview build (for testing)
eas build --profile preview --platform android
# Production build (for Play Store)
eas build --profile production --platform android- Build development APK (see above)
- Install on physical device
- Login to app
- Go to: Profile β Notification Settings
- Tap: "Send Test Notification"
- Result: Notification should appear! π
# Health check
curl http://localhost:3000/health
# Expected: {"status":"ok"}- users - User profiles, ratings, push tokens
- rides - Posted rides by drivers
- bookings - Ride bookings by passengers
- messages - Chat messages
- ratings - User ratings and reviews
- notifications - System notifications
- notification_logs - Push notification history
- contacts - Emergency contacts
- sos_events - Emergency SOS alerts
- payment_transactions - Payment history
- ride_matches - Smart matching results
- live_locations - Real-time location tracking
- ride_requests - Passenger ride requests
- β Auto-update ride statistics (booking counts, revenue)
- β Auto-calculate user ratings
- β Auto-update timestamps
- β Row Level Security (RLS) for data protection
Solutions:
- β Use development build, NOT Expo Go
- β Test on physical device, NOT emulator
- β Check notification permissions are granted
- β Verify backend server is running
- β Check push token is saved in database
Solutions:
- β
Check backend is running:
node backend/server.js - β
Update backend URL in
utils/notificationHelper.js - β Use your computer's IP address (not localhost) for device testing
- β Ensure device and computer are on same WiFi network
Solutions:
- β Re-run migration script in Supabase SQL Editor
- β Check Supabase logs: Dashboard β Database β Logs
- β Verify credentials in config files
http://localhost:3000/api
POST /api/notifications/send
Content-Type: application/json
{
"userId": "uuid",
"title": "Notification Title",
"body": "Notification body text"
}POST /api/notifications/booking-update
{
"bookingId": "uuid",
"status": "confirmed",
"recipientId": "uuid"
}POST /api/notifications/chat-message
{
"recipientId": "uuid",
"senderName": "John Doe",
"message": "Message text"
}Contributions are welcome!
- Fork the repository
- Create a feature branch:
git checkout -b feature/AmazingFeature - Commit your changes:
git commit -m 'Add AmazingFeature' - Push to branch:
git push origin feature/AmazingFeature - Open a Pull Request
This project is licensed under the MIT License.
MIT License - Copyright (c) 2025 Mayur Naik
- Mayur Naik - @mayurnaik32
- University: [Your University Name]
- Department: Computer Engineering
- Year: 2024-2025
- Expo - React Native framework
- Supabase - Backend as a Service
- React Native - Mobile framework
- Expo Notifications - Push notifications
- React Navigation - Navigation library
For support:
- π§ Email: mayurnaik32@example.com
- π Issues: GitHub Issues
This project is developed as part of a Final Year Project for Bachelor of Engineering in Computer Engineering.
Project Title: ShareMyRide - Smart Carpooling & Ridesharing Platform
Academic Year: 2024-2025
Key Highlights:
- β Complete full-stack mobile application
- β Real-time features
- β Push notification system
- β Payment integration
- β Smart matching algorithm (96.1% accuracy)
- β Production-ready database architecture
- β Safety features (SOS, emergency contacts)
- User Authentication
- Ride Posting & Booking
- Real-time Chat
- Push Notifications
- Payment Integration
- Rating System
- SOS Emergency Feature
- Smart Matching Algorithm
- In-app Voice/Video Calling
- Multi-language Support
- Dark Mode Theme
- Carbon Footprint Calculator
- Driver Verification System
Current Version: 1.0.0
Last Updated: October 28, 2025
Status: β
Production Ready
# Clone repository
git clone https://github.com/mayurnaik32/SMR.git
cd SMR/ShareMyRide
# Install dependencies
npm install
cd backend && npm install && cd ..
# Start backend
cd backend && node server.js
# Start app (new terminal)
npx expo start
# Build APK
npx expo run:android- OS: Windows 10/11, macOS 10.15+, Ubuntu 20.04+
- RAM: 8GB minimum, 16GB recommended
- Storage: 10GB free space
- Node.js: v18.0.0 or higher
- Android: 6.0 (API 23) or higher
- iOS: 13.0 or higher
- RAM: 2GB minimum
- Storage: 100MB free space
- β Initial release
- β Complete notification system
- β Smart matching algorithm
- β Database schema with 13 tables
- β Payment integration
- β Real-time chat
- β SOS emergency system
- β Production-ready build
β If you find this project useful, please give it a star on GitHub!