# youtubeautomationn8n/ambulance-detector architecture

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

- Interactive diagram: https://gitdiagram.com/youtubeautomationn8n/ambulance-detector
- Repository: https://github.com/youtubeautomationn8n/ambulance-detector

## Overview

Green Corridor AI is a browser-based ambulance-detection demo. The user starts a simulation or switches to live camera mode; siren analysis provides early warning, while flashing-light analysis confirms the ambulance. The system scores lanes to choose the emptiest one, then displays a corridor-clearing instruction. The README describes these capabilities, but no source excerpts were provided, so implementation details beyond those documented are not shown.

Main entry points: [`index.html`](https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html) (Lane scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_demo["Ambulance demo<br/>[index.html]"]
node_siren["Siren analysis<br/>[index.html]"]
node_light["Flash detection<br/>[index.html]"]
node_lane["Lane scoring<br/>[index.html]"]
node_board["Clearance board<br/>[index.html]"]
node_camera(("Camera"))
node_microphone(("Microphone"))

node_user -->|"starts or switches"| node_demo
node_camera -->|"provides video"| node_light
node_microphone -->|"provides audio"| node_siren
node_siren -->|"warns of ambulance"| node_lane
node_light -->|"confirms ambulance"| node_lane
node_lane -->|"orders lane cleared"| node_board

click node_demo "https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html"
click node_siren "https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html"
click node_light "https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html"
click node_lane "https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html"
click node_board "https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html"

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_user toneBlue
class node_demo,node_siren,node_light,node_lane,node_board toneTeal
class node_camera,node_microphone toneIndigo
```

## Components

### Other components

- **User**
- [Ambulance demo](https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html): `index.html`
- [Siren analysis](https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html): `index.html`
- [Flash detection](https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html): `index.html`
- [Lane scoring](https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html): `index.html`
- [Clearance board](https://github.com/youtubeautomationn8n/ambulance-detector/blob/main/index.html): `index.html`
- **Camera**
- **Microphone**

## Connections

- User → Ambulance demo: starts or switches (evidence: `README.md`)
- Camera → Flash detection: provides video (evidence: `README.md`)
- Microphone → Siren analysis: provides audio (evidence: `README.md`)
- Siren analysis → Lane scoring: warns of ambulance (evidence: `README.md`)
- Flash detection → Lane scoring: confirms ambulance (evidence: `README.md`)
- Lane scoring → Clearance board: orders lane cleared (evidence: `README.md`)
