# hema2909/aidflow architecture

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

- Interactive diagram: https://gitdiagram.com/hema2909/aidflow
- Repository: https://github.com/hema2909/aidflow

## Overview

AidFlow is a React emergency-response prototype with a public landing page and a three-step ambulance request flow. The user selects an emergency type, shares contact details, obtains browser location, reviews the request, and reaches an in-app dispatch/response view; location mapping is integrated separately. The landing page also describes AI-assisted classification, ambulance dispatch, hospital suitability, and response tracking. Those latter capabilities are represented as documented product claims, not verified backend services: the supplied excerpts show no server, persistence, or actual AI/dispatch integration.

Main entry points: [`src/App.tsx`](https://github.com/hema2909/aidflow/blob/main/src/App.tsx) (Landing page), [`src/components/Hero.tsx`](https://github.com/hema2909/aidflow/blob/main/src/components/Hero.tsx) (Emergency entry), [`src/components/AISection.tsx`](https://github.com/hema2909/aidflow/blob/main/src/components/AISection.tsx) (AI capability overview), [`src/main.tsx`](https://github.com/hema2909/aidflow/blob/main/src/main.tsx) (Route entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_landing["Public landing"]
  node_home["Landing page<br/>[App.tsx]"]
  node_header["Site header<br/>[Header.tsx]"]
  node_hero["Emergency entry<br/>[Hero.tsx]"]
  node_how["Workflow overview<br/>[HowItWorks.tsx]"]
  node_ai["AI capability overview<br/>[AISection.tsx]"]
  node_disclaimer["Safety disclaimer<br/>[Disclaimer.tsx]"]
  node_footer["Site footer<br/>[Footer.tsx]"]
end

subgraph group_request["Emergency request"]
  node_router["Route entry<br/>[main.tsx]"]
  node_emergency["Emergency request"]
end

subgraph group_location["Location services"]
  node_map["Live location map"]
  node_browsergeo["Browser geolocation"]
  node_googlemaps["Google Maps API"]
end

subgraph group_response["Response coordination"]
  node_ai_classify["AI classification<br/>[AISection.tsx]"]
  node_ambulance["Ambulance dispatch<br/>[AISection.tsx]"]
  node_hospital["Hospital suitability<br/>[AISection.tsx]"]
  node_tracking["Response tracking<br/>[HowItWorks.tsx]"]
end

subgraph group_presentation["Presentation helpers"]
  node_animated["Animated heading"]
  node_fade["Fade animation<br/>[FadeIn.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens app"| node_router
node_router -->|"routes to /"| node_home
node_router -->|"routes to /emergency"| node_emergency
node_home -->|"renders"| node_header
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_how
node_home -->|"renders"| node_ai
node_home -->|"renders"| node_disclaimer
node_home -->|"renders"| node_footer
node_hero -->|"links to request"| node_visitor
node_hero -->|"renders"| node_animated
node_hero -->|"renders"| node_fade
node_visitor -->|"submits request"| node_emergency
node_emergency -->|"renders"| node_map
node_map -->|"reads location"| node_browsergeo
node_map -->|"loads map"| node_googlemaps
node_ai -->|"describes"| node_ai_classify
node_ai -->|"describes"| node_ambulance
node_ai -->|"describes"| node_hospital
node_how -->|"describes"| node_tracking

click node_router "https://github.com/hema2909/aidflow/blob/main/src/main.tsx"
click node_home "https://github.com/hema2909/aidflow/blob/main/src/App.tsx"
click node_header "https://github.com/hema2909/aidflow/blob/main/src/components/Header.tsx"
click node_hero "https://github.com/hema2909/aidflow/blob/main/src/components/Hero.tsx"
click node_how "https://github.com/hema2909/aidflow/blob/main/src/components/HowItWorks.tsx"
click node_ai "https://github.com/hema2909/aidflow/blob/main/src/components/AISection.tsx"
click node_disclaimer "https://github.com/hema2909/aidflow/blob/main/src/components/Disclaimer.tsx"
click node_footer "https://github.com/hema2909/aidflow/blob/main/src/components/Footer.tsx"
click node_emergency "https://github.com/hema2909/aidflow/blob/main/src/pages/ReportEmergency.tsx"
click node_map "https://github.com/hema2909/aidflow/blob/main/src/components/LiveLocationMap.tsx"
click node_ai_classify "https://github.com/hema2909/aidflow/blob/main/src/components/AISection.tsx"
click node_ambulance "https://github.com/hema2909/aidflow/blob/main/src/components/AISection.tsx"
click node_hospital "https://github.com/hema2909/aidflow/blob/main/src/components/AISection.tsx"
click node_tracking "https://github.com/hema2909/aidflow/blob/main/src/components/HowItWorks.tsx"
click node_animated "https://github.com/hema2909/aidflow/blob/main/src/components/AnimatedHeading.tsx"
click node_fade "https://github.com/hema2909/aidflow/blob/main/src/components/FadeIn.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_home,node_header,node_hero,node_how,node_ai,node_disclaimer,node_footer toneBlue
class node_router,node_emergency toneAmber
class node_map,node_browsergeo,node_googlemaps toneMint
class node_ai_classify,node_ambulance,node_hospital,node_tracking toneRose
class node_animated,node_fade,node_visitor toneIndigo
```

## Components

### Public landing

- [Landing page](https://github.com/hema2909/aidflow/blob/main/src/App.tsx): `src/App.tsx`
- [Site header](https://github.com/hema2909/aidflow/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Emergency entry](https://github.com/hema2909/aidflow/blob/main/src/components/Hero.tsx): `src/components/Hero.tsx`
- [Workflow overview](https://github.com/hema2909/aidflow/blob/main/src/components/HowItWorks.tsx): `src/components/HowItWorks.tsx`
- [AI capability overview](https://github.com/hema2909/aidflow/blob/main/src/components/AISection.tsx): `src/components/AISection.tsx`
- [Safety disclaimer](https://github.com/hema2909/aidflow/blob/main/src/components/Disclaimer.tsx): `src/components/Disclaimer.tsx`
- [Site footer](https://github.com/hema2909/aidflow/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Emergency request

- [Route entry](https://github.com/hema2909/aidflow/blob/main/src/main.tsx): `src/main.tsx`
- [Emergency request](https://github.com/hema2909/aidflow/blob/main/src/pages/ReportEmergency.tsx): `src/pages/ReportEmergency.tsx`

### Location services

- [Live location map](https://github.com/hema2909/aidflow/blob/main/src/components/LiveLocationMap.tsx): `src/components/LiveLocationMap.tsx`
- **Browser geolocation**
- **Google Maps API**

### Response coordination

- [AI classification](https://github.com/hema2909/aidflow/blob/main/src/components/AISection.tsx): `src/components/AISection.tsx`
- [Ambulance dispatch](https://github.com/hema2909/aidflow/blob/main/src/components/AISection.tsx): `src/components/AISection.tsx`
- [Hospital suitability](https://github.com/hema2909/aidflow/blob/main/src/components/AISection.tsx): `src/components/AISection.tsx`
- [Response tracking](https://github.com/hema2909/aidflow/blob/main/src/components/HowItWorks.tsx): `src/components/HowItWorks.tsx`

### Presentation helpers

- [Animated heading](https://github.com/hema2909/aidflow/blob/main/src/components/AnimatedHeading.tsx): `src/components/AnimatedHeading.tsx`
- [Fade animation](https://github.com/hema2909/aidflow/blob/main/src/components/FadeIn.tsx): `src/components/FadeIn.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Route entry: opens app (evidence: `src/main.tsx`)
- Route entry → Landing page: routes to / (evidence: `src/main.tsx`)
- Route entry → Emergency request: routes to /emergency (evidence: `src/main.tsx`)
- Landing page → Site header: renders (evidence: `src/App.tsx`)
- Landing page → Emergency entry: renders (evidence: `src/App.tsx`)
- Landing page → Workflow overview: renders (evidence: `src/App.tsx`)
- Landing page → AI capability overview: renders (evidence: `src/App.tsx`)
- Landing page → Safety disclaimer: renders (evidence: `src/App.tsx`)
- Landing page → Site footer: renders (evidence: `src/App.tsx`)
- Emergency entry → Visitor: links to request (evidence: `src/components/Hero.tsx`)
- Emergency entry → Animated heading: renders (evidence: `src/components/Hero.tsx`)
- Emergency entry → Fade animation: renders (evidence: `src/components/Hero.tsx`)
- Visitor → Emergency request: submits request (evidence: `src/pages/ReportEmergency.tsx`)
- Emergency request → Live location map: renders (evidence: `src/pages/ReportEmergency.tsx`)
- Live location map → Browser geolocation: reads location (evidence: `src/components/LiveLocationMap.tsx`)
- Live location map → Google Maps API: loads map (evidence: `src/components/LiveLocationMap.tsx`)
- AI capability overview → AI classification: describes (evidence: `src/components/AISection.tsx`)
- AI capability overview → Ambulance dispatch: describes (evidence: `src/components/AISection.tsx`)
- AI capability overview → Hospital suitability: describes (evidence: `src/components/AISection.tsx`)
- Workflow overview → Response tracking: describes (evidence: `src/components/HowItWorks.tsx`)
