# ramnagendra2005/industryiq architecture

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

- Interactive diagram: https://gitdiagram.com/ramnagendra2005/industryiq
- Repository: https://github.com/ramnagendra2005/industryiq

## Overview

IndustryIQ is a multi-tenant industrial knowledge platform: engineers upload plant documents, which are parsed and extracted into a tenant knowledge graph; they then query the resulting corpus through a cited GraphRAG copilot and explore documents, compliance findings, trust signals, and P&IDs. The graph emphasizes documented product capabilities and sampled orchestration points; some subsystem links rely on the README because their implementation was not sampled.

Main entry points: [`backend/app/engine.py`](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/engine.py) (IndustryIQ engine), [`backend/app/main.py`](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/main.py) (FastAPI surface), [`backend/app/retrieval/graphrag.py`](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/retrieval/graphrag.py) (GraphRAG retrieval), [`backend/app/llm.py`](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/llm.py) (Extraction and answer providers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Engineer workspace"]
  node_workspace["Web workspace<br/>[App.jsx]"]
  node_chat["Copilot chat<br/>[Chat.jsx]"]
  node_ingest_ui["Document upload<br/>[Ingest.jsx]"]
  node_explore_ui["Knowledge views<br/>[GraphView.jsx]"]
  node_compliance_ui["Compliance view<br/>[Compliance.jsx]"]
end

subgraph group_service["API and orchestration"]
  node_api["FastAPI surface<br/>[main.py]"]
  node_auth["Tenant authentication<br/>[auth.py]"]
  node_engine["IndustryIQ engine<br/>[engine.py]"]
  node_persistence[("Tenant persistence<br/>[persistence.py]")]
end

subgraph group_knowledge["Knowledge processing"]
  node_parsers["Document parsers<br/>[parsers.py]"]
  node_llm["Extraction and answer providers<br/>[llm.py]"]
  node_graph[("Knowledge graph<br/>[store.py]")]
  node_index[("Hybrid retrieval index<br/>[index.py]")]
  node_embeddings["Embedding providers<br/>[embeddings.py]"]
end

subgraph group_insights["Operational intelligence"]
  node_graphrag["GraphRAG retrieval<br/>[graphrag.py]"]
  node_agents["Copilot and dossier agents"]
  node_compliance["Compliance analysis<br/>[compliance.py]"]
  node_trust["Answer trust signals<br/>[trust.py]"]
  node_pid["P&amp;ID diagrams<br/>[pid.py]"]
end

node_engineer(("Engineer"))
node_gemini{{"Google Gemini"}}
node_supabase[("Supabase")]

node_engineer -->|"uses"| node_workspace
node_workspace -->|"calls REST"| node_api
node_api -->|"authenticates"| node_auth
node_api -->|"dispatches requests"| node_engine
node_engineer -->|"uploads documents"| node_ingest_ui
node_ingest_ui -->|"submits files"| node_api
node_engine -->|"parses uploads"| node_parsers
node_engine -->|"extracts content"| node_llm
node_engine -->|"ingests extractions"| node_graph
node_engine -->|"builds index"| node_index
node_engine -->|"restores and saves"| node_persistence
node_engineer -->|"asks questions"| node_chat
node_chat -->|"submits queries"| node_api
node_engine -->|"retrieves evidence"| node_graphrag
node_graphrag -->|"searches passages"| node_index
node_graphrag -->|"embeds queries"| node_embeddings
node_graphrag -->|"expands evidence"| node_graph
node_engine -->|"generates answers"| node_agents
node_agents -->|"requests generation"| node_llm
node_engine -->|"annotates citations"| node_trust
node_engineer -->|"explores knowledge"| node_explore_ui
node_explore_ui -->|"requests graph and documents"| node_api
node_engine -->|"serves diagrams"| node_pid
node_engineer -->|"reviews gaps"| node_compliance_ui
node_compliance_ui -->|"requests findings"| node_api
node_api -->|"dispatches analysis"| node_compliance
node_llm -.->|"generates or extracts"| node_gemini
node_embeddings -.->|"embeds remotely"| node_gemini
node_persistence -.->|"mirrors state"| node_supabase

click node_workspace "https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/App.jsx"
click node_chat "https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/components/Chat.jsx"
click node_ingest_ui "https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/components/Ingest.jsx"
click node_explore_ui "https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/components/GraphView.jsx"
click node_compliance_ui "https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/components/Compliance.jsx"
click node_api "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/main.py"
click node_auth "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/auth.py"
click node_engine "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/engine.py"
click node_parsers "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/ingestion/parsers.py"
click node_llm "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/llm.py"
click node_graph "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/graph/store.py"
click node_index "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/retrieval/index.py"
click node_embeddings "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/retrieval/embeddings.py"
click node_graphrag "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/retrieval/graphrag.py"
click node_agents "https://github.com/ramnagendra2005/industryiq/tree/main/backend/app/agents"
click node_compliance "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/agents/compliance.py"
click node_trust "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/agents/trust.py"
click node_pid "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/pid.py"
click node_persistence "https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/persistence.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_workspace,node_chat,node_ingest_ui,node_explore_ui,node_compliance_ui toneBlue
class node_api,node_auth,node_engine,node_persistence,node_supabase toneAmber
class node_parsers,node_llm,node_graph,node_index,node_embeddings toneMint
class node_graphrag,node_agents,node_compliance,node_trust,node_pid toneRose
class node_engineer,node_gemini toneIndigo
```

## Components

### Engineer workspace

- [Web workspace](https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Copilot chat](https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/components/Chat.jsx): `frontend/src/components/Chat.jsx`
- [Document upload](https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/components/Ingest.jsx): `frontend/src/components/Ingest.jsx`
- [Knowledge views](https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/components/GraphView.jsx): `frontend/src/components/GraphView.jsx`
- [Compliance view](https://github.com/ramnagendra2005/industryiq/blob/main/frontend/src/components/Compliance.jsx): `frontend/src/components/Compliance.jsx`

### API and orchestration

- [FastAPI surface](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/main.py): `backend/app/main.py`
- [Tenant authentication](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/auth.py): `backend/app/auth.py`
- [IndustryIQ engine](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/engine.py): `backend/app/engine.py`
- [Tenant persistence](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/persistence.py): `backend/app/persistence.py`

### Knowledge processing

- [Document parsers](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/ingestion/parsers.py): `backend/app/ingestion/parsers.py`
- [Extraction and answer providers](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/llm.py): `backend/app/llm.py`
- [Knowledge graph](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/graph/store.py): `backend/app/graph/store.py`
- [Hybrid retrieval index](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/retrieval/index.py): `backend/app/retrieval/index.py`
- [Embedding providers](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/retrieval/embeddings.py): `backend/app/retrieval/embeddings.py`

### Operational intelligence

- [GraphRAG retrieval](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/retrieval/graphrag.py): `backend/app/retrieval/graphrag.py`
- [Copilot and dossier agents](https://github.com/ramnagendra2005/industryiq/tree/main/backend/app/agents): `backend/app/agents`
- [Compliance analysis](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/agents/compliance.py): `backend/app/agents/compliance.py`
- [Answer trust signals](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/agents/trust.py): `backend/app/agents/trust.py`
- [P&ID diagrams](https://github.com/ramnagendra2005/industryiq/blob/main/backend/app/pid.py): `backend/app/pid.py`

### Other components

- **Engineer**
- **Google Gemini**
- **Supabase**

## Connections

- Engineer → Web workspace: uses
- Web workspace → FastAPI surface: calls REST
- FastAPI surface → Tenant authentication: authenticates
- FastAPI surface → IndustryIQ engine: dispatches requests
- Engineer → Document upload: uploads documents
- Document upload → FastAPI surface: submits files
- IndustryIQ engine → Document parsers: parses uploads
- IndustryIQ engine → Extraction and answer providers: extracts content
- IndustryIQ engine → Knowledge graph: ingests extractions
- IndustryIQ engine → Hybrid retrieval index: builds index
- IndustryIQ engine → Tenant persistence: restores and saves
- Engineer → Copilot chat: asks questions
- Copilot chat → FastAPI surface: submits queries
- IndustryIQ engine → GraphRAG retrieval: retrieves evidence
- GraphRAG retrieval → Hybrid retrieval index: searches passages
- GraphRAG retrieval → Embedding providers: embeds queries
- GraphRAG retrieval → Knowledge graph: expands evidence
- IndustryIQ engine → Copilot and dossier agents: generates answers
- Copilot and dossier agents → Extraction and answer providers: requests generation
- IndustryIQ engine → Answer trust signals: annotates citations
- Engineer → Knowledge views: explores knowledge
- Knowledge views → FastAPI surface: requests graph and documents
- IndustryIQ engine → P&ID diagrams: serves diagrams
- Engineer → Compliance view: reviews gaps
- Compliance view → FastAPI surface: requests findings
- FastAPI surface → Compliance analysis: dispatches analysis
- Extraction and answer providers → Google Gemini: generates or extracts
- Embedding providers → Google Gemini: embeds remotely
- Tenant persistence → Supabase: mirrors state
