# bachiep/gove architecture

> Architecture diagram of the GitHub repository bachiep/gove, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bachiep/gove
- Repository: https://github.com/bachiep/gove

## Overview

Gove is a real-time ride-hailing and logistics platform built as a NestJS modular monolith, with a React web client. Its documented ride workflow spans fare quoting, trip creation, driver matching and acceptance, trip completion, and idempotent payment; the delivery workflow covers order creation through driver custody and handoff. The graph also captures identity, driver onboarding, location, live projections, and operator diagnostics. Several service and repository implementations were not sampled, so uncertain internal links are omitted; documented workflow links are identified as such.

Main entry points: [`apps/api/src/dispatch/dispatch.service.ts`](https://github.com/bachiep/gove/blob/main/apps/api/src/dispatch/dispatch.service.ts) (Driver matching), [`apps/api/src/trip/trip.service.ts`](https://github.com/bachiep/gove/blob/main/apps/api/src/trip/trip.service.ts) (Trip lifecycle), [`apps/api/src/payment/payment.service.ts`](https://github.com/bachiep/gove/blob/main/apps/api/src/payment/payment.service.ts) (Payment handling), [`apps/web/src/App.tsx`](https://github.com/bachiep/gove/blob/main/apps/web/src/App.tsx) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web["Web application<br/>[App.tsx]"]
end

subgraph group_identity["Identity"]
  node_auth["Authentication service<br/>[auth.service.ts]"]
  node_identityrepo["Identity repository"]
  node_tokens["Token service<br/>[token.service.ts]"]
end

subgraph group_rides["Ride lifecycle"]
  node_pricing["Fare quoting<br/>[pricing.service.ts]"]
  node_pricingapi["Pricing API"]
  node_tripapi["Trip API<br/>[trip.controller.ts]"]
  node_trip["Trip lifecycle<br/>[trip.service.ts]"]
  node_dispatchapi["Dispatch API"]
  node_dispatch["Driver matching"]
  node_paymentapi["Payment API"]
  node_payment["Payment handling<br/>[payment.service.ts]"]
  node_provider["Payment providers"]
end

subgraph group_logistics["Delivery and live state"]
  node_deliveryapi["Delivery API"]
  node_deliveryoffers["Driver delivery offers"]
  node_delivery["Delivery workflow"]
  node_locationapi["Location API"]
  node_location["Driver location"]
  node_realtime["Live projections"]
end

subgraph group_operations["Driver and operations"]
  node_driverapi["Driver profile API"]
  node_driverops["Driver profiles<br/>[driver.service.ts]"]
  node_operatorapi["Operator API"]
  node_operatorops["Operator workflows"]
end

node_customer(("Customer"))
node_driver(("Driver"))
node_operator(("Operator"))
node_postgres[("PostgreSQL / PostGIS")]
node_simulator["SIMULATOR provider"]

node_customer -->|"uses"| node_web
node_driver -->|"uses"| node_web
node_operator -->|"uses"| node_web
node_pricingapi -->|"calls"| node_pricing
node_tripapi -->|"calls"| node_trip
node_dispatchapi -->|"calls"| node_dispatch
node_paymentapi -->|"calls"| node_payment
node_deliveryapi -->|"calls"| node_delivery
node_deliveryoffers -->|"calls"| node_delivery
node_locationapi -->|"calls"| node_location
node_driverapi -->|"calls"| node_driverops
node_operatorapi -->|"calls"| node_operatorops
node_auth -->|"reads and writes"| node_identityrepo
node_auth -->|"issues and verifies"| node_tokens
node_customer -->|"requests quote"| node_pricingapi
node_pricing -.->|"quote precedes trip"| node_trip
node_trip -.->|"trip enters matching"| node_dispatch
node_dispatch -.->|"offers assignment"| node_driver
node_driver -->|"accepts and updates"| node_dispatchapi
node_dispatch -.->|"completion precedes payment"| node_payment
node_customer -->|"requests capture"| node_paymentapi
node_payment -.->|"uses provider"| node_simulator
node_customer -->|"creates delivery"| node_deliveryapi
node_driver -->|"accepts and updates custody"| node_deliveryoffers
node_driver -->|"sends location"| node_locationapi
node_driver -->|"manages profile"| node_driverapi
node_operator -->|"reviews and approves"| node_operatorapi

click node_web "https://github.com/bachiep/gove/blob/main/apps/web/src/App.tsx"
click node_auth "https://github.com/bachiep/gove/blob/main/apps/api/src/identity/auth.service.ts"
click node_identityrepo "https://github.com/bachiep/gove/blob/main/apps/api/src/identity/identity.repository.ts"
click node_tokens "https://github.com/bachiep/gove/blob/main/apps/api/src/identity/token.service.ts"
click node_pricing "https://github.com/bachiep/gove/blob/main/apps/api/src/pricing/pricing.service.ts"
click node_pricingapi "https://github.com/bachiep/gove/blob/main/apps/api/src/pricing/pricing.controller.ts"
click node_tripapi "https://github.com/bachiep/gove/blob/main/apps/api/src/trip/trip.controller.ts"
click node_trip "https://github.com/bachiep/gove/blob/main/apps/api/src/trip/trip.service.ts"
click node_dispatchapi "https://github.com/bachiep/gove/blob/main/apps/api/src/dispatch/dispatch.controller.ts"
click node_dispatch "https://github.com/bachiep/gove/blob/main/apps/api/src/dispatch/dispatch.service.ts"
click node_paymentapi "https://github.com/bachiep/gove/blob/main/apps/api/src/payment/payment.controller.ts"
click node_payment "https://github.com/bachiep/gove/blob/main/apps/api/src/payment/payment.service.ts"
click node_provider "https://github.com/bachiep/gove/blob/main/apps/api/src/payment/payment-provider.ts"
click node_deliveryapi "https://github.com/bachiep/gove/blob/main/apps/api/src/delivery/delivery.controller.ts"
click node_deliveryoffers "https://github.com/bachiep/gove/blob/main/apps/api/src/delivery/delivery-offer.controller.ts"
click node_delivery "https://github.com/bachiep/gove/blob/main/apps/api/src/delivery/delivery.service.ts"
click node_locationapi "https://github.com/bachiep/gove/blob/main/apps/api/src/location/location.controller.ts"
click node_location "https://github.com/bachiep/gove/blob/main/apps/api/src/location/location.service.ts"
click node_realtime "https://github.com/bachiep/gove/blob/main/apps/api/src/realtime/realtime.gateway.ts"
click node_driverapi "https://github.com/bachiep/gove/blob/main/apps/api/src/driver/driver.controller.ts"
click node_driverops "https://github.com/bachiep/gove/blob/main/apps/api/src/driver/driver.service.ts"
click node_operatorapi "https://github.com/bachiep/gove/blob/main/apps/api/src/operator/operator.controller.ts"
click node_operatorops "https://github.com/bachiep/gove/blob/main/apps/api/src/operator/operator.service.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web toneBlue
class node_auth,node_identityrepo,node_tokens,node_postgres toneAmber
class node_pricing,node_pricingapi,node_tripapi,node_trip,node_dispatchapi,node_dispatch,node_paymentapi,node_payment,node_provider toneMint
class node_deliveryapi,node_deliveryoffers,node_delivery,node_locationapi,node_location,node_realtime toneRose
class node_driverapi,node_driverops,node_operatorapi,node_operatorops,node_customer,node_driver,node_operator,node_simulator toneIndigo
```

## Components

### Web client

- [Web application](https://github.com/bachiep/gove/blob/main/apps/web/src/App.tsx): `apps/web/src/App.tsx`

### Identity

- [Authentication service](https://github.com/bachiep/gove/blob/main/apps/api/src/identity/auth.service.ts): `apps/api/src/identity/auth.service.ts`
- [Identity repository](https://github.com/bachiep/gove/blob/main/apps/api/src/identity/identity.repository.ts): `apps/api/src/identity/identity.repository.ts`
- [Token service](https://github.com/bachiep/gove/blob/main/apps/api/src/identity/token.service.ts): `apps/api/src/identity/token.service.ts`

### Ride lifecycle

- [Fare quoting](https://github.com/bachiep/gove/blob/main/apps/api/src/pricing/pricing.service.ts): `apps/api/src/pricing/pricing.service.ts`
- [Pricing API](https://github.com/bachiep/gove/blob/main/apps/api/src/pricing/pricing.controller.ts): `apps/api/src/pricing/pricing.controller.ts`
- [Trip API](https://github.com/bachiep/gove/blob/main/apps/api/src/trip/trip.controller.ts): `apps/api/src/trip/trip.controller.ts`
- [Trip lifecycle](https://github.com/bachiep/gove/blob/main/apps/api/src/trip/trip.service.ts): `apps/api/src/trip/trip.service.ts`
- [Dispatch API](https://github.com/bachiep/gove/blob/main/apps/api/src/dispatch/dispatch.controller.ts): `apps/api/src/dispatch/dispatch.controller.ts`
- [Driver matching](https://github.com/bachiep/gove/blob/main/apps/api/src/dispatch/dispatch.service.ts): `apps/api/src/dispatch/dispatch.service.ts`
- [Payment API](https://github.com/bachiep/gove/blob/main/apps/api/src/payment/payment.controller.ts): `apps/api/src/payment/payment.controller.ts`
- [Payment handling](https://github.com/bachiep/gove/blob/main/apps/api/src/payment/payment.service.ts): `apps/api/src/payment/payment.service.ts`
- [Payment providers](https://github.com/bachiep/gove/blob/main/apps/api/src/payment/payment-provider.ts): `apps/api/src/payment/payment-provider.ts`

### Delivery and live state

- [Delivery API](https://github.com/bachiep/gove/blob/main/apps/api/src/delivery/delivery.controller.ts): `apps/api/src/delivery/delivery.controller.ts`
- [Driver delivery offers](https://github.com/bachiep/gove/blob/main/apps/api/src/delivery/delivery-offer.controller.ts): `apps/api/src/delivery/delivery-offer.controller.ts`
- [Delivery workflow](https://github.com/bachiep/gove/blob/main/apps/api/src/delivery/delivery.service.ts): `apps/api/src/delivery/delivery.service.ts`
- [Location API](https://github.com/bachiep/gove/blob/main/apps/api/src/location/location.controller.ts): `apps/api/src/location/location.controller.ts`
- [Driver location](https://github.com/bachiep/gove/blob/main/apps/api/src/location/location.service.ts): `apps/api/src/location/location.service.ts`
- [Live projections](https://github.com/bachiep/gove/blob/main/apps/api/src/realtime/realtime.gateway.ts): `apps/api/src/realtime/realtime.gateway.ts`

### Driver and operations

- [Driver profile API](https://github.com/bachiep/gove/blob/main/apps/api/src/driver/driver.controller.ts): `apps/api/src/driver/driver.controller.ts`
- [Driver profiles](https://github.com/bachiep/gove/blob/main/apps/api/src/driver/driver.service.ts): `apps/api/src/driver/driver.service.ts`
- [Operator API](https://github.com/bachiep/gove/blob/main/apps/api/src/operator/operator.controller.ts): `apps/api/src/operator/operator.controller.ts`
- [Operator workflows](https://github.com/bachiep/gove/blob/main/apps/api/src/operator/operator.service.ts): `apps/api/src/operator/operator.service.ts`

### Other components

- **Customer**
- **Driver**
- **Operator**
- **PostgreSQL / PostGIS**
- **SIMULATOR provider**

## Connections

- Customer → Web application: uses
- Driver → Web application: uses
- Operator → Web application: uses
- Pricing API → Fare quoting: calls
- Trip API → Trip lifecycle: calls
- Dispatch API → Driver matching: calls
- Payment API → Payment handling: calls
- Delivery API → Delivery workflow: calls
- Driver delivery offers → Delivery workflow: calls
- Location API → Driver location: calls
- Driver profile API → Driver profiles: calls
- Operator API → Operator workflows: calls
- Authentication service → Identity repository: reads and writes
- Authentication service → Token service: issues and verifies
- Customer → Pricing API: requests quote
- Fare quoting → Trip lifecycle: quote precedes trip
- Trip lifecycle → Driver matching: trip enters matching
- Driver matching → Driver: offers assignment
- Driver → Dispatch API: accepts and updates
- Driver matching → Payment handling: completion precedes payment
- Customer → Payment API: requests capture
- Payment handling → SIMULATOR provider: uses provider
- Customer → Delivery API: creates delivery
- Driver → Driver delivery offers: accepts and updates custody
- Driver → Location API: sends location
- Driver → Driver profile API: manages profile
- Operator → Operator API: reviews and approves
