# nidhiesh/rapidrescue- architecture

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

- Interactive diagram: https://gitdiagram.com/nidhiesh/rapidrescue-
- Repository: https://github.com/nidhiesh/rapidrescue-

## Overview

RapidRescue is a driver-facing mobile app with a welcome entry, authentication and registration screens, and a driver dashboard. The evidenced workflow is welcome → login; authentication state delegates requests to a service abstraction currently backed by an in-memory mock. The welcome screen advertises emergency alerts, scene navigation, and a verified-responder network, but the available excerpts do not establish their implementation or connections. The dashboard and several auth screens are included as documented-by-tree runtime areas; their internal behavior was not sampled.

Main entry points: [`app/index.tsx`](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/index.tsx) (Welcome), [`src/services/auth/authService.ts`](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/services/auth/authService.ts) (Auth Service), [`src/types/auth.ts`](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/types/auth.ts) (Auth Types), [`src/context/AuthContext.tsx`](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/context/AuthContext.tsx) (Auth State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screens["App Screens"]
  node_welcome["Welcome<br/>[index.tsx]"]
  node_login["Login<br/>[login.tsx]"]
  node_registration["Registration<br/>[register.tsx]"]
  node_register_success["Registration Success"]
  node_forgot_password["Forgot Password"]
  node_driver_dashboard["Driver Dashboard<br/>[dashboard.tsx]"]
end

subgraph group_auth["Authentication"]
  node_auth_context["Auth State<br/>[AuthContext.tsx]"]
  node_auth_service["Auth Service<br/>[authService.ts]"]
  node_mock_auth["Mock Auth<br/>[mockAuthService.ts]"]
  node_api_client["API Placeholder<br/>[apiClient.ts]"]
end

subgraph group_ui["Shared UI"]
  node_button["Button<br/>[Button.tsx]"]
  node_card["Card<br/>[Card.tsx]"]
  node_badge["Badge<br/>[Badge.tsx]"]
  node_input_field["Input Field<br/>[InputField.tsx]"]
  node_screen_wrapper["Screen Wrapper<br/>[ScreenWrapper.tsx]"]
end

subgraph group_foundation["App Foundation"]
  node_auth_types["Auth Types<br/>[auth.ts]"]
  node_common_types["Common Types<br/>[common.ts]"]
  node_driver_types["Driver Types<br/>[driver.ts]"]
  node_validation["Validation<br/>[validation.ts]"]
end

node_user(("Driver"))

node_user -->|"opens app"| node_welcome
node_welcome -->|"routes to"| node_login
node_auth_context -->|"delegates auth"| node_auth_service
node_auth_service -->|"uses implementation"| node_mock_auth
node_auth_service -->|"uses contracts"| node_auth_types
node_mock_auth -->|"uses contracts"| node_auth_types
node_auth_context -->|"uses contracts"| node_auth_types
node_welcome -->|"renders"| node_button
node_welcome -->|"renders"| node_card
node_welcome -->|"renders"| node_badge
node_welcome -->|"renders"| node_screen_wrapper

click node_welcome "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/index.tsx"
click node_login "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(auth)/login.tsx"
click node_registration "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(auth)/register.tsx"
click node_register_success "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(auth)/register-success.tsx"
click node_forgot_password "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(auth)/forgot-password.tsx"
click node_driver_dashboard "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(driver)/dashboard.tsx"
click node_auth_context "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/context/AuthContext.tsx"
click node_auth_service "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/services/auth/authService.ts"
click node_mock_auth "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/services/auth/mockAuthService.ts"
click node_api_client "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/services/api/apiClient.ts"
click node_auth_types "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/types/auth.ts"
click node_common_types "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/types/common.ts"
click node_driver_types "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/types/driver.ts"
click node_button "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/Button.tsx"
click node_card "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/Card.tsx"
click node_badge "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/Badge.tsx"
click node_input_field "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/InputField.tsx"
click node_screen_wrapper "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/ScreenWrapper.tsx"
click node_validation "https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/utils/validation.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_welcome,node_login,node_registration,node_register_success,node_forgot_password,node_driver_dashboard toneBlue
class node_auth_context,node_auth_service,node_mock_auth,node_api_client toneAmber
class node_button,node_card,node_badge,node_input_field,node_screen_wrapper toneMint
class node_auth_types,node_common_types,node_driver_types,node_validation toneRose
class node_user toneIndigo
```

## Components

### App Screens

- [Welcome](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/index.tsx): `app/index.tsx`
- [Login](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(auth)/login.tsx): `app/(auth)/login.tsx`
- [Registration](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(auth)/register.tsx): `app/(auth)/register.tsx`
- [Registration Success](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(auth)/register-success.tsx): `app/(auth)/register-success.tsx`
- [Forgot Password](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(auth)/forgot-password.tsx): `app/(auth)/forgot-password.tsx`
- [Driver Dashboard](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/app/(driver)/dashboard.tsx): `app/(driver)/dashboard.tsx`

### Authentication

- [Auth State](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Auth Service](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/services/auth/authService.ts): `src/services/auth/authService.ts`
- [Mock Auth](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/services/auth/mockAuthService.ts): `src/services/auth/mockAuthService.ts`
- [API Placeholder](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/services/api/apiClient.ts): `src/services/api/apiClient.ts`

### Shared UI

- [Button](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/Button.tsx): `src/components/common/Button.tsx`
- [Card](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/Card.tsx): `src/components/common/Card.tsx`
- [Badge](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/Badge.tsx): `src/components/common/Badge.tsx`
- [Input Field](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/InputField.tsx): `src/components/common/InputField.tsx`
- [Screen Wrapper](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/components/common/ScreenWrapper.tsx): `src/components/common/ScreenWrapper.tsx`

### App Foundation

- [Auth Types](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/types/auth.ts): `src/types/auth.ts`
- [Common Types](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/types/common.ts): `src/types/common.ts`
- [Driver Types](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/types/driver.ts): `src/types/driver.ts`
- [Validation](https://github.com/nidhiesh/rapidrescue-/blob/g-driverapp/src/utils/validation.ts): `src/utils/validation.ts`

### Other components

- **Driver**

## Connections

- Driver → Welcome: opens app (evidence: `app/index.tsx`)
- Welcome → Login: routes to (evidence: `app/index.tsx`)
- Auth State → Auth Service: delegates auth (evidence: `src/context/AuthContext.tsx`)
- Auth Service → Mock Auth: uses implementation (evidence: `src/services/auth/authService.ts`)
- Auth Service → Auth Types: uses contracts (evidence: `src/services/auth/authService.ts`)
- Mock Auth → Auth Types: uses contracts (evidence: `src/services/auth/mockAuthService.ts`)
- Auth State → Auth Types: uses contracts (evidence: `src/context/AuthContext.tsx`)
- Welcome → Button: renders (evidence: `app/index.tsx`)
- Welcome → Card: renders (evidence: `app/index.tsx`)
- Welcome → Badge: renders (evidence: `app/index.tsx`)
- Welcome → Screen Wrapper: renders (evidence: `app/index.tsx`)
