# amanmourya0/3r-analyzer-intelligence-platform architecture

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

- Interactive diagram: https://gitdiagram.com/amanmourya0/3r-analyzer-intelligence-platform
- Repository: https://github.com/amanmourya0/3r-analyzer-intelligence-platform

## Overview

3R Analyzer is an incident-intelligence platform: users upload or load incident data, run analysis, track processing jobs, and explore dashboards, clusters, tickets, and reports. The README documents the processing stages and product capabilities; source excerpts confirm the application entry point, pipeline orchestration, frontend API calls, and selected persistence and query behavior. Several service and route implementations were not sampled, so those connections are omitted or marked unverified rather than inferred.

Main entry points: [`backend/app/pipelines/incident_pipeline.py`](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/pipelines/incident_pipeline.py) (Incident pipeline), [`backend/app/main.py`](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/main.py) (FastAPI application), [`frontend/src/api.js`](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/frontend/src/api.js) (API client), [`frontend/src/App.jsx`](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/frontend/src/App.jsx) (React application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web experience"]
  node_web["React application<br/>[App.jsx]"]
  node_clientapi["API client<br/>[api.js]"]
  node_pages["Analysis pages"]
  node_filters["Filter builder<br/>[FilterBuilder.jsx]"]
end

subgraph group_api["API and operations"]
  node_backend["FastAPI application<br/>[main.py]"]
  node_upload["Upload and process routes<br/>[upload.py]"]
  node_jobsapi["Job routes<br/>[jobs.py]"]
  node_frontendapi["Compatibility routes<br/>[frontend_api.py]"]
  node_reportapi["Analytics and reports routes<br/>[reports.py]"]
  node_jobservice["Job operations<br/>[job_service.py]"]
end

subgraph group_analysis["Incident analysis"]
  node_pipeline["Incident pipeline"]
  node_loader["Dataset loading<br/>[incident_loader.py]"]
  node_preprocess["Incident preprocessing<br/>[preprocessing.py]"]
  node_embeddings["Semantic embeddings<br/>[embedding.py]"]
  node_clustering["Clustering and naming"]
  node_recurrence["Recurrence analysis<br/>[recurrence.py]"]
  node_classifier["3R classification"]
  node_result["Pipeline results<br/>[pipeline_result.py]"]
end

subgraph group_insights["Intelligence and reporting"]
  node_compat["Frontend compatibility service"]
  node_query["Filter query builder<br/>[query_builder.py]"]
  node_report["Report service<br/>[report_service.py]"]
end

subgraph group_data["Persistence"]
  node_database[("PostgreSQL database<br/>[database.py]")]
  node_incident["Incident records<br/>[incident_model.py]"]
  node_jobrepo["Job repository<br/>[job_repository.py]"]
end

node_user(("Platform user"))

node_user -->|"uses"| node_web
node_web -->|"requests through"| node_clientapi
node_clientapi -.->|"calls API"| node_backend
node_web -->|"routes to"| node_pages
node_pages -.->|"requests data"| node_clientapi
node_filters -.->|"submits filters"| node_clientapi
node_backend -->|"registers"| node_upload
node_backend -->|"registers"| node_jobsapi
node_backend -->|"registers"| node_frontendapi
node_backend -->|"registers"| node_reportapi
node_upload -.->|"starts processing"| node_jobservice
node_jobsapi -.->|"manages jobs"| node_jobservice
node_jobservice -.->|"runs analysis"| node_pipeline
node_pipeline -->|"loads data"| node_loader
node_pipeline -->|"preprocesses data"| node_preprocess
node_pipeline -->|"generates embeddings"| node_embeddings
node_pipeline -->|"forms and names clusters"| node_clustering
node_pipeline -->|"analyzes recurrence"| node_recurrence
node_pipeline -->|"classifies incidents"| node_classifier
node_pipeline -->|"returns"| node_result
node_frontendapi -->|"delegates to"| node_compat
node_compat -->|"builds filtered queries"| node_query
node_reportapi -.->|"delegates to"| node_report
node_report -->|"uses filters"| node_query
node_compat -->|"queries incidents"| node_incident
node_jobrepo -.->|"persists job records"| node_database
node_jobrepo -.->|"tracks processing separately"| node_incident

click node_web "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/frontend/src/App.jsx"
click node_clientapi "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/frontend/src/api.js"
click node_pages "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/tree/main/frontend/src/pages"
click node_filters "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/frontend/src/components/FilterBuilder.jsx"
click node_backend "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/main.py"
click node_upload "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/api/upload.py"
click node_jobsapi "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/api/jobs.py"
click node_frontendapi "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/api/frontend_api.py"
click node_reportapi "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/api/reports.py"
click node_jobservice "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/job_service.py"
click node_pipeline "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/pipelines/incident_pipeline.py"
click node_loader "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/incident_loader.py"
click node_preprocess "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/preprocessing.py"
click node_embeddings "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/clustering/embedding.py"
click node_clustering "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/tree/main/backend/app/clustering"
click node_recurrence "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/clustering/recurrence.py"
click node_classifier "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/clustering/three_r_classifier.py"
click node_result "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/models/pipeline_result.py"
click node_compat "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/frontend_compatibility_service.py"
click node_query "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/query_builder.py"
click node_report "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/report_service.py"
click node_database "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/database/database.py"
click node_incident "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/database/incident_model.py"
click node_jobrepo "https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/repositories/job_repository.py"

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_web,node_clientapi,node_pages,node_filters,node_user toneBlue
class node_backend,node_upload,node_jobsapi,node_frontendapi,node_reportapi,node_jobservice toneAmber
class node_pipeline,node_loader,node_preprocess,node_embeddings,node_clustering,node_recurrence,node_classifier,node_result toneMint
class node_compat,node_query,node_report toneRose
class node_database,node_incident,node_jobrepo toneIndigo
```

## Components

### Web experience

- [React application](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Analysis pages](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/tree/main/frontend/src/pages): `frontend/src/pages`
- [Filter builder](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/frontend/src/components/FilterBuilder.jsx): `frontend/src/components/FilterBuilder.jsx`

### API and operations

- [FastAPI application](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/main.py): `backend/app/main.py`
- [Upload and process routes](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/api/upload.py): `backend/app/api/upload.py`
- [Job routes](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/api/jobs.py): `backend/app/api/jobs.py`
- [Compatibility routes](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/api/frontend_api.py): `backend/app/api/frontend_api.py`
- [Analytics and reports routes](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/api/reports.py): `backend/app/api/reports.py`
- [Job operations](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/job_service.py): `backend/app/services/job_service.py`

### Incident analysis

- [Incident pipeline](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/pipelines/incident_pipeline.py): `backend/app/pipelines/incident_pipeline.py`
- [Dataset loading](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/incident_loader.py): `backend/app/services/incident_loader.py`
- [Incident preprocessing](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/preprocessing.py): `backend/app/services/preprocessing.py`
- [Semantic embeddings](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/clustering/embedding.py): `backend/app/clustering/embedding.py`
- [Clustering and naming](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/tree/main/backend/app/clustering): `backend/app/clustering`
- [Recurrence analysis](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/clustering/recurrence.py): `backend/app/clustering/recurrence.py`
- [3R classification](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/clustering/three_r_classifier.py): `backend/app/clustering/three_r_classifier.py`
- [Pipeline results](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/models/pipeline_result.py): `backend/app/models/pipeline_result.py`

### Intelligence and reporting

- [Frontend compatibility service](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/frontend_compatibility_service.py): `backend/app/services/frontend_compatibility_service.py`
- [Filter query builder](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/query_builder.py): `backend/app/services/query_builder.py`
- [Report service](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/services/report_service.py): `backend/app/services/report_service.py`

### Persistence

- [PostgreSQL database](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/database/database.py): `backend/app/database/database.py`
- [Incident records](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/database/incident_model.py): `backend/app/database/incident_model.py`
- [Job repository](https://github.com/amanmourya0/3r-analyzer-intelligence-platform/blob/main/backend/app/repositories/job_repository.py): `backend/app/repositories/job_repository.py`

### Other components

- **Platform user**

## Connections

- Platform user → React application: uses (evidence: `README.md`)
- React application → API client: requests through (evidence: `frontend/src/App.jsx`)
- API client → FastAPI application: calls API (evidence: `README.md`)
- React application → Analysis pages: routes to (evidence: `frontend/src/App.jsx`)
- Analysis pages → API client: requests data (evidence: `frontend/src/api.js`)
- Filter builder → API client: submits filters
- FastAPI application → Upload and process routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Job routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Compatibility routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Analytics and reports routes: registers (evidence: `backend/app/main.py`)
- Upload and process routes → Job operations: starts processing
- Job routes → Job operations: manages jobs
- Job operations → Incident pipeline: runs analysis
- Incident pipeline → Dataset loading: loads data (evidence: `backend/app/pipelines/incident_pipeline.py`)
- Incident pipeline → Incident preprocessing: preprocesses data (evidence: `backend/app/pipelines/incident_pipeline.py`)
- Incident pipeline → Semantic embeddings: generates embeddings (evidence: `backend/app/pipelines/incident_pipeline.py`)
- Incident pipeline → Clustering and naming: forms and names clusters (evidence: `backend/app/pipelines/incident_pipeline.py`)
- Incident pipeline → Recurrence analysis: analyzes recurrence (evidence: `backend/app/pipelines/incident_pipeline.py`)
- Incident pipeline → 3R classification: classifies incidents (evidence: `backend/app/pipelines/incident_pipeline.py`)
- Incident pipeline → Pipeline results: returns (evidence: `backend/app/pipelines/incident_pipeline.py`)
- Compatibility routes → Frontend compatibility service: delegates to (evidence: `backend/app/api/frontend_api.py`)
- Frontend compatibility service → Filter query builder: builds filtered queries (evidence: `backend/app/services/frontend_compatibility_service.py`)
- Analytics and reports routes → Report service: delegates to
- Report service → Filter query builder: uses filters (evidence: `backend/app/services/report_service.py`)
- Frontend compatibility service → Incident records: queries incidents (evidence: `backend/app/services/frontend_compatibility_service.py`)
- Job repository → PostgreSQL database: persists job records
- Job repository → Incident records: tracks processing separately
