# surendharramaraj/driverhirecustomerfrontend architecture

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

- Interactive diagram: https://gitdiagram.com/surendharramaraj/driverhirecustomerfrontend
- Repository: https://github.com/surendharramaraj/driverhirecustomerfrontend

## Overview

This is an Expo/React Native ride-booking app. The visible map workflow obtains the rider’s location, reverse-geocodes it, accepts a destination, requests a route, and displays map/trip options. The home screen also describes pickup scheduling, vehicle choice, and requesting a driver, but booking execution is not established by the excerpts. Authentication and ride-history routes are present in the tree; their behavior and wiring are not sampled. Edges reflect only shown calls or documented framework entry behavior.

Main entry points: [`app/(tabs)/index.tsx`](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/index.tsx) (Map and trip options), [`app/home.tsx`](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/home.tsx) (Home trip flow), [`hooks/useThemeColor.ts`](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/hooks/useThemeColor.ts) (Theme color hook), [`app/OlaAutocomplete.tsx`](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/OlaAutocomplete.tsx) (Place autocomplete)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ride["Ride planning"]
  node_map_booking["Map and trip options<br/>[index.tsx]"]
  node_home_booking["Home trip flow<br/>[home.tsx]"]
  node_place_search["Place autocomplete"]
  node_ola_places{{"Ola Maps places"}}
  node_ola_routing{{"Ola Maps routing"}}
  node_device_location{{"Device location"}}
  node_map_render["Map display<br/>[index.tsx]"]
end

subgraph group_account["Rider account"]
  node_onboarding["Onboarding<br/>[onboarding.tsx]"]
  node_login["Login<br/>[login.tsx]"]
  node_phone_verify["Phone verification"]
  node_otp_verify["OTP verification"]
  node_account_tab["Account tab<br/>[account.tsx]"]
  node_ride_history["My rides<br/>[myrides.tsx]"]
end

subgraph group_shared["Shared interface"]
  node_app_layout["App layout<br/>[_layout.tsx]"]
  node_tabs_layout["Tab navigation<br/>[_layout.tsx]"]
  node_theme_color["Theme color hook<br/>[useThemeColor.ts]"]
  node_color_scheme["Color scheme<br/>[useColorScheme.ts]"]
  node_palette["Theme palette<br/>[Colors.ts]"]
  node_themed_text["Themed text<br/>[ThemedText.tsx]"]
  node_themed_view["Themed view<br/>[ThemedView.tsx]"]
  node_icon_symbol["Icon fallback<br/>[IconSymbol.tsx]"]
  node_tab_background["Tab background"]
end

node_rider(("Rider"))
node_router["Expo Router"]

node_rider -->|"opens app"| node_router
node_router -->|"loads routes"| node_app_layout
node_app_layout -->|"reads scheme"| node_color_scheme
node_tabs_layout -->|"routes to"| node_map_booking
node_rider -.->|"plans trip"| node_map_booking
node_map_booking -->|"requests location"| node_device_location
node_map_booking -->|"reverse geocodes"| node_ola_places
node_map_booking -->|"requests directions"| node_ola_routing
node_map_booking -->|"renders route"| node_map_render
node_map_booking -->|"uses search"| node_place_search
node_home_booking -->|"uses search"| node_place_search
node_home_booking -->|"requests location"| node_device_location
node_home_booking -->|"reverse geocodes"| node_ola_places
node_home_booking -->|"requests directions"| node_ola_routing
node_place_search -->|"fetches suggestions"| node_ola_places
node_router -.->|"routes to"| node_onboarding
node_router -.->|"routes to"| node_login
node_router -.->|"routes to"| node_phone_verify
node_router -.->|"routes to"| node_otp_verify
node_router -.->|"routes to"| node_account_tab
node_router -.->|"routes to"| node_ride_history
node_themed_text -->|"gets color"| node_theme_color
node_themed_view -->|"gets color"| node_theme_color
node_theme_color -->|"reads scheme"| node_color_scheme
node_theme_color -->|"selects palette"| node_palette

