Route-matched carpooling platform for India. Connect drivers and passengers sharing the same path, not just the same destination.
SyncRoute uses OSRM road routing to match rides based on actual route overlap, not straight-line distance. Passengers pay only for the segment they travel, and drivers earn without commission fees.
- Route-First Matching: 60%+ actual road overlap required
- OCR Verification: Automated license and RC verification
- Zero Commission: No booking fees or hidden charges
- Instant Booking: One-tap seat reservation with in-app chat
- Safety Features: SOS button, live tracking, mutual ratings
- Real-Time Updates: WebSocket-based ride tracking and messaging
- React 18 with TypeScript
- Vite for build tooling
- TailwindCSS for styling
- Mapbox GL for interactive maps
- Socket.io-client for real-time features
- Node.js with Express
- MongoDB with Mongoose ODM
- JWT authentication
- Socket.io for WebSocket connections
- OSRM for route calculations
- Tesseract.js for OCR verification
syncroute/
├── syncroute-frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── contexts/ # React contexts
│ │ ├── lib/ # API clients and utilities
│ │ └── hooks/ # Custom React hooks
│ └── public/ # Static assets
│
└── syncroute-backend/ # Node.js backend API
├── models/ # MongoDB schemas
├── routes/ # API route handlers
├── middleware/ # Express middleware
├── utils/ # Helper functions
└── socket/ # WebSocket handlers
- Node.js 18 or higher
- MongoDB 6.0 or higher
- npm or yarn package manager
- Clone the repository
git clone https://github.com/yourusername/syncroute.git
cd syncroute- Install frontend dependencies
cd syncroute-frontend
npm install- Install backend dependencies
cd ../syncroute-backend
npm installCreate syncroute-frontend/.env:
VITE_API_URL=http://localhost:5000/api
VITE_SOCKET_URL=http://localhost:5000
VITE_MAPBOX_TOKEN=your_mapbox_tokenCreate syncroute-backend/.env:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/syncroute
JWT_SECRET=your_jwt_secret_key
NODE_ENV=development
OSRM_SERVER=http://router.project-osrm.orgStart the backend server:
cd syncroute-backend
npm run devStart the frontend development server:
cd syncroute-frontend
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
Build the frontend:
cd syncroute-frontend
npm run buildStart the backend in production mode:
cd syncroute-backend
npm startThe platform uses OSRM (Open Source Routing Machine) to calculate actual road routes between points. Rides are matched only if they share 60% or more of the actual driving path.
How it works:
- User enters pickup and drop locations
- System queries OSRM for route geometry
- Compares with existing ride routes using polyline overlap
- Returns only rides with sufficient overlap
- Calculates proportional pricing based on segment distance
Automated OCR verification for driver documents:
- Driving license validation
- Vehicle registration (RC) verification
- Age verification (minimum 18 years)
- Document expiry checking
WebSocket-based real-time updates:
- Live ride tracking
- In-app messaging between drivers and passengers
- Booking notifications
- Ride status updates
- SOS emergency button with location sharing
- Live location tracking during rides
- Emergency contact notifications
- Mutual rating system
- Driver verification badges
POST /api/auth/register - Register new user
POST /api/auth/login - User login
POST /api/auth/google - Google OAuth login
GET /api/auth/me - Get current user
PUT /api/auth/profile - Update user profile
GET /api/rides - List all active rides
POST /api/rides - Create new ride
GET /api/rides/:id - Get ride details
PUT /api/rides/:id - Update ride
DELETE /api/rides/:id - Cancel ride
GET /api/rides/my-rides - Get user's rides
POST /api/rides/search - Search rides by route
POST /api/bookings - Create booking
GET /api/bookings/my - Get user's bookings
PUT /api/bookings/:id - Update booking status
DELETE /api/bookings/:id - Cancel booking
POST /api/documents/verify-license - Verify driving license
POST /api/documents/verify-rc - Verify vehicle registration
POST /api/documents/validate-age - Validate user age
- Authentication credentials
- Profile information
- Driver verification status
- Document verification data
- Rating and review statistics
- Route information (from/to coordinates)
- Date and time
- Vehicle details
- Pricing and available seats
- Status (active/completed/cancelled)
- Passenger and ride references
- Booking status
- Seat count
- Payment information
- Sender and receiver references
- Message content
- Timestamp
- Read status
- Push code to GitHub
- Connect repository to Vercel
- Configure environment variables
- Deploy automatically on push
- Create new web service
- Connect GitHub repository
- Set environment variables
- Configure build command:
npm install - Configure start command:
npm start
- Create free cluster
- Configure network access
- Create database user
- Get connection string
- Update MONGODB_URI in backend
Run frontend tests:
cd syncroute-frontend
npm testRun backend tests:
cd syncroute-backend
npm test- Route caching for frequently searched paths
- Database indexing on location and date fields
- Image optimization for profile photos
- Lazy loading for map components
- WebSocket connection pooling
- JWT token-based authentication
- Password hashing with bcrypt
- Input validation and sanitization
- Rate limiting on API endpoints
- CORS configuration
- Secure WebSocket connections
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a pull request
This project is licensed under the MIT License.
For issues and questions:
- GitHub Issues: https://github.com/yourusername/syncroute/issues
- Email: support@syncroute.app.gmail.com
- Mobile applications (iOS and Android)
- Advanced route optimization
- Multi-stop ride support
- Corporate carpooling programs
- Carbon footprint tracking
- Ride scheduling automation
- Payment gateway integration
- Multi-language support
Built with modern web technologies for efficient, safe, and sustainable commuting.