# caesarmaulana01/driveye architecture

> Architecture diagram of the GitHub repository caesarmaulana01/driveye, 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/caesarmaulana01/driveye
- Repository: https://github.com/caesarmaulana01/driveye

## Overview

DrivEye is a Flutter driver-assistance app intended to help a driver maintain safe following distance. The documented workflow is camera imagery → vehicle detection → distance estimation → proximity warning. The tree identifies UI modules and bundled model assets, but the sampled source does not include the Dart implementation; internal calls and exact subsystem wiring therefore remain uncertain.

Main entry points: [`lib/run_model_by_image_demo.dart`](https://github.com/caesarmaulana01/driveye/blob/Master/lib/run_model_by_image_demo.dart) (Model demo), [`lib/warning_popup.dart`](https://github.com/caesarmaulana01/driveye/blob/Master/lib/warning_popup.dart) (Warning popup), [`assets/models`](https://github.com/caesarmaulana01/driveye/tree/Master/assets/models) (Detection models), [`assets/labels`](https://github.com/caesarmaulana01/driveye/tree/Master/assets/labels) (Class labels)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Driver experience"]
  node_app["App entry<br/>[main.dart]"]
  node_splash["Splash screen<br/>[splash_screen.dart]"]
  node_drive["Driving mode<br/>[driving_mode.dart]"]
  node_start["Start driving<br/>[start_driving.dart]"]
  node_image["Image selection"]
  node_success["Success screen"]
end

subgraph group_perception["Detection and distance"]
  node_inference["Model demo"]
  node_distance["Distance measurement"]
end

subgraph group_assets["Inference assets"]
  node_models["Detection models"]
  node_labels["Class labels"]
end

subgraph group_alerts["Safety alerts"]
  node_warning["Warning popup<br/>[warning_popup.dart]"]
  node_sound["Warning audio<br/>[warning.mp3]"]
end

node_driver(("Driver"))
node_camera(("Camera imagery"))

node_driver -->|"opens"| node_app
node_camera -->|"provides images"| node_inference
node_models -->|"model assets"| node_inference
node_labels -->|"class labels"| node_inference
node_inference -->|"detects vehicles"| node_distance
node_distance -->|"triggers when close"| node_warning
node_warning -.->|"plays alert"| node_sound

click node_app "https://github.com/caesarmaulana01/driveye/blob/Master/lib/main.dart"
click node_splash "https://github.com/caesarmaulana01/driveye/blob/Master/lib/splash_screen.dart"
click node_drive "https://github.com/caesarmaulana01/driveye/blob/Master/lib/driving_mode.dart"
click node_start "https://github.com/caesarmaulana01/driveye/blob/Master/lib/start_driving.dart"
click node_image "https://github.com/caesarmaulana01/driveye/blob/Master/lib/image_selection.dart"
click node_inference "https://github.com/caesarmaulana01/driveye/blob/Master/lib/run_model_by_image_demo.dart"
click node_models "https://github.com/caesarmaulana01/driveye/tree/Master/assets/models"
click node_labels "https://github.com/caesarmaulana01/driveye/tree/Master/assets/labels"
click node_warning "https://github.com/caesarmaulana01/driveye/blob/Master/lib/warning_popup.dart"
click node_sound "https://github.com/caesarmaulana01/driveye/blob/Master/assets/sounds/warning.mp3"
click node_success "https://github.com/caesarmaulana01/driveye/blob/Master/lib/success_screen.dart"

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_app,node_splash,node_drive,node_start,node_image,node_success toneBlue
class node_inference,node_distance toneAmber
class node_models,node_labels toneMint
class node_warning,node_sound toneRose
class node_driver,node_camera toneIndigo
```

## Components

### Driver experience

- [App entry](https://github.com/caesarmaulana01/driveye/blob/Master/lib/main.dart): `lib/main.dart`
- [Splash screen](https://github.com/caesarmaulana01/driveye/blob/Master/lib/splash_screen.dart): `lib/splash_screen.dart`
- [Driving mode](https://github.com/caesarmaulana01/driveye/blob/Master/lib/driving_mode.dart): `lib/driving_mode.dart`
- [Start driving](https://github.com/caesarmaulana01/driveye/blob/Master/lib/start_driving.dart): `lib/start_driving.dart`
- [Image selection](https://github.com/caesarmaulana01/driveye/blob/Master/lib/image_selection.dart): `lib/image_selection.dart`
- [Success screen](https://github.com/caesarmaulana01/driveye/blob/Master/lib/success_screen.dart): `lib/success_screen.dart`

### Detection and distance

- [Model demo](https://github.com/caesarmaulana01/driveye/blob/Master/lib/run_model_by_image_demo.dart): `lib/run_model_by_image_demo.dart`
- **Distance measurement**

### Inference assets

- [Detection models](https://github.com/caesarmaulana01/driveye/tree/Master/assets/models): `assets/models`
- [Class labels](https://github.com/caesarmaulana01/driveye/tree/Master/assets/labels): `assets/labels`

### Safety alerts

- [Warning popup](https://github.com/caesarmaulana01/driveye/blob/Master/lib/warning_popup.dart): `lib/warning_popup.dart`
- [Warning audio](https://github.com/caesarmaulana01/driveye/blob/Master/assets/sounds/warning.mp3): `assets/sounds/warning.mp3`

### Other components

- **Driver**
- **Camera imagery**

## Connections

- Driver → App entry: opens
- Camera imagery → Model demo: provides images
- Detection models → Model demo: model assets
- Class labels → Model demo: class labels
- Model demo → Distance measurement: detects vehicles
- Distance measurement → Warning popup: triggers when close
- Warning popup → Warning audio: plays alert