click node_map_booking "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/index.tsx"
click node_home_booking "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/home.tsx"
click node_place_search "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/OlaAutocomplete.tsx"
click node_map_render "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/index.tsx"
click node_onboarding "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/onboarding.tsx"
click node_login "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/login.tsx"
click node_phone_verify "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/phone-verification.tsx"
click node_otp_verify "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/otp-verification.tsx"
click node_account_tab "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/account.tsx"
click node_ride_history "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/myrides.tsx"
click node_app_layout "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/_layout.tsx"
click node_tabs_layout "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/_layout.tsx"
click node_theme_color "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/hooks/useThemeColor.ts"
click node_color_scheme "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/hooks/useColorScheme.ts"
click node_palette "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/constants/Colors.ts"
click node_themed_text "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/components/ThemedText.tsx"
click node_themed_view "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/components/ThemedView.tsx"
click node_icon_symbol "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/components/ui/IconSymbol.tsx"
click node_tab_background "https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/components/ui/TabBarBackground.tsx"

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_map_booking,node_home_booking,node_place_search,node_ola_places,node_ola_routing,node_device_location,node_map_render toneBlue
class node_onboarding,node_login,node_phone_verify,node_otp_verify,node_account_tab,node_ride_history toneAmber
class node_app_layout,node_tabs_layout,node_theme_color,node_color_scheme,node_palette,node_themed_text,node_themed_view,node_icon_symbol,node_tab_background,node_router toneMint
class node_rider toneIndigo
```

## Components

### Ride planning

- [Map and trip options](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Home trip flow](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/home.tsx): `app/home.tsx`
- [Place autocomplete](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/OlaAutocomplete.tsx): `app/OlaAutocomplete.tsx`
- **Ola Maps places**
- **Ola Maps routing**
- **Device location**
- [Map display](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`

### Rider account

- [Onboarding](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/onboarding.tsx): `app/onboarding.tsx`
- [Login](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/login.tsx): `app/login.tsx`
- [Phone verification](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/phone-verification.tsx): `app/phone-verification.tsx`
- [OTP verification](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/otp-verification.tsx): `app/otp-verification.tsx`
- [Account tab](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/account.tsx): `app/(tabs)/account.tsx`
- [My rides](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/myrides.tsx): `app/(tabs)/myrides.tsx`

### Shared interface

- [App layout](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/_layout.tsx): `app/_layout.tsx`
- [Tab navigation](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/app/(tabs)/_layout.tsx): `app/(tabs)/_layout.tsx`
- [Theme color hook](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/hooks/useThemeColor.ts): `hooks/useThemeColor.ts`
- [Color scheme](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/hooks/useColorScheme.ts): `hooks/useColorScheme.ts`
- [Theme palette](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/constants/Colors.ts): `constants/Colors.ts`
- [Themed text](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/components/ThemedText.tsx): `components/ThemedText.tsx`
- [Themed view](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/components/ThemedView.tsx): `components/ThemedView.tsx`
- [Icon fallback](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/components/ui/IconSymbol.tsx): `components/ui/IconSymbol.tsx`
- [Tab background](https://github.com/surendharramaraj/driverhirecustomerfrontend/blob/feature-branch/components/ui/TabBarBackground.tsx): `components/ui/TabBarBackground.tsx`

### Other components

- **Rider**
- **Expo Router**

## Connections

- Rider → Expo Router: opens app (evidence: `README.md`)
- Expo Router → App layout: loads routes
- App layout → Color scheme: reads scheme (evidence: `app/_layout.tsx`)
- Tab navigation → Map and trip options: routes to (evidence: `app/(tabs)/_layout.tsx`)
- Rider → Map and trip options: plans trip
- Map and trip options → Device location: requests location (evidence: `app/(tabs)/index.tsx`)
- Map and trip options → Ola Maps places: reverse geocodes (evidence: `app/(tabs)/index.tsx`)
- Map and trip options → Ola Maps routing: requests directions (evidence: `app/(tabs)/index.tsx`)
- Map and trip options → Map display: renders route (evidence: `app/(tabs)/index.tsx`)
- Map and trip options → Place autocomplete: uses search (evidence: `app/(tabs)/index.tsx`)
- Home trip flow → Place autocomplete: uses search (evidence: `app/home.tsx`)
- Home trip flow → Device location: requests location (evidence: `app/home.tsx`)
- Home trip flow → Ola Maps places: reverse geocodes (evidence: `app/home.tsx`)
- Home trip flow → Ola Maps routing: requests directions (evidence: `app/home.tsx`)
- Place autocomplete → Ola Maps places: fetches suggestions (evidence: `app/OlaAutocomplete.tsx`)
- Expo Router → Onboarding: routes to
- Expo Router → Login: routes to
- Expo Router → Phone verification: routes to
- Expo Router → OTP verification: routes to
- Expo Router → Account tab: routes to
- Expo Router → My rides: routes to
- Themed text → Theme color hook: gets color (evidence: `components/ThemedText.tsx`)
- Themed view → Theme color hook: gets color (evidence: `components/ThemedView.tsx`)
- Theme color hook → Color scheme: reads scheme (evidence: `hooks/useThemeColor.ts`)
- Theme color hook → Theme palette: selects palette (evidence: `hooks/useThemeColor.ts`)
