A comprehensive backend API for a modern ride-sharing platform built with NestJS, GraphQL, and self-hosted Supabase, providing real-time ride matching, location tracking, and seamless payment processing.
Riders Server is the backbone of a ride-sharing application that connects passengers with drivers in real-time. The platform handles everything from user authentication and ride requests to live GPS tracking and payment processing.
- User Registration & Authentication - Secure JWT-based auth for riders and drivers
- Profile Management - Complete user profiles with verification status
- Role-based Access Control - Separate permissions for riders, drivers, and admins
- Ride Requests - Real-time ride booking with pickup/dropoff locations
- Driver Matching - Intelligent algorithm to match nearest available drivers
- Ride Tracking - Live GPS tracking for both riders and drivers
- Ride History - Complete trip history with receipts and ratings
- Live Location Updates - WebSocket-based real-time location sharing
- Push Notifications - Instant alerts for ride status changes
- Driver Availability - Real-time driver status management
- ETA Calculations - Dynamic arrival time estimates
- Multiple Payment Methods - Credit cards, digital wallets, cash
- Fare Calculation - Dynamic pricing based on distance, time, and demand
- Payment Processing - Secure transaction handling
- Receipt Generation - Automated invoice creation
- Rating & Reviews - Two-way rating system for riders and drivers
- Admin Dashboard - Management portal for monitoring and analytics
- Geofencing - Service area management and restrictions
- Analytics - Trip analytics, earnings reports, and performance metrics
- NestJS - Enterprise-grade Node.js framework with TypeScript
- TypeScript - Strict mode enabled with comprehensive type safety
- ESLint - Code quality with security rules and NestJS optimization
- Prettier - Consistent code formatting (80 char width, single quotes, trailing commas)
- Husky - Pre-commit hooks for automatic code quality checks
- Commitlint - Conventional commit message validation
- GraphQL - Flexible API with real-time subscriptions
- Self-hosted Supabase - PostgreSQL with real-time capabilities
- Authentication & Authorization - JWT-based auth system
- Real-time Features - Live location tracking and notifications
- Payment Integration - Stripe payment processing
- External APIs - Google Maps, Twilio SMS, Push notifications
- Deployment - Docker, CI/CD, Production infrastructure
riders-server/
βββ src/ # Source code
β βββ app.controller.ts # Main application controller
β βββ app.module.ts # Root application module
β βββ app.service.ts # Main application service
β βββ main.ts # Application entry point
βββ .github/workflows/ # GitHub Actions workflows
β βββ ci-release.yml # Unified CI and Release workflow
βββ .husky/ # Git hooks
β βββ pre-commit # Pre-commit quality checks
β βββ commit-msg # Commit message validation
βββ .eslintrc.js # ESLint configuration
βββ .prettierrc # Prettier configuration
βββ .prettierignore # Prettier ignore patterns
βββ .releaserc.js # Enhanced semantic release configuration with lightweight releases
βββ commitlint.config.js # Commitlint configuration
βββ scripts/ # Utility scripts
βββ tsconfig.json # TypeScript configuration
βββ tsconfig.build.json # Build-specific TypeScript config
βββ package.json # Dependencies and scripts
βββ CHANGELOG.md # Automated changelog with version history
βββ README.md # Project documentation
βββ DEVELOPMENT.md # Developer guide
βββ ROADMAP.md # Development roadmap
Basic NestJS REST API with a simple "Hello World" endpoint.
GraphQL API implementation planned - See ROADMAP.md for detailed implementation timeline.
# Clone and install
git clone https://github.com/your-username/riders-server.git
cd riders-server
npm install
# Start development
npm run start:devFor detailed development setup, coding standards, and workflows, see DEVELOPMENT.md.
IDE: This project is optimized for JetBrains WebStorm with comprehensive setup instructions in the development guide.
This is a basic NestJS application with a robust development foundation:
- β TypeScript with strict mode
- β ESLint with security rules
- β Prettier code formatting
- β Husky pre-commit hooks
- β Commitlint for conventional commits
- β Enhanced semantic release with emoji-based changelog
- β Automated versioning with rich commit tracking
- β GitHub integration with formatted timestamps
- DEVELOPMENT.md - Complete developer guide, coding standards, and workflows
- ROADMAP.md - Detailed implementation timeline and feature roadmap
See ROADMAP.md for the complete implementation plan:
- Semantic release automation
- GraphQL API setup
- Database integration
- Authentication system
- Real-time features
- Payment processing
This project uses a simplified two-branch approach with automatic version progression:
- Development (
develop): Ongoing development with alpha/beta/rc versioning0.1.0-alpha.1β0.1.1-alpha.1β0.2.0-alpha.1β1.0.0-beta.1β2.0.0-rc.1
- Stable (
main): Production-ready releases (1.0.0+)
Features:
- Unified Pipeline: Single CI β Release workflow for better flow control
- Automatic Tags: Git tags created for each release (
v0.1.0-alpha.1,v1.0.0-beta.1,v2.0.0) - Enhanced Changelog: Rich emoji-based sections with timestamps and author links
- Commit Tracking: Short hash display with links to full commit details
- Formatted Timestamps: CST/CDT timezone with AM/PM format
- Lightweight Releases: Clean releases without build artifacts for faster deployment
- GitHub Releases: Automatic GitHub releases with detailed release notes
For detailed release process and scripts, see DEVELOPMENT.md.
- Read DEVELOPMENT.md for development setup and coding standards
- Fork the repository
- Create a feature branch (
git checkout -b feat/your-feature) - Follow conventional commit format for all commits
- Push to your branch and create a Pull Request
All contributions must pass automated checks (ESLint, Prettier, commitlint).
Commit Types: Use conventional commit types for automatic categorization:
feat:- New features (β¨ Features)fix:- Bug fixes (π Bug Fixes)docs:- Documentation (π Documentation)style:- Code style changes (π Styles)refactor:- Code refactoring (β»οΈ Code Refactoring)test:- Adding tests (π§ͺ Tests)build:- Build system changes (ποΈ Build System)ci:- CI/CD changes (π· Continuous Integration)
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions, please contact:
- Issues: GitHub Issues
For detailed development phases, timelines, and technical milestones, see our comprehensive Development Roadmap.
- Phase 1 (Weeks 1-8): MVP Foundation - Core ride-sharing functionality
- Phase 2 (Weeks 9-16): Enhanced Features - Payments, scheduling, admin tools
- Phase 3 (Weeks 17-24): Scale & Optimization - Microservices, AI, enterprise features
- Phase 4+: Future Enhancements - IoT, blockchain, autonomous vehicles