# ashlesa298/incidentflow-ai architecture

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

- Interactive diagram: https://gitdiagram.com/ashlesa298/incidentflow-ai
- Repository: https://github.com/ashlesa298/incidentflow-ai

## Overview

IncidentFlow AI is a web platform for teams to authenticate, manage incidents, review operational analytics, and use AI for incident analysis or engineering questions. Users work through the React application; its REST client connects to Spring controllers, which delegate to domain services and persistence or AI integrations. The README also describes reporting/export and role-based access; the tree identifies those UI modules, but their implementation and several controller relationships were not sampled, so those links are omitted or documented cautiously.

Main entry points: [`frontend/src/App.tsx`](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/App.tsx) (Application shell), [`frontend/src/components/IncidentList.tsx`](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/IncidentList.tsx) (Incident workspace), [`backend/src/main/java/com/incidentflow/incidentflow/controller/AuthController.java`](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/controller/AuthController.java) (Auth endpoints), [`backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIAnalysisService.java`](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIAnalysisService.java) (Analysis workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["Application shell<br/>[App.tsx]"]
  node_dashboard_ui["Dashboard analytics<br/>[Dashboard.tsx]"]
  node_incident_ui["Incident workspace<br/>[IncidentList.tsx]"]
  node_create_ui["Create incident<br/>[CreateIncident.tsx]"]
  node_edit_ui["Edit incident<br/>[EditIncident.tsx]"]
  node_details_ui["Incident details"]
  node_reports_ui["Reports export<br/>[Reports.tsx]"]
  node_settings_ui["Settings<br/>[Settings.tsx]"]
  node_login_ui["Login<br/>[Login.tsx]"]
  node_ai_ui["AI insights<br/>[AIInsights.tsx]"]
  node_web_api["REST client<br/>[api.ts]"]
  node_auth_client["Auth client<br/>[authApi.ts]"]
  node_incident_client["Incident client<br/>[incidentApi.ts]"]
end

subgraph group_api["REST application"]
  node_incident_controller["Incident endpoints"]
  node_dashboard_controller["Dashboard endpoint"]
  node_auth_controller["Auth endpoints"]
  node_ai_controller["Analysis endpoint"]
end

subgraph group_identity["Identity and access"]
  node_auth_service["Registration<br/>[AuthService.java]"]
  node_user_store[("User repository")]
  node_jwt_service["JWT tokens<br/>[JwtService.java]"]
end

subgraph group_domain["Incident data"]
  node_incident_service["Incident operations"]
  node_incident_store[("Incident repository")]
  node_dashboard_service["Dashboard metrics"]
end

subgraph group_intelligence["AI assistance"]
  node_analysis_service["Analysis workflow"]
  node_analysis_store[("Analysis repository")]
  node_gemini["Gemini provider"]
  node_chat_service["AI chat service<br/>[AIChatService.java]"]
end

node_user(("Team user"))
node_gemini_service{{"Gemini API"}}

node_user -->|"uses"| node_app
node_app -->|"loads metrics"| node_web_api
node_web_api -.->|"requests"| node_dashboard_controller
node_app -->|"logs in"| node_auth_client
node_auth_client -.->|"REST auth"| node_auth_controller
node_app -->|"renders"| node_incident_ui
node_incident_ui -.->|"opens"| node_create_ui
node_incident_ui -.->|"opens"| node_edit_ui
node_incident_ui -.->|"opens"| node_details_ui
node_incident_ui -.->|"uses"| node_incident_client
node_incident_client -.->|"REST incidents"| node_incident_controller
node_app -.->|"renders"| node_dashboard_ui
node_app -.->|"renders"| node_reports_ui
node_app -->|"renders"| node_settings_ui
node_app -->|"renders"| node_ai_ui
node_ai_ui -.->|"requests analysis"| node_ai_controller
node_incident_controller -->|"delegates"| node_incident_service
node_incident_service -->|"reads/writes"| node_incident_store
node_dashboard_controller -->|"delegates"| node_dashboard_service
node_dashboard_service -->|"reads incidents"| node_incident_store
node_auth_controller -->|"registers"| node_auth_service
node_auth_controller -->|"looks up user"| node_user_store
node_auth_controller -->|"issues token"| node_jwt_service
node_auth_service -->|"saves user"| node_user_store
node_ai_controller -->|"delegates"| node_analysis_service
node_analysis_service -->|"loads incident"| node_incident_store
node_analysis_service -->|"reads/writes"| node_analysis_store
node_analysis_service -->|"requests analysis"| node_gemini
node_gemini -->|"generates content"| node_gemini_service
node_chat_service -.->|"provider contract"| node_gemini

click node_app "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/App.tsx"
click node_dashboard_ui "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/Dashboard.tsx"
click node_incident_ui "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/IncidentList.tsx"
click node_create_ui "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/CreateIncident.tsx"
click node_edit_ui "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/EditIncident.tsx"
click node_details_ui "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/IncidentDetails.tsx"
click node_reports_ui "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/Reports.tsx"
click node_settings_ui "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/Settings.tsx"
click node_login_ui "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/Login.tsx"
click node_ai_ui "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/AIInsights.tsx"
click node_web_api "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/services/api.ts"
click node_auth_client "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/services/authApi.ts"
click node_incident_client "https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/services/incidentApi.ts"
click node_incident_controller "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/controller/IncidentController.java"
click node_dashboard_controller "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/controller/DashboardController.java"
click node_auth_controller "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/controller/AuthController.java"
click node_ai_controller "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/controller/AIAnalysisController.java"
click node_incident_service "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/service/IncidentService.java"
click node_incident_store "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/repository/IncidentRepository.java"
click node_dashboard_service "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/service/DashboardService.java"
click node_auth_service "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/service/AuthService.java"
click node_user_store "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/repository/UserRepository.java"
click node_jwt_service "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/security/JwtService.java"
click node_analysis_service "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIAnalysisService.java"
click node_analysis_store "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/ai/repository/AIAnalysisRepository.java"
click node_gemini "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/ai/service/GeminiAIProviderService.java"
click node_chat_service "https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIChatService.java"

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_dashboard_ui,node_incident_ui,node_create_ui,node_edit_ui,node_details_ui,node_reports_ui,node_settings_ui,node_login_ui,node_ai_ui,node_web_api,node_auth_client,node_incident_client,node_user toneBlue
class node_incident_controller,node_dashboard_controller,node_auth_controller,node_ai_controller toneAmber
class node_auth_service,node_user_store,node_jwt_service,node_gemini_service toneMint
class node_incident_service,node_incident_store,node_dashboard_service toneRose
class node_analysis_service,node_analysis_store,node_gemini,node_chat_service toneIndigo
```

## Components

### Web experience

- [Application shell](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Dashboard analytics](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/Dashboard.tsx): `frontend/src/components/Dashboard.tsx`
- [Incident workspace](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/IncidentList.tsx): `frontend/src/components/IncidentList.tsx`
- [Create incident](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/CreateIncident.tsx): `frontend/src/components/CreateIncident.tsx`
- [Edit incident](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/EditIncident.tsx): `frontend/src/components/EditIncident.tsx`
- [Incident details](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/IncidentDetails.tsx): `frontend/src/components/IncidentDetails.tsx`
- [Reports export](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/Reports.tsx): `frontend/src/components/Reports.tsx`
- [Settings](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/Settings.tsx): `frontend/src/components/Settings.tsx`
- [Login](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/Login.tsx): `frontend/src/components/Login.tsx`
- [AI insights](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/components/AIInsights.tsx): `frontend/src/components/AIInsights.tsx`
- [REST client](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [Auth client](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/services/authApi.ts): `frontend/src/services/authApi.ts`
- [Incident client](https://github.com/ashlesa298/incidentflow-ai/blob/master/frontend/src/services/incidentApi.ts): `frontend/src/services/incidentApi.ts`

### REST application

- [Incident endpoints](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/controller/IncidentController.java): `backend/src/main/java/com/incidentflow/incidentflow/controller/IncidentController.java`
- [Dashboard endpoint](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/controller/DashboardController.java): `backend/src/main/java/com/incidentflow/incidentflow/controller/DashboardController.java`
- [Auth endpoints](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/controller/AuthController.java): `backend/src/main/java/com/incidentflow/incidentflow/controller/AuthController.java`
- [Analysis endpoint](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/controller/AIAnalysisController.java): `backend/src/main/java/com/incidentflow/incidentflow/controller/AIAnalysisController.java`

### Identity and access

- [Registration](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/service/AuthService.java): `backend/src/main/java/com/incidentflow/incidentflow/service/AuthService.java`
- [User repository](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/repository/UserRepository.java): `backend/src/main/java/com/incidentflow/incidentflow/repository/UserRepository.java`
- [JWT tokens](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/security/JwtService.java): `backend/src/main/java/com/incidentflow/incidentflow/security/JwtService.java`

### Incident data

- [Incident operations](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/service/IncidentService.java): `backend/src/main/java/com/incidentflow/incidentflow/service/IncidentService.java`
- [Incident repository](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/repository/IncidentRepository.java): `backend/src/main/java/com/incidentflow/incidentflow/repository/IncidentRepository.java`
- [Dashboard metrics](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/service/DashboardService.java): `backend/src/main/java/com/incidentflow/incidentflow/service/DashboardService.java`

### AI assistance

- [Analysis workflow](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIAnalysisService.java): `backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIAnalysisService.java`
- [Analysis repository](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/ai/repository/AIAnalysisRepository.java): `backend/src/main/java/com/incidentflow/incidentflow/ai/repository/AIAnalysisRepository.java`
- [Gemini provider](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/ai/service/GeminiAIProviderService.java): `backend/src/main/java/com/incidentflow/incidentflow/ai/service/GeminiAIProviderService.java`
- [AI chat service](https://github.com/ashlesa298/incidentflow-ai/blob/master/backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIChatService.java): `backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIChatService.java`

### Other components

- **Team user**
- **Gemini API**

## Connections

- Team user → Application shell: uses (evidence: `README.md`)
- Application shell → REST client: loads metrics (evidence: `frontend/src/App.tsx`)
- REST client → Dashboard endpoint: requests
- Application shell → Auth client: logs in (evidence: `frontend/src/App.tsx`)
- Auth client → Auth endpoints: REST auth
- Application shell → Incident workspace: renders (evidence: `frontend/src/App.tsx`)
- Incident workspace → Create incident: opens (evidence: `frontend/src/components/IncidentList.tsx`)
- Incident workspace → Edit incident: opens (evidence: `frontend/src/components/IncidentList.tsx`)
- Incident workspace → Incident details: opens (evidence: `frontend/src/components/IncidentList.tsx`)
- Incident workspace → Incident client: uses (evidence: `frontend/src/components/IncidentList.tsx`)
- Incident client → Incident endpoints: REST incidents
- Application shell → Dashboard analytics: renders (evidence: `frontend/src/App.tsx`)
- Application shell → Reports export: renders (evidence: `frontend/src/App.tsx`)
- Application shell → Settings: renders (evidence: `frontend/src/App.tsx`)
- Application shell → AI insights: renders (evidence: `frontend/src/App.tsx`)
- AI insights → Analysis endpoint: requests analysis
- Incident endpoints → Incident operations: delegates (evidence: `backend/src/main/java/com/incidentflow/incidentflow/controller/IncidentController.java`)
- Incident operations → Incident repository: reads/writes (evidence: `backend/src/main/java/com/incidentflow/incidentflow/service/IncidentService.java`)
- Dashboard endpoint → Dashboard metrics: delegates (evidence: `backend/src/main/java/com/incidentflow/incidentflow/service/DashboardService.java`)
- Dashboard metrics → Incident repository: reads incidents (evidence: `backend/src/main/java/com/incidentflow/incidentflow/service/DashboardService.java`)
- Auth endpoints → Registration: registers (evidence: `backend/src/main/java/com/incidentflow/incidentflow/controller/AuthController.java`)
- Auth endpoints → User repository: looks up user (evidence: `backend/src/main/java/com/incidentflow/incidentflow/controller/AuthController.java`)
- Auth endpoints → JWT tokens: issues token (evidence: `backend/src/main/java/com/incidentflow/incidentflow/controller/AuthController.java`)
- Registration → User repository: saves user (evidence: `backend/src/main/java/com/incidentflow/incidentflow/service/AuthService.java`)
- Analysis endpoint → Analysis workflow: delegates (evidence: `backend/src/main/java/com/incidentflow/incidentflow/controller/AIAnalysisController.java`)
- Analysis workflow → Incident repository: loads incident (evidence: `backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIAnalysisService.java`)
- Analysis workflow → Analysis repository: reads/writes (evidence: `backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIAnalysisService.java`)
- Analysis workflow → Gemini provider: requests analysis (evidence: `backend/src/main/java/com/incidentflow/incidentflow/ai/service/AIAnalysisService.java`)
- Gemini provider → Gemini API: generates content (evidence: `backend/src/main/java/com/incidentflow/incidentflow/ai/service/GeminiAIProviderService.java`)
- AI chat service → Gemini provider: provider contract
