# redhaziani51-source/delivery-app architecture

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

- Interactive diagram: https://gitdiagram.com/redhaziani51-source/delivery-app
- Repository: https://github.com/redhaziani51-source/delivery-app

## Overview

This repository is a small Next.js delivery-driver interface. A user opens the delivery landing page and follows its link to the driver dashboard; the driver can go online, obtain browser geolocation updates, and send location records to Supabase. The dashboard also presents an outside-map view and an inside hub, though the hub’s documents and earnings entries are display-only in the sampled code. The repository contains a separate Create Next App starter page and layout under `app/`; their relationship to the `src/app` routes is not established by the excerpts.

Main entry points: [`src/app/driver/page.tsx`](https://github.com/redhaziani51-source/delivery-app/blob/main/src/app/driver/page.tsx) (Driver dashboard), [`src/app/page.tsx`](https://github.com/redhaziani51-source/delivery-app/blob/main/src/app/page.tsx) (Delivery landing), [`src/lib/supabaseClient.ts`](https://github.com/redhaziani51-source/delivery-app/blob/main/src/lib/supabaseClient.ts) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_landing["Delivery landing<br/>[page.tsx]"]
  node_dashboard["Driver dashboard<br/>[page.tsx]"]
end

subgraph group_location["Location updates"]
  node_browser_geo["Browser geolocation"]
end

subgraph group_backend["Location backend"]
  node_supabase_client["Supabase client<br/>[supabaseClient.ts]"]
  node_driver_locations[("Driver locations")]
end

subgraph group_starter["Starter scaffold"]
  node_starter_page["Starter home page<br/>[page.tsx]"]
  node_root_layout["Starter root layout<br/>[layout.tsx]"]
end

node_user(("Driver user"))

node_user -->|"opens"| node_landing
node_landing -->|"links to"| node_dashboard
node_user -->|"uses"| node_dashboard
node_dashboard -->|"watches position"| node_browser_geo
node_dashboard -->|"upserts through"| node_supabase_client
node_dashboard -->|"upserts location"| node_driver_locations

click node_landing "https://github.com/redhaziani51-source/delivery-app/blob/main/src/app/page.tsx"
click node_dashboard "https://github.com/redhaziani51-source/delivery-app/blob/main/src/app/driver/page.tsx"
click node_supabase_client "https://github.com/redhaziani51-source/delivery-app/blob/main/src/lib/supabaseClient.ts"
click node_starter_page "https://github.com/redhaziani51-source/delivery-app/blob/main/app/page.tsx"
click node_root_layout "https://github.com/redhaziani51-source/delivery-app/blob/main/app/layout.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_landing,node_dashboard,node_user toneBlue
class node_browser_geo toneAmber
class node_supabase_client,node_driver_locations toneMint
class node_starter_page,node_root_layout toneRose
```

## Components

### Web interface

- [Delivery landing](https://github.com/redhaziani51-source/delivery-app/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Driver dashboard](https://github.com/redhaziani51-source/delivery-app/blob/main/src/app/driver/page.tsx): `src/app/driver/page.tsx`

### Location updates

- **Browser geolocation**

### Location backend

- [Supabase client](https://github.com/redhaziani51-source/delivery-app/blob/main/src/lib/supabaseClient.ts): `src/lib/supabaseClient.ts`
- **Driver locations**

### Starter scaffold

- [Starter home page](https://github.com/redhaziani51-source/delivery-app/blob/main/app/page.tsx): `app/page.tsx`
- [Starter root layout](https://github.com/redhaziani51-source/delivery-app/blob/main/app/layout.tsx): `app/layout.tsx`

### Other components

- **Driver user**

## Connections

- Driver user → Delivery landing: opens (evidence: `src/app/page.tsx`)
- Delivery landing → Driver dashboard: links to (evidence: `src/app/page.tsx`)
- Driver user → Driver dashboard: uses (evidence: `src/app/driver/page.tsx`)
- Driver dashboard → Browser geolocation: watches position (evidence: `src/app/driver/page.tsx`)
- Driver dashboard → Supabase client: upserts through (evidence: `src/app/driver/page.tsx`)
- Driver dashboard → Driver locations: upserts location (evidence: `src/app/driver/page.tsx`)
