Voygo is a full-stack ride-sharing application designed to connect passengers with drivers efficiently. It features real-time tracking, ride management, and separate interfaces for users and captains (drivers).
- User & Captain Authentication: Secure login/signup for both roles.
- Real-time Ride Booking: Instant ride requests and matching.
- Live Tracking: Real-time location updates using Socket.io.
- Map Integration: Route visualization and distance calculation.
- Frontend: React, Vite, Tailwind CSS, GSAP, Socket.io-client, Google Maps API
- Backend: Node.js, Express, MongoDB, Socket.io
- Architecture: Modular Monolith (unified backend with logical service separation)
Voygo/
├── server.js # 🚀 Unified entry point (Super Server)
├── socket.js # 📡 Centralized Socket.io handler
├── package.json # 📦 Merged dependencies
├── Dockerfile # 🐳 Container configuration
├── docker-compose.yml # 🐳 Full stack orchestration
├── .env.example # ⚙️ Environment template
├── frontend/ # React client application
├── services/ # Modular backend services
│ ├── users/ # User management module
│ ├── captains/ # Captain (driver) management module
│ └── rides/ # Ride matching and map module
└── legacy-backend/ # Old monolithic backend (reference only)
- Node.js 20+
- MongoDB (or Docker)
- Google Maps API Key
The easiest way to run Voygo is using Docker Compose:
# 1. Clone the repository
git clone https://github.com/ijatinydv/Voygo.git
cd Voygo
# 2. Create environment file
cp .env.example .env
# Edit .env and add your GOOGLE_MAPS_API key
# 3. Start everything (MongoDB + Backend)
docker-compose up --build
# Backend will be available at http://localhost:3000
# MongoDB at localhost:27017-
Clone the repository
git clone https://github.com/ijatinydv/Voygo.git cd Voygo -
Backend Setup (Modular Monolith)
# Install dependencies npm install # Create environment file cp .env.example .env # Edit .env with your MongoDB URI and Google Maps API key # Start the server npm run dev
-
Frontend Setup
cd frontend npm install npm run dev
| Route | Service | Description |
|---|---|---|
/users/* |
Users | User registration, login, profile |
/captains/* |
Captains | Captain registration, login, profile |
/rides/* |
Rides | Create, confirm, start, end rides |
/maps/* |
Maps | Geocoding, distance, suggestions |
/health |
Health | Server health check |
# Server
PORT=3000
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/voygo
# Authentication
JWT_SECRET=your-secret-key
# Google Maps
GOOGLE_MAPS_API=your-google-maps-api-key
# Service URLs (all point to same server in monolith)
USER_SERVICE_URL=http://localhost:3000
CAPTAIN_SERVICE_URL=http://localhost:3000
GATEWAY_URL=http://localhost:3000In the modular monolith architecture, controllers that make axios calls to other services (e.g., ride.controller.js calling the User service) simply loop back to the same server:
┌─────────────────────────────────────────────────────────┐
│ Express Server │
│ (localhost:3000) │
├─────────────────────────────────────────────────────────┤
│ /users/* → userRoutes → userController │
│ /captains/* → captainRoutes → captainController │
│ /rides/* → rideRoutes → rideController │
│ /maps/* → mapsRoutes → mapController │
├─────────────────────────────────────────────────────────┤
│ axios.get("http://localhost:3000/users/:id") │
│ ↓ │
│ Same server handles the request internally │
└─────────────────────────────────────────────────────────┘
This allows you to keep the existing axios calls without any code changes!