A full-stack ride-sharing application built with React Native (Expo) and Python (FastAPI).
HotRide/
├── backend/ # FastAPI backend with MongoDB
└── mobile/ # React Native (Expo) mobile app
Backend (FastAPI + MongoDB):
- ✅ Email/Phone + Password authentication
- ✅ Google OAuth integration
- ✅ Apple Sign In integration
- ✅ JWT token generation and validation
- ✅ Password hashing with bcrypt
- ✅ MongoDB user storage
- ✅ CORS configuration for Expo
Frontend (React Native + Expo):
- ✅ Login screen with email/phone + password
- ✅ Google OAuth button (fully functional)
- ✅ Apple Sign In button (fully functional)
- ✅ Form validation
- ✅ Error handling with toast notifications
- ✅ Secure token storage with Expo SecureStore
- ✅ Navigation with Expo Router
- ✅ State management with Zustand
Backend (FastAPI + MongoDB):
- ✅ User registration endpoint
- ✅ Email verification with 6-digit codes
- ✅ Phone verification with SMS (Twilio)
- ✅ Profile setup endpoint
- ✅ Email service with SMTP
- ✅ SMS service integration
- ✅ JWT authentication middleware
- ✅ Update profile endpoint (authenticated)
Frontend (React Native + Expo):
- ✅ Sign up / Registration screen
- ✅ Email verification screen with 6-digit code input
- ✅ Phone verification screen with 6-digit code input
- ✅ Profile setup screen with photo upload
- ✅ Edit profile screen with photo upload
- ✅ Enable location screen with map view
- ✅ Location permission handling (expo-location)
- ✅ Map integration with driver markers (react-native-maps)
- ✅ Location-based booking button (disabled without location)
- ✅ Image picker integration (expo-image-picker)
- ✅ Complete registration flow
- ✅ Terms & Conditions acceptance
- ✅ Read-only email and phone display
Backend (FastAPI + MongoDB):
- ✅ Booking model and schema
- ✅ Create booking endpoint (authenticated)
- ✅ Get user bookings (ride history)
- ✅ Get specific booking details
- ✅ Update booking status
- ✅ Cancel booking endpoint
- ✅ Fare calculation (25 PESOS per km base fare)
- ✅ MongoDB booking collection with indexes
Frontend (React Native + Expo):
- ✅ Booking screen with interactive map
- ✅ Destination search with geocoding
- ✅ Distance calculation (Haversine formula)
- ✅ Estimated time calculation
- ✅ Base fare calculation (25 PESOS/km)
- ✅ Gratuity/tip system (slider + percentage buttons)
- ✅ Total fare display (base + gratuity)
- ✅ Notes for driver input
- ✅ Ride history screen
- ✅ Booking list with status badges
- ✅ Pull-to-refresh ride history
- ✅ Empty state for no rides
- ✅ @react-native-community/slider integration
Backend (FastAPI + MongoDB):
- ✅ Booking status updates (pending, accepted, in_progress, completed, cancelled)
- ✅ Cancel booking with notification support
- ✅ Booking details endpoint for tracking
- ✅ Driver assignment to bookings
Frontend (React Native + Expo):
- ✅ Ride Tracking Screen - Real-time driver location on map
- ✅ Live Driver Location - Simulated GPS updates every 3 seconds
- ✅ ETA Calculation - Dynamic time updates as driver approaches
- ✅ Route Visualization - Line connecting driver to user location
- ✅ Driver Profile Display - Name, rating, vehicle, license plate
- ✅ Call Driver - Direct phone call functionality
- ✅ Chat with Driver - Real-time messaging interface
- ✅ Share Ride - Share ride details via phone's share sheet
- ✅ Cancel Ride - Cancel booking with driver notification
- ✅ Map Auto-fit - Automatically adjusts to show both markers
- ✅ Status Updates - "Your rider is on the way" with countdown
Frontend (React Native + Expo):
- ✅ Finding Driver Screen - Waiting screen while searching for drivers
- ✅ Advertisement Modal - Full-screen ads with countdown timer
- ✅ Ad Timing Logic - Display ad for 10 seconds every 2 minutes
- ✅ Ad Auto-dismiss - Automatically closes after 10 seconds
- ✅ Manual Close - X button to close ad early
- ✅ Countdown Display - Shows remaining seconds on ad
- ✅ CTA Button - "Learn More" button with external link support
- ✅ Search Timer - Shows elapsed time while finding driver
- ✅ Next Update Countdown - Shows time until next ad
- ✅ Status Tips - Helpful information while waiting
- ✅ Cancel During Search - Cancel booking while finding driver
- ✅ Driver Found Simulation - Auto-navigates after 15 seconds (demo)
- Navigate to backend directory:
cd backend- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt-
Configure
.envfile (see backend/README.md) -
Start MongoDB (local or MongoDB Atlas)
-
Run server:
cd app
uvicorn main:app --reload --host 0.0.0.0 --port 8000Backend will be available at http://localhost:8000
- Navigate to mobile directory:
cd mobile- Install dependencies:
npm install-
Configure
.envfile (see mobile/README.md) -
Start Expo:
npm start- Run on device:
- Press
ifor iOS - Press
afor Android - Scan QR code for physical device
- Python 3.10+
- FastAPI
- MongoDB (Motor - async driver)
- JWT authentication
- bcrypt password hashing
- Google OAuth verification
- Apple Sign In verification
- React Native 0.73
- Expo ~50.0
- Expo Router (file-based routing)
- NativeWind (Tailwind CSS)
- Zustand (state management)
- Axios (API calls)
- Expo SecureStore (secure storage)
- Expo Location (location permissions)
- React Native Maps (map integration)
- Google Sign In SDK
- Apple Authentication SDK
Backend (.env):
MONGODB_URI- MongoDB connection stringJWT_SECRET- Secret for JWT signingGOOGLE_CLIENT_ID- Google OAuth client IDAPPLE_CLIENT_ID- Apple bundle identifierCORS_ORIGINS- Allowed CORS originsSMTP_HOST- SMTP server host (e.g., smtp.gmail.com)SMTP_PORT- SMTP server port (e.g., 587)SMTP_USERNAME- SMTP username/emailSMTP_PASSWORD- SMTP password/app passwordSMTP_FROM_EMAIL- Sender email addressSMTP_FROM_NAME- Sender display nameTWILIO_ACCOUNT_SID- Twilio account SIDTWILIO_AUTH_TOKEN- Twilio auth tokenTWILIO_PHONE_NUMBER- Twilio phone numberFRONTEND_URL- Frontend URL for email links
Frontend (.env):
EXPO_PUBLIC_API_URL- Backend API URLEXPO_PUBLIC_GOOGLE_CLIENT_ID- Google OAuth client IDEXPO_PUBLIC_APPLE_CLIENT_ID- Apple bundle identifier
For iOS:
- Get Google Maps API key from Google Cloud Console
- Enable Maps SDK for iOS
- Add API key to
mobile/app.jsonunderios.config.googleMapsApiKey
For Android:
- Get Google Maps API key from Google Cloud Console
- Enable Maps SDK for Android
- Add API key to
mobile/app.jsonunderandroid.config.googleMaps.apiKey - Add SHA-1 certificate fingerprint to Google Cloud Console
Location Permissions:
- iOS: Automatically configured via
expo-locationplugin - Android: Permissions added to
app.json(ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION) - Users are prompted to enable location after profile setup
For mobile testing on same network:
- Use your machine's local IP in
EXPO_PUBLIC_API_URL - Example:
http://192.168.1.5:8000/api - Find IP:
ipconfig(Windows) orifconfig(Mac/Linux)
POST /api/auth/login- Email/Phone + Password loginPOST /api/auth/google- Google OAuth authenticationPOST /api/auth/apple- Apple Sign In authentication
POST /api/auth/register- Register new userPOST /api/auth/verify-email- Verify email with codePOST /api/auth/resend-email-code- Resend email verification codePOST /api/auth/send-phone-code- Send phone verification SMSPOST /api/auth/verify-phone- Verify phone with codePOST /api/auth/profile-setup- Update profile informationPUT /api/auth/update-profile- Update authenticated user's profile (requires Bearer token)
POST /api/bookings/create- Create new ride booking (requires Bearer token)GET /api/bookings/my-bookings- Get user's booking history (requires Bearer token)GET /api/bookings/{booking_id}- Get specific booking details (requires Bearer token)PUT /api/bookings/{booking_id}/status- Update booking status (requires Bearer token)DELETE /api/bookings/{booking_id}- Cancel booking (requires Bearer token)
API documentation available at: http://localhost:8000/docs
- Start backend server
- Start mobile app
- Try logging in with:
- Email + password
- Google account
- Apple ID (iOS only)
For development, you can create a test user directly in MongoDB:
db.users.insertOne({
email: "test@example.com",
password_hash: "$2b$12$...", // Use backend to hash: "password123"
oauth_provider: "email",
is_active: true,
is_email_verified: false,
is_phone_verified: false,
created_at: new Date(),
updated_at: new Date()
})- User registration with email/phone
- Profile setup screen (full name, photo)
- Email verification
- Phone verification with SMS
- Forgot password flow
- Password reset functionality
- Home screen with map
- Ride booking
- Driver features
- Payment integration
- Ratings and reviews
- Push notifications
Detailed documentation available in:
backend/README.md- Backend setup and API docsmobile/README.md- Mobile app setup and features
Private project - All rights reserved
For issues or questions, please refer to the documentation or create an issue in the repository.