# yvesknight/kigali-ride architecture

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

- Interactive diagram: https://gitdiagram.com/yvesknight/kigali-ride
- Repository: https://github.com/yvesknight/kigali-ride

## Overview

Kigali Ride is an Android-first Kigali ride aggregator scaffold. Its intended rider journey runs from onboarding and location access through destination search, provider-option comparison, option detail and handoff, then trip status and rating. The README also describes profiles, saved places, trip history, help, and seven provider adapters. The sampled routes explicitly show placeholder or stub behavior and no connected APIs; adapter internals and several screens were not sampled, so their wiring is left unspecified.

Main entry points: [`src/providers/core/registry.ts`](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/core/registry.ts) (Adapter registry), [`src/providers/core/BaseAdapter.ts`](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/core/BaseAdapter.ts) (Base fare adapter), [`app/handoff/[quoteId].tsx`](https://github.com/yvesknight/kigali-ride/blob/master/app/handoff/%5BquoteId%5D.tsx) (Provider handoff), [`app/(tabs)/profile.tsx`](https://github.com/yvesknight/kigali-ride/blob/master/app/(tabs)/profile.tsx) (Profile and places)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Rider journey"]
  node_entry["App entry<br/>[index.tsx]"]
  node_onboard["Onboarding<br/>[splash.tsx]"]
  node_location["Location access"]
  node_home["Home and map<br/>[home.tsx]"]
  node_search["Destination search<br/>[search.tsx]"]
  node_compare["Quote comparison<br/>[compare.tsx]"]
  node_detail["Option detail<br/>[&#91;quoteId&#93;.tsx]"]
  node_handoff["Provider handoff<br/>[&#91;quoteId&#93;.tsx]"]
  node_trip["Trip status<br/>[&#91;tripId&#93;.tsx]"]
  node_rating["Trip rating<br/>[&#91;tripId&#93;.tsx]"]
end

subgraph group_account["Account and support"]
  node_history["Trip history<br/>[history.tsx]"]
  node_profile["Profile and places<br/>[profile.tsx]"]
  node_auth["Phone and OTP<br/>[auth.tsx]"]
  node_help["Help and support<br/>[help.tsx]"]
end

subgraph group_providers["Provider adapters"]
  node_registry["Adapter registry<br/>[registry.ts]"]
  node_adapter_types["Adapter interface<br/>[types.ts]"]
  node_base["Base fare adapter<br/>[BaseAdapter.ts]"]
  node_yego["YEGO adapter<br/>[YegoAdapter.ts]"]
  node_move["Move adapter<br/>[MoveAdapter.ts]"]
  node_zelo["Zelo adapter<br/>[ZeloAdapter.ts]"]
  node_tugende["Tugende adapter<br/>[TugendeAdapter.ts]"]
  node_rapide["Rapide adapter<br/>[RapideAdapter.ts]"]
  node_greenride["GreenRide adapter"]
  node_mavo["Mavo adapter<br/>[MavoAdapter.ts]"]
end

subgraph group_contracts["Shared contracts"]
  node_provider_types["Provider types<br/>[provider.ts]"]
  node_trip_types["Trip types<br/>[trip.ts]"]
end

node_rider(("Rider"))
node_provider_app(("Ride providers"))

node_rider -->|"opens app"| node_entry
node_entry -->|"redirects"| node_onboard
node_rider -->|"chooses destination"| node_search
node_search -->|"routes selection"| node_compare
node_compare -->|"opens option"| node_detail
node_detail -->|"opens provider"| node_handoff
node_handoff -.->|"handoff target"| node_provider_app
node_handoff -.->|"continues trip"| node_trip
node_trip -.->|"ends trip"| node_rating
node_rider -->|"uses home"| node_home
node_rider -->|"views trips"| node_history
node_rider -->|"manages account"| node_profile
node_profile -->|"opens support"| node_help
node_profile -.->|"requests auth"| node_auth
node_history -.->|"requires auth"| node_auth
node_registry -->|"registers adapter"| node_yego
node_registry -->|"registers adapter"| node_move
node_registry -->|"registers adapter"| node_zelo
node_registry -->|"registers adapter"| node_tugende
node_registry -->|"registers adapter"| node_rapide
node_registry -->|"registers adapter"| node_greenride
node_registry -->|"registers adapter"| node_mavo
node_yego -->|"extends"| node_base
node_move -->|"extends"| node_base
node_zelo -->|"extends"| node_base
node_tugende -->|"extends"| node_base
node_rapide -->|"extends"| node_base
node_greenride -->|"extends"| node_base
node_mavo -->|"extends"| node_base
node_base -->|"implements contract"| node_adapter_types
node_adapter_types -->|"defines shapes"| node_provider_types

click node_entry "https://github.com/yvesknight/kigali-ride/blob/master/app/index.tsx"
click node_onboard "https://github.com/yvesknight/kigali-ride/blob/master/app/(onboarding)/splash.tsx"
click node_location "https://github.com/yvesknight/kigali-ride/blob/master/app/(onboarding)/location-permission.tsx"
click node_home "https://github.com/yvesknight/kigali-ride/blob/master/app/(tabs)/home.tsx"
click node_search "https://github.com/yvesknight/kigali-ride/blob/master/app/search.tsx"
click node_compare "https://github.com/yvesknight/kigali-ride/blob/master/app/compare.tsx"
click node_detail "https://github.com/yvesknight/kigali-ride/blob/master/app/option/%5BquoteId%5D.tsx"
click node_handoff "https://github.com/yvesknight/kigali-ride/blob/master/app/handoff/%5BquoteId%5D.tsx"
click node_trip "https://github.com/yvesknight/kigali-ride/blob/master/app/trip/%5BtripId%5D.tsx"
click node_rating "https://github.com/yvesknight/kigali-ride/blob/master/app/rating/%5BtripId%5D.tsx"
click node_history "https://github.com/yvesknight/kigali-ride/blob/master/app/(tabs)/history.tsx"
click node_profile "https://github.com/yvesknight/kigali-ride/blob/master/app/(tabs)/profile.tsx"
click node_auth "https://github.com/yvesknight/kigali-ride/blob/master/app/(onboarding)/auth.tsx"
click node_help "https://github.com/yvesknight/kigali-ride/blob/master/app/help.tsx"
click node_registry "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/core/registry.ts"
click node_adapter_types "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/core/types.ts"
click node_base "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/core/BaseAdapter.ts"
click node_yego "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/yego/YegoAdapter.ts"
click node_move "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/move/MoveAdapter.ts"
click node_zelo "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/zelo/ZeloAdapter.ts"
click node_tugende "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/tugende/TugendeAdapter.ts"
click node_rapide "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/rapide/RapideAdapter.ts"
click node_greenride "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/greenride/GreenRideAdapter.ts"
click node_mavo "https://github.com/yvesknight/kigali-ride/blob/master/src/providers/mavo/MavoAdapter.ts"
click node_provider_types "https://github.com/yvesknight/kigali-ride/blob/master/src/types/provider.ts"
click node_trip_types "https://github.com/yvesknight/kigali-ride/blob/master/src/types/trip.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_entry,node_onboard,node_location,node_home,node_search,node_compare,node_detail,node_handoff,node_trip,node_rating toneBlue
class node_history,node_profile,node_auth,node_help toneAmber
class node_registry,node_adapter_types,node_base,node_yego,node_move,node_zelo,node_tugende,node_rapide,node_greenride,node_mavo toneMint
class node_provider_types,node_trip_types toneRose
class node_rider,node_provider_app toneIndigo
```

## Components

### Rider journey

- [App entry](https://github.com/yvesknight/kigali-ride/blob/master/app/index.tsx): `app/index.tsx`
- [Onboarding](https://github.com/yvesknight/kigali-ride/blob/master/app/(onboarding)/splash.tsx): `app/(onboarding)/splash.tsx`
- [Location access](https://github.com/yvesknight/kigali-ride/blob/master/app/(onboarding)/location-permission.tsx): `app/(onboarding)/location-permission.tsx`
- [Home and map](https://github.com/yvesknight/kigali-ride/blob/master/app/(tabs)/home.tsx): `app/(tabs)/home.tsx`
- [Destination search](https://github.com/yvesknight/kigali-ride/blob/master/app/search.tsx): `app/search.tsx`
- [Quote comparison](https://github.com/yvesknight/kigali-ride/blob/master/app/compare.tsx): `app/compare.tsx`
- [Option detail](https://github.com/yvesknight/kigali-ride/blob/master/app/option/%5BquoteId%5D.tsx): `app/option/[quoteId].tsx`
- [Provider handoff](https://github.com/yvesknight/kigali-ride/blob/master/app/handoff/%5BquoteId%5D.tsx): `app/handoff/[quoteId].tsx`
- [Trip status](https://github.com/yvesknight/kigali-ride/blob/master/app/trip/%5BtripId%5D.tsx): `app/trip/[tripId].tsx`
- [Trip rating](https://github.com/yvesknight/kigali-ride/blob/master/app/rating/%5BtripId%5D.tsx): `app/rating/[tripId].tsx`

### Account and support

- [Trip history](https://github.com/yvesknight/kigali-ride/blob/master/app/(tabs)/history.tsx): `app/(tabs)/history.tsx`
- [Profile and places](https://github.com/yvesknight/kigali-ride/blob/master/app/(tabs)/profile.tsx): `app/(tabs)/profile.tsx`
- [Phone and OTP](https://github.com/yvesknight/kigali-ride/blob/master/app/(onboarding)/auth.tsx): `app/(onboarding)/auth.tsx`
- [Help and support](https://github.com/yvesknight/kigali-ride/blob/master/app/help.tsx): `app/help.tsx`

### Provider adapters

- [Adapter registry](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/core/registry.ts): `src/providers/core/registry.ts`
- [Adapter interface](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/core/types.ts): `src/providers/core/types.ts`
- [Base fare adapter](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/core/BaseAdapter.ts): `src/providers/core/BaseAdapter.ts`
- [YEGO adapter](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/yego/YegoAdapter.ts): `src/providers/yego/YegoAdapter.ts`
- [Move adapter](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/move/MoveAdapter.ts): `src/providers/move/MoveAdapter.ts`
- [Zelo adapter](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/zelo/ZeloAdapter.ts): `src/providers/zelo/ZeloAdapter.ts`
- [Tugende adapter](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/tugende/TugendeAdapter.ts): `src/providers/tugende/TugendeAdapter.ts`
- [Rapide adapter](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/rapide/RapideAdapter.ts): `src/providers/rapide/RapideAdapter.ts`
- [GreenRide adapter](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/greenride/GreenRideAdapter.ts): `src/providers/greenride/GreenRideAdapter.ts`
- [Mavo adapter](https://github.com/yvesknight/kigali-ride/blob/master/src/providers/mavo/MavoAdapter.ts): `src/providers/mavo/MavoAdapter.ts`

### Shared contracts

- [Provider types](https://github.com/yvesknight/kigali-ride/blob/master/src/types/provider.ts): `src/types/provider.ts`
- [Trip types](https://github.com/yvesknight/kigali-ride/blob/master/src/types/trip.ts): `src/types/trip.ts`

### Other components

- **Rider**
- **Ride providers**

## Connections

- Rider → App entry: opens app
- App entry → Onboarding: redirects
- Rider → Destination search: chooses destination
- Destination search → Quote comparison: routes selection
- Quote comparison → Option detail: opens option
- Option detail → Provider handoff: opens provider
- Provider handoff → Ride providers: handoff target
- Provider handoff → Trip status: continues trip
- Trip status → Trip rating: ends trip
- Rider → Home and map: uses home
- Rider → Trip history: views trips
- Rider → Profile and places: manages account
- Profile and places → Help and support: opens support
- Profile and places → Phone and OTP: requests auth
- Trip history → Phone and OTP: requires auth
- Adapter registry → YEGO adapter: registers adapter
- Adapter registry → Move adapter: registers adapter
- Adapter registry → Zelo adapter: registers adapter
- Adapter registry → Tugende adapter: registers adapter
- Adapter registry → Rapide adapter: registers adapter
- Adapter registry → GreenRide adapter: registers adapter
- Adapter registry → Mavo adapter: registers adapter
- YEGO adapter → Base fare adapter: extends
- Move adapter → Base fare adapter: extends
- Zelo adapter → Base fare adapter: extends
- Tugende adapter → Base fare adapter: extends
- Rapide adapter → Base fare adapter: extends
- GreenRide adapter → Base fare adapter: extends
- Mavo adapter → Base fare adapter: extends
- Base fare adapter → Adapter interface: implements contract
- Adapter interface → Provider types: defines shapes
