A full-stack ride-sharing application built with modern web technologies. Experience seamless trip booking, real-time tracking, and captain management in this comprehensive Uber-like platform.
- Real-time Communication: WebSocket-powered live updates for trip status, location tracking, and notifications
- Dual App Experience: Separate interfaces for riders (users) and drivers (captains)
- Secure Authentication: JWT-based auth with bcrypt password hashing
- Database Management: Prisma ORM with PostgreSQL for robust data handling
- Caching & Performance: Redis integration for session management and caching
- OTP Verification: Secure trip verification system
- Location Services: Precise GPS tracking with decimal coordinates
- Trip Management: Complete lifecycle from request to completion
- Pooling Support: Capacity-based trip sharing
- Modern UI: React 19 with custom UI components
- Type Safety: Full TypeScript coverage across the stack
- Next.js 16 - React framework with App Router
- React 19 - Latest React with concurrent features
- TypeScript - Type-safe development
- Custom UI Library - Shared component library
- Elysia - High-performance Bun-based web framework
- Prisma - Next-generation ORM
- PostgreSQL - Robust relational database
- Redis - In-memory data structure store
- WebSockets - Real-time bidirectional communication
- Turbo - High-performance build system for monorepos
- Bun - Fast JavaScript runtime and package manager
- ESLint - Code linting and formatting
- Vitest - Fast unit testing
- Prettier - Code formatting
- Node.js 18+
- Bun 1.3.2+
- PostgreSQL database
- Redis server
-
Clone the repository
git clone https://github.com/thetanav/uber.git cd uber -
Install dependencies
bun install
-
Set up environment variables
Create
.envfiles in the following directories:apps/server/.envapps/captain/.env(if needed)apps/user/.env(if needed)
Example
apps/server/.env:DATABASE_URL="postgresql://username:password@localhost:5432/uber_db" REDIS_URL="redis://localhost:6379" JWT_SECRET="your-super-secret-jwt-key"
-
Set up the database
cd apps/server bunx prisma migrate dev bunx prisma generate -
Start development servers
# From project root bun run devThis will start all apps:
- User App: http://localhost:3000
- Captain App: http://localhost:3001
- Server API: http://localhost:3002 (or configured port)
uber/
├── apps/
│ ├── captain/ # Driver dashboard (Next.js)
│ ├── server/ # Backend API (Elysia + Prisma)
│ └── user/ # Rider app (Next.js)
├── packages/
│ ├── eslint-config/ # Shared ESLint configurations
│ ├── typescript-config/# Shared TypeScript configs
│ └── ui/ # Shared UI components
├── package.json
├── turbo.json
└── README.md
- Sign up/login at http://localhost:3000
- Enter trip details (origin, destination, capacity)
- Book your ride and track in real-time
- Use OTP for secure trip verification
- Register at http://localhost:3001
- Go online and accept ride requests
- Navigate to pickup locations
- Complete trips and earn
POST /auth/login- User/Captain authenticationPOST /user/trip- Create new trip requestGET /captain/trips- Get available tripsPUT /captain/trip/:id/accept- Accept a tripWS /ws- Real-time updates
bun run test- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by Uber's seamless ride-sharing experience
- Built with cutting-edge web technologies
- Thanks to the open-source community for amazing tools
Happy riding! 🚀