Taxi App
Build with AI Agent
Taxi Ride-Sharing Backend

Taxi & Ride-Sharing App Backend Template
Real-time Driver and Ride Management

A production-ready taxi ride-sharing backend on Back4app with real-time driver dispatch capabilities. Includes ER diagram, data dictionary, JSON schema, API playground, and an AI Agent prompt for rapid bootstrap.

Key Takeaways

This template delivers a taxi ride-sharing backend with real-time driver dispatch so your team can concentrate on optimizing rider and driver interactions.

  1. Real-time driver dispatchEfficiently manage and deploy drivers in real-time to enhance rider experience.
  2. Ride tracking and updatesUse Back4app's real-time capabilities for ride updates and notifications.
  3. Seamless user collaborationFacilitate collaboration through secure ride sharing and status updates.
  4. Access control featuresManage driver and rider access with robust permissions.
  5. Cross-platform backendServe both mobile and web clients through a single REST and GraphQL API for rides and drivers.

What Is the Taxi & Ride-Sharing App Backend Template?

Back4app is a backend-as-a-service (BaaS) for rapid product delivery. The Taxi & Ride-Sharing App Backend Template is a pre-built schema for users, rides, drivers, and locations. Connect your preferred frontend (React, Flutter, Next.js, and more) and deploy with ease.

Best for:

Taxi and ride-sharing applicationsReal-time dispatch platformsDriver management appsRide tracking solutionsMVP launchesTeams selecting BaaS for transportation products

Overview

A taxi ride-sharing product requires real-time driver dispatch, ride tracking, and seamless collaboration.

This template defines User, Ride, Driver, and Location with real-time dispatch features to enable fast collaboration.

Core Taxi & Ride-Sharing Features

Every technology card in this hub uses the same taxi ride-sharing backend schema with User, Ride, Driver, and Location.

User management

User class stores name, email, password, and roles.

Ride management

Ride class links passenger, driver, and ride status.

Driver availability and management

Driver class stores location, availability status, and assignments.

Location tracking

Location class stores geographic coordinates.

Why Build Your Taxi & Ride-Sharing App Backend with Back4app?

Back4app gives you ride and driver primitives so your team can focus on improving rider and driver experiences instead of infrastructure.

  • Ride and driver management: Ride class with driver assignment and passenger details helps manage logistics.
  • Real-time features and visibility: Manage ride status updates with permission controls for enhanced security.
  • API flexibility: Use Live Queries for real-time updates and REST/GraphQL for all client needs.

Build and iterate on taxi ride-sharing features quickly with one backend contract across all platforms.

Core Benefits

A taxi ride-sharing backend that helps you iterate quickly without sacrificing real-time capabilities.

Quick taxi app launch

Start from a complete user, ride, and driver schema rather than building the backend from scratch.

Real-time updates

Leverage real-time ride tracking and dispatch for optimized performance and user satisfaction.

Robust permissions model

Manage user, ride, and driver access with ACLs and permissions.

Scalable infrastructure

Utilize a cloud-based service to support increasing loads and demand without server management.

Rich data model

Store and manage rides and locations effectively with a comprehensive schema.

AI-driven development

Generate your backend scaffold and integration guidance quickly using our AI Agent.

Ready to launch your taxi ride-sharing app?

Let the Back4app AI Agent scaffold your taxi ride-sharing backend and generate real-time driver dispatch capabilities from a single prompt.

Free to start — 50 AI Agent prompts/month, no credit card required

Technical Stack

Everything included in this taxi ride-sharing backend template.

Frontend
13+ technologies
Backend
Back4app
Database
MongoDB
Auth
Built-in auth + sessions
API
REST and GraphQL
Realtime
Live Queries

ER Diagram

Entity relationship model for the taxi ride-sharing backend schema.

