The Challenge
The urban mobility market faces major issues such as delayed ride confirmations, unsafe driver verification systems, poor parcel tracking, hidden charges, and lack of real-time communication between riders and drivers. Many local ride-booking apps fail to provide a smooth user experience, secure payment handling, and reliable captain management. Users often struggle with last-minute cancellations, inaccurate location tracking, and weak customer support. The challenge was to build a powerful all-in-one ecosystem that solves ride booking, parcel delivery, captain onboarding, and admin monitoring with speed, trust, and scalability.
My Solution
I developed GoSafey, a complete MERN stack ride and parcel aggregator platform designed for modern users. The system includes a premium user app for booking rides and deliveries, a captain panel for accepting requests and managing earnings, and an admin dashboard for monitoring operations. Real-time Socket.io communication enables instant ride matching and live status updates. Razorpay integration powers secure wallet payments, while Firebase OTP ensures trusted login. Smart tracking, SOS safety features, responsive UI, and scalable backend architecture make GoSafey a modern, reliable, and future-ready transportation platform.
My Role & Contributions
As the full-stack developer, I designed and built the complete GoSafey ecosystem from scratch. I handled frontend UI/UX development, backend APIs, MongoDB database architecture, authentication systems, wallet logic, payment gateway integration, and real-time Socket.io functionality. I also developed the captain onboarding flow, admin control panel, live notifications, and responsive mobile-first experience. Additionally, I optimized performance, security, and deployment to ensure a production-ready platform with premium user experience.
Key Features
Smart Ride Booking Flow
Seamless multi-step booking system for Bike, Auto, Cab, and parcel delivery with real-time captain availability and instant confirmations.
Live Ride Tracking
Track your captain in real-time with accurate GPS updates, ETA visibility, and live trip progress monitoring.
GoSafey Wallet System
Secure in-app wallet for instant top-ups, ride payments, parcel charges, cashback rewards, and automatic deductions.
Secure Payment Gateway
Integrated Razorpay payment system for fast, secure, and trusted online transactions.
Admin & Management Dashboard
Powerful admin panel to manage users, captains, bookings, KYC approvals, reports, complaints, and platform operations.
Mobile-First Responsive Design
Optimized premium user experience across mobile, tablet, and desktop devices with smooth performance.
Captain Driver App
Dedicated driver panel for accepting rides, earnings tracking, live requests, trip history, and status controls.
Firebase OTP Authentication
Fast and secure phone login system with OTP verification for trusted user access.
SOS Safety Features
Emergency panic button, contact alerts, and ride sharing features for passenger safety.
Parcel Delivery System
Quick doorstep parcel pickup and delivery with live tracking and secure handling.
Real-Time Notifications
Instant alerts for ride requests, booking confirmations, trip updates, wallet activity, and admin actions.
Scalable MERN Architecture
Built using React.js, Node.js, MongoDB, and Socket.io for high performance and future growth.
Technology Stack
React.js
UI Library
Tailwind CSS
Utility-First CSS
CSS3
Styling Language
Node.js
Runtime Environment / Backend
Express.js
Web Framework
Java
Android
MongoDB
NoSQL Database
Cloudinary
Media Management
Android App Dev
Native Mobile
Postman
API Testing
Git
Version Control
GitHub
Code Hosting
Visual Showcase
Hosting & Deployment
GoSafey frontend application is deployed on Vercel for lightning-fast global delivery and smooth performance. The powerful Node.js backend is hosted on Render / VPS servers for scalable real-time ride operations. MongoDB Atlas manages secure cloud database storage, while Cloudinary handles fast image uploads and media optimization. Socket.io powers instant live communication between users, captains, and admin systems.
See It In Action!
Explore the live demo or dive into the codebase on GitHub.
The Application Data Flow
1. Ride Request Initiated
User selects destination, vehicle type (Moto/Auto/Cab), and preferences (AC, Helmet). Frontend sends an HTTP POST request to the Node.js API.
{ "pickup": [lat, lng], "type": "Cab" }
$nearSphere / $maxDistance
2. Driver Matching Algorithm
Backend uses MongoDB GeoJSON indexes to find nearby active Captains. It filters out busy drivers and calculates the estimated fare.
3. Real-Time Dispatch (Sockets)
Instead of slow HTTP polling, the backend uses Socket.io to instantly push the ride request directly to the Captain Terminal's 'Live Radar'.
"Your driver is arriving!"
4. Accept & Firebase Alert
Captain accepts. Backend links them in DB. Firebase Cloud Messaging (FCM) is triggered to send a push notification to the User's phone (even if app is closed).
5. Secure Payment & Wallet
Ride completes. System checks GoSafey Wallet balance. If low, User top-ups via Razorpay. Backend listens to Razorpay Webhooks to safely update DB balance.
payment.captured -> Update Wallet
Under the Hood: How it Works
Detailed explanation of the core third-party services and networking protocols used in the GoSafey infrastructure.
Socket.io (Real-Time Engine)
Bidirectional WebSocket Communication
Why we use it: HTTP requests are strictly "client asks, server answers". If a driver moves, the user app wouldn't know unless it kept refreshing (which kills battery). Sockets keep a tunnel open.
How it works:
- Captain's phone sends
location_updateevery 3 seconds to the server. - Server instantly broadcasts
driver_movedto the User's specific "room". - The User's React map re-renders the car icon smoothly.
Firebase FCM & Auth
Cloud Messaging & OTP Verification
Why we use it: Sockets disconnect when the app is killed or sent to the background. Firebase Cloud Messaging (FCM) can wake up the phone system to show push notifications.
How it works:
- When users log in, the app generates a unique
FCM Tokenand saves it in MongoDB. - If Admin sends a promo code, Node.js calls Firebase API with that token.
- Firebase handles the complex OS-level delivery to iOS/Android status bars.
Razorpay API Integration
Secure Payment Gateway & Webhooks
Why we use it: PCI-DSS compliance means we cannot legally store credit card details in our MongoDB. Razorpay handles the heavy lifting of security.
How it works (Wallet Top-Up):
- User clicks "Add ₹100". Backend generates a Razorpay
Order ID. - Frontend opens Razorpay UI. User pays via UPI/Card.
- Razorpay silently pings our backend Webhook URL stating "Payment Success". Backend verifies the secret signature and adds ₹100 to the DB wallet.
MongoDB GeoJSON
Location-Based Querying Engine
Why we use it: Standard SQL is slow at calculating distances. MongoDB has built-in geometry math optimized for map applications.
How it works:
- Captains' locations are stored as
{ type: "Point", coordinates: [lng, lat] }. - We create a
2dsphereindex on this field. - When a user requests a ride, DB instantly searches within a 5KM radius using the
$nearSphereoperator, ignoring offline drivers.
Platform Sub-Systems
User App
- Instant Booking: Select Auto, Moto, or Cab with specific AC/Helmet preferences.
- GoSafey Wallet: Encrypted wallet system with transaction logs and Razorpay top-ups.
- Safety SOS: One-tap panic button connected to emergency contacts and admin console.
- Parcel Delivery: Book doorstep delivery for packages with real-time tracking.
Captain Terminal
- Digital Verification: Upload RC, License, and Aadhar. Approved securely by Admin.
- Live Radar: High-performance radar scanning for nearby ride requests dynamically.
- Hardware Sync: Haptic vibrations and audio context linked for ride dispatch alerts.
- Earnings Hub: Detailed breakdown of platform fees, penalties, and direct bank payouts.
Admin Console
- God View: See all active rides, available captains, and ongoing trips on a master map.
- Compliance Center: View and approve/reject driver uploaded documents manually.
- Financial Audits: Track platform commissions, driver withdrawals, and promo costs.
- Support Hub: Manage user "Trip Complaints" and refund requests directly from dashboard.
Folder Architecture
📂 GOSAFEY_ROOT │ ├── 📂 backend # Node.js + Express API Server (Core Engine) │ ├── 📂 config # DB connection & Cloud API keys setup │ ├── 📂 Controllers # Logic (e.g., matching driver, processing payment) │ ├── 📂 middleware # Security (JWT verification, Role guards) │ ├── 📂 Models # Mongoose Schemas (User, Captain, Ride, Wallet) │ ├── 📂 Routes # API Endpoints (/api/rides, /api/auth) │ ├── 📄 Server.js # Entry point & Socket.io initialization │ └── 📄 .env # Secret Keys (Mongo URI, Razorpay, JWT Secret) │ ├── 📂 frontend # React JS (User App & Captain Terminal) │ ├── 📂 src │ │ ├── 📂 components # Reusable UI (Buttons, GlassCards, MapBox) │ │ ├── 📂 pages # Screens (Home, Settings, LiveRadar, Wallet) │ │ └── 📂 context # React Context API (Auth state, Socket state) │ └── 📄 tailwind.config.js# Custom UI variables & theme │ └── 📂 admin # React JS (Admin Dashboard Portal) ├── 📂 src │ ├── 📂 pages # Screens (GodView Map, Approvals, Finance) │ └── 📄 App.jsx # Protected React Router setup └── 📄 vite.config.js # Build configurations
What's Next?
Liked this project? Explore more of my work or get in touch to discuss your next big idea!