# lloonnn/birdeyev33 architecture

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

- Interactive diagram: https://gitdiagram.com/lloonnn/birdeyev33
- Repository: https://github.com/lloonnn/birdeyev33

## Overview

Bird Eye is a road-defect patrol and maintenance product. Its documented end-to-end workflow is patrol detection and GPS localization, urgency ranking, repair drafting and supervisor review, crew repair, then later-patrol verification. The checked-in tree implements a staff dashboard and an Android shift-scanning shell, but the backend and ML packages have no visible implementation here; the Android screens explicitly mark detection and upload counts as placeholders. Dashboard-to-service connections and several documented processing stages are therefore shown only as unverified or documented relationships, not as inspected code.

Main entry points: [`eagle/app/src/main/java/com/birdeye/MainActivity.kt`](https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/MainActivity.kt) (App entry), [`dashboard/components/overview/overview.tsx`](https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/overview/overview.tsx) (Dashboard overview), [`ml/src/ml`](https://github.com/lloonnn/birdeyev33/tree/main/ml/src/ml) (Detection model), [`backend/src/backend`](https://github.com/lloonnn/birdeyev33/tree/main/backend/src/backend) (Repair job drafting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_patrol["Patrol app"]
  node_main["App entry<br/>[MainActivity.kt]"]
  node_shift["Shift state and GPS<br/>[ShiftViewModel.kt]"]
  node_start["Shift readiness"]
  node_scan["Scanning screen<br/>[ScanningScreen.kt]"]
  node_summary["Shift summary"]
  node_theme["Patrol theme<br/>[BirdEyeTheme.kt]"]
end

subgraph group_staff["Staff dashboard"]
  node_dashboard["Dashboard overview<br/>[overview.tsx]"]
  node_map["Defect map<br/>[leaflet-map.tsx]"]
  node_defect["Defect details<br/>[defect-panel.tsx]"]
  node_review["Review queue<br/>[review-queue.tsx]"]
  node_orders["Work orders"]
  node_orderdetail["Work-order details"]
end

subgraph group_services["Processing services"]
  node_api["Backend API and jobs"]
  node_ml["Detection model"]
end

subgraph group_maintenance["Maintenance workflow"]
  node_rank["Urgency ranking"]
  node_draft["Repair job drafting"]
  node_crew(("Repair crew"))
  node_verification["Repair verification"]
end

node_driver(("Patrol driver"))
node_staff(("Maintenance staff"))

node_driver -->|"uses"| node_main
node_main -->|"holds state"| node_shift
node_main -->|"shows"| node_start
node_main -->|"shows"| node_scan
node_main -->|"shows"| node_summary
node_main -->|"applies"| node_theme
node_main -->|"starts shift"| node_start
node_main -->|"starts location"| node_shift
node_staff -->|"views"| node_dashboard
node_dashboard -.->|"renders"| node_map
node_dashboard -.->|"shows details"| node_defect
node_staff -->|"reviews detections"| node_review
node_review -.->|"submits answers"| node_api
node_staff -->|"manages jobs"| node_orders
node_orders -.->|"opens details"| node_orderdetail
node_main -.->|"captures detections"| node_ml
node_ml -.->|"sends sightings"| node_api
node_api -.->|"provides defects"| node_rank
node_rank -.->|"prioritizes"| node_draft
node_draft -.->|"requests approval"| node_review
node_draft -.->|"creates repair job"| node_crew
node_crew -.->|"repairs road"| node_verification
node_ml -.->|"checks later sightings"| node_verification
node_verification -.->|"reopens if present"| node_rank

click node_main "https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/MainActivity.kt"
click node_shift "https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/ShiftViewModel.kt"
click node_start "https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/StartShiftScreen.kt"
click node_scan "https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/ScanningScreen.kt"
click node_summary "https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/EndOfShiftScreen.kt"
click node_theme "https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/ui/theme/BirdEyeTheme.kt"
click node_dashboard "https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/overview/overview.tsx"
click node_map "https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/map/leaflet-map.tsx"
click node_defect "https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/overview/defect-panel.tsx"
click node_review "https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/review/review-queue.tsx"
click node_orders "https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/work-orders/work-orders-page.tsx"
click node_orderdetail "https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/work-orders/work-order-sheet.tsx"
click node_api "https://github.com/lloonnn/birdeyev33/tree/main/backend/src/backend"
click node_ml "https://github.com/lloonnn/birdeyev33/tree/main/ml/src/ml"
click node_rank "https://github.com/lloonnn/birdeyev33/tree/main/backend/src/backend"
click node_draft "https://github.com/lloonnn/birdeyev33/tree/main/backend/src/backend"
click node_verification "https://github.com/lloonnn/birdeyev33/tree/main/backend/src/backend"

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_main,node_shift,node_start,node_scan,node_summary,node_theme toneBlue
class node_dashboard,node_map,node_defect,node_review,node_orders,node_orderdetail toneAmber
class node_api,node_ml toneMint
class node_rank,node_draft,node_crew,node_verification toneRose
class node_driver,node_staff toneIndigo
```

## Components

### Patrol app

- [App entry](https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/MainActivity.kt): `eagle/app/src/main/java/com/birdeye/MainActivity.kt`
- [Shift state and GPS](https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/ShiftViewModel.kt): `eagle/app/src/main/java/com/birdeye/ShiftViewModel.kt`
- [Shift readiness](https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/StartShiftScreen.kt): `eagle/app/src/main/java/com/birdeye/StartShiftScreen.kt`
- [Scanning screen](https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/ScanningScreen.kt): `eagle/app/src/main/java/com/birdeye/ScanningScreen.kt`
- [Shift summary](https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/EndOfShiftScreen.kt): `eagle/app/src/main/java/com/birdeye/EndOfShiftScreen.kt`
- [Patrol theme](https://github.com/lloonnn/birdeyev33/blob/main/eagle/app/src/main/java/com/birdeye/ui/theme/BirdEyeTheme.kt): `eagle/app/src/main/java/com/birdeye/ui/theme/BirdEyeTheme.kt`

### Staff dashboard

- [Dashboard overview](https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/overview/overview.tsx): `dashboard/components/overview/overview.tsx`
- [Defect map](https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/map/leaflet-map.tsx): `dashboard/components/map/leaflet-map.tsx`
- [Defect details](https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/overview/defect-panel.tsx): `dashboard/components/overview/defect-panel.tsx`
- [Review queue](https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/review/review-queue.tsx): `dashboard/components/review/review-queue.tsx`
- [Work orders](https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/work-orders/work-orders-page.tsx): `dashboard/components/work-orders/work-orders-page.tsx`
- [Work-order details](https://github.com/lloonnn/birdeyev33/blob/main/dashboard/components/work-orders/work-order-sheet.tsx): `dashboard/components/work-orders/work-order-sheet.tsx`

### Processing services

- [Backend API and jobs](https://github.com/lloonnn/birdeyev33/tree/main/backend/src/backend): `backend/src/backend`
- [Detection model](https://github.com/lloonnn/birdeyev33/tree/main/ml/src/ml): `ml/src/ml`

### Maintenance workflow

- [Urgency ranking](https://github.com/lloonnn/birdeyev33/tree/main/backend/src/backend): `backend/src/backend`
- [Repair job drafting](https://github.com/lloonnn/birdeyev33/tree/main/backend/src/backend): `backend/src/backend`
- **Repair crew**
- [Repair verification](https://github.com/lloonnn/birdeyev33/tree/main/backend/src/backend): `backend/src/backend`

### Other components

- **Patrol driver**
- **Maintenance staff**

## Connections

- Patrol driver → App entry: uses
- App entry → Shift state and GPS: holds state (evidence: `eagle/app/src/main/java/com/birdeye/MainActivity.kt`)
- App entry → Shift readiness: shows (evidence: `eagle/app/src/main/java/com/birdeye/MainActivity.kt`)
- App entry → Scanning screen: shows (evidence: `eagle/app/src/main/java/com/birdeye/MainActivity.kt`)
- App entry → Shift summary: shows (evidence: `eagle/app/src/main/java/com/birdeye/MainActivity.kt`)
- App entry → Patrol theme: applies (evidence: `eagle/app/src/main/java/com/birdeye/MainActivity.kt`)
- App entry → Shift readiness: starts shift (evidence: `eagle/app/src/main/java/com/birdeye/MainActivity.kt`)
- App entry → Shift state and GPS: starts location (evidence: `eagle/app/src/main/java/com/birdeye/MainActivity.kt`)
- Maintenance staff → Dashboard overview: views
- Dashboard overview → Defect map: renders
- Dashboard overview → Defect details: shows details
- Maintenance staff → Review queue: reviews detections (evidence: `dashboard/components/review/review-queue.tsx`)
- Review queue → Backend API and jobs: submits answers
- Maintenance staff → Work orders: manages jobs
- Work orders → Work-order details: opens details
- App entry → Detection model: captures detections
- Detection model → Backend API and jobs: sends sightings
- Backend API and jobs → Urgency ranking: provides defects
- Urgency ranking → Repair job drafting: prioritizes
- Repair job drafting → Review queue: requests approval
- Repair job drafting → Repair crew: creates repair job
- Repair crew → Repair verification: repairs road
- Detection model → Repair verification: checks later sightings
- Repair verification → Urgency ranking: reopens if present