View diagram source
Mermaid
erDiagram
    User ||--o{ Ride : "user"
    Driver ||--o{ Ride : "driver"
    Ride ||--o{ Invoice : "ride"
    User ||--o{ Invoice : "user"
    Invoice ||--o{ Payment : "invoice"
    User {
        String objectId PK
        String username
        String email
        String password
        String role
        Date createdAt
        Date updatedAt
    }

    Ride {
        String objectId PK
        String pickupLocation
        String dropoffLocation
        Pointer user FK
        Pointer driver FK
        String status
        Date createdAt
        Date updatedAt
    }

    Driver {
        String objectId PK
        String username
        String vehicleInfo
        Number rating
        Date createdAt
        Date updatedAt
    }

    Invoice {
        String objectId PK
        Pointer ride FK
        Number amount
        Pointer user FK
        Date createdAt
        Date updatedAt
    }

    Payment {
        String objectId PK
        Pointer invoice FK
        Pointer user FK
        String status
        Date createdAt
        Date updatedAt
    }

Integration Flow

Typical runtime flow for user authentication, ride requests, driver management, and real-time updates.

View diagram source
Mermaid
sequenceDiagram
  participant User
  participant App as Taxi & Ride-Sharing App
  participant Back4app as Back4app Cloud

  User->>App: Login
  App->>Back4app: POST /login
  Back4app-->>App: Session token

  User->>App: Request ride
  App->>Back4app: POST /classes/Ride
  Back4app-->>App: Ride details

  User->>App: View invoice
  App->>Back4app: GET /classes/Invoice?user=User.objectId
  Back4app-->>App: Invoice details

  User->>App: Make payment
  App->>Back4app: POST /classes/Payment
  Back4app-->>App: Payment confirmation

Data Dictionary

Full field-level reference for every class in the taxi ride-sharing schema.

FieldTypeDescriptionRequired
objectIdStringAuto-generated unique identifierAuto
usernameStringUser login name
emailStringUser email address
passwordStringHashed password (write-only)
roleStringRole of the user (e.g., passenger, driver)
createdAtDateAuto-generated creation timestampAuto
updatedAtDateAuto-generated last-update timestampAuto

7 fields in User

Security and Permissions

How ACL and CLP strategy secures users, rides, drivers, and locations.

User-owned profile controls

Only the user can update or delete their profile; others cannot modify user content.

Ride integrity and management

Only the owner can create or delete their rides, while drivers can update ride statuses. Use Cloud Code for validation.

Scoped read access

Restrict ride and driver access to relevant parties (e.g., users can see their own ride statuses).

Schema (JSON)

Raw JSON schema definition ready to copy into Back4app or use as implementation reference.

JSON
{
  "classes": [
    {
      "className": "User",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "username": {
          "type": "String",
          "required": true
        },
        "email": {
          "type": "String",
          "required": true
        },
        "password": {
          "type": "String",
          "required": true
        },
        "role": {
          "type": "String",
          "required": true
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    },
    {
      "className": "Ride",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "pickupLocation": {
          "type": "String",
          "required": true
        },
        "dropoffLocation": {
          "type": "String",
          "required": true
        },
        "user": {
          "type": "Pointer",
          "required": true,
          "targetClass": "User"
        },
        "driver": {
          "type": "Pointer",
          "required": true,
          "targetClass": "Driver"
        },
        "status": {
          "type": "String",
          "required": true
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    },
    {
      "className": "Driver",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "username": {
          "type": "String",
          "required": true
        },
        "vehicleInfo": {
          "type": "String",
          "required": true
        },
        "rating": {
          "type": "Number",
          "required": true
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    },
    {
      "className": "Invoice",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "ride": {
          "type": "Pointer",
          "required": true,
          "targetClass": "Ride"
        },
        "amount": {
          "type": "Number",
          "required": true
        },
        "user": {
          "type": "Pointer",
          "required": true,
          "targetClass": "User"
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    },
    {
      "className": "Payment",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "invoice": {
          "type": "Pointer",
          "required": true,
          "targetClass": "Invoice"
        },
        "user": {
          "type": "Pointer",
          "required": true,
          "targetClass": "User"
        },
        "status": {
          "type": "String",
          "required": true
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    }
  ]
}

Build with AI Agent

Use the Back4app AI Agent to generate a real taxi ride-sharing app from this template, including frontend, backend, auth, and ride and driver management.

Back4app AI Agent
Ready to build
Create a taxi ride-sharing app backend on Back4app with this exact schema and behavior.

Schema:
1. User (use Back4app built-in): name, email, password; objectId, createdAt, updatedAt (system).
2. Ride: passenger (Pointer to User, required), driver (Pointer to Driver, required), status (String, required); objectId, createdAt, updatedAt (system).
3. Driver: location (GeoPoint, required), available (Boolean, required); objectId, createdAt, updatedAt (system).
4. Location: latitude (Number, required), longitude (Number, required); objectId, createdAt, updatedAt (system).

Security:
- Only the user can update/delete their profile. Only the owner can create/delete their rides. Use Cloud Code for validation.

Auth:
- Sign-up, login, logout.

Behavior:
- List users, request rides, assign drivers, and manage ride statuses.

Deliver:
- Back4app app with schema, ACLs, CLPs; frontend for user profiles, rides, drivers, and locations.

Press the button below to open the Agent with this template prompt pre-filled.

This is the base prompt without a technology suffix. You can adapt the generated frontend stack afterward.

Deploy in minutes50 free prompts / monthNo credit card required

API Playground

Try REST and GraphQL endpoints against the taxi ride-sharing schema. Responses use mock data and do not require a Back4app account.

Loading playground…

Uses the same schema as this template.

Choose Your Technology

Expand each card for integration steps, state patterns, data model examples, and offline notes.

Flutter Taxi Ride-Sharing Backend

React Taxi Ride-Sharing Backend

React Native Taxi Ride-Sharing Backend

Next.js Taxi Ride-Sharing Backend

JavaScript Taxi Ride-Sharing Backend

Android Taxi Ride-Sharing Backend

iOS Taxi Ride-Sharing Backend

Vue Taxi Ride-Sharing Backend

Angular Taxi Ride-Sharing Backend

GraphQL Taxi Ride-Sharing Backend

REST API Taxi Ride-Sharing Backend

PHP Taxi Ride-Sharing Backend

.NET Taxi Ride-Sharing Backend

What You Get with Every Technology

Every stack uses the same taxi ride-sharing backend schema and API contracts.

Unified ride-sharing data structure

A consistent schema for users, rides, and drivers in taxi ride sharing.

Real-time ride tracking for taxi ride sharing

Track rides in real-time for enhanced user experience in taxi ride sharing.

Secure payment processing for taxi ride sharing

Ensure safe transactions with integrated payment solutions for taxi ride sharing.

Driver and passenger ratings system

Implement a feedback loop with ratings for drivers and passengers in taxi ride sharing.

REST/GraphQL APIs for taxi ride sharing

Flexible APIs to interact with your taxi ride sharing backend seamlessly.

Location services integration

Easy integration with mapping services for accurate location data in taxi ride sharing.

Taxi Ride Sharing Framework Comparison

Compare setup speed, SDK style, and AI support across all supported technologies.

FrameworkSetup TimeTaxi Ride Sharing BenefitSDK TypeAI Support
~5 minSingle codebase for taxi ride sharing on mobile and web.Typed SDKFull
About 5 minFast web dashboard for taxi ride sharing.Typed SDKFull
Under 5 minutesCross-platform mobile app for taxi ride sharing.Typed SDKFull
~3–7 minServer-rendered web app for taxi ride sharing.Typed SDKFull
~3–5 minLightweight web integration for taxi ride sharing.Typed SDKFull
~5 minNative Android app for taxi ride sharing.Typed SDKFull
About 5 minNative iOS app for taxi ride sharing.Typed SDKFull
Under 5 minutesReactive web UI for taxi ride sharing.Typed SDKFull
~3–7 minEnterprise web app for taxi ride sharing.Typed SDKFull
Under 2 minFlexible GraphQL API for taxi ride sharing.GraphQL APIFull
Quick (2 min) setupREST API integration for taxi ride sharing.REST APIFull
~3 minServer-side PHP backend for taxi ride sharing.REST APIFull
Under 5 minutes.NET backend for taxi ride sharing.Typed SDKFull

Setup time reflects expected duration from project bootstrap to first ride or driver query using this template schema.

Frequently Asked Questions

Common questions about building a taxi ride-sharing backend with this template.

What is a taxi ride-sharing backend?
What does the Taxi & Ride-Sharing template include?
Why use Back4app for a taxi ride-sharing app?
How do I run queries for rides and drivers with Flutter?
How do I manage access with Next.js server actions?
Can React Native cache rides and driver info offline?
How do I restrict unauthorized ride access?
What is the best way to display rides and driver info on Android?
How does the ride request flow work end-to-end?

Trusted by developers worldwide

Join teams shipping taxi ride-sharing products faster with Back4app templates

G2 Users Love Us Badge

Ready to Build Your Taxi Ride-Sharing App?

Start your taxi ride-sharing project in minutes. No credit card required.

Choose Technology