# dhanishetty/azure-cloud-ai architecture

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

- Interactive diagram: https://gitdiagram.com/dhanishetty/azure-cloud-ai
- Repository: https://github.com/dhanishetty/azure-cloud-ai

## Overview

Azure-Cloud-AI is a deployed RAG PDF question-answering application: users upload a PDF, background ingestion indexes page-aware chunks, and users ask questions that receive cited answers. The graph follows the browser through the SPA and API, then separates asynchronous ingestion from retrieval. README documents Azure infrastructure, AKS networking, identity and observability; these are included at subsystem level where exact paths are supported. The additional sentiment and topic pages are explicitly coming-soon UI, not implemented processing pipelines. Source excerpts support runtime calls; deployment and platform relationships are taken from the README, not independently inspected manifests.

Main entry points: [`Code/Frontend/src/app/App.tsx`](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/app/App.tsx) (App routes), [`infra/aks.bicep`](https://github.com/dhanishetty/azure-cloud-ai/blob/main/infra/aks.bicep) (AKS cluster), [`Code/Backend/RAG/backend-api/main.py`](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Backend/RAG/backend-api/main.py) (FastAPI service), [`Code/Backend/RAG/ingestion-worker/worker.py`](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Backend/RAG/ingestion-worker/worker.py) (Ingestion worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_spa["React SPA<br/>[main.tsx]"]
  node_router["App routes<br/>[App.tsx]"]
  node_layout["Navigation layout<br/>[Layout.tsx]"]
  node_rag_ui["PDF chat UI<br/>[RagChatPage.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_architecture_ui["Architecture view"]
  node_sentiment_ui["Sentiment preview<br/>[SentimentPage.tsx]"]
  node_topics_ui["Topics preview<br/>[TopicsPage.tsx]"]
  node_coming_soon["Preview component<br/>[ComingSoon.tsx]"]
end

subgraph group_rag["RAG runtime"]
  node_api["FastAPI service<br/>[main.py]"]
  node_worker["Ingestion worker<br/>[worker.py]"]
end

subgraph group_azure["Azure services"]
  node_blob[("PDF blob store")]
  node_queue["Ingestion queue"]
  node_search[("AI Search index")]
  node_openai["Azure OpenAI"]
end

subgraph group_platform["Platform operations"]
  node_ingress["Traefik ingress"]
  node_aks["AKS cluster<br/>[aks.bicep]"]
  node_identity["Workload identity<br/>[identity.bicep]"]
  node_monitoring["Telemetry services<br/>[monitoring.bicep]"]
  node_acr["Container registry<br/>[acr.bicep]"]
end

node_user(("Browser user"))

node_user -->|"opens HTTPS"| node_ingress
node_ingress -->|"routes web traffic"| node_spa
node_spa -->|"renders"| node_router
node_router -->|"wraps routes"| node_layout
node_router -->|"routes to"| node_rag_ui
node_router -->|"routes to"| node_architecture_ui
node_router -->|"routes to"| node_sentiment_ui
node_router -->|"routes to"| node_topics_ui
node_sentiment_ui -->|"renders"| node_coming_soon
node_topics_ui -->|"renders"| node_coming_soon
node_rag_ui -->|"calls"| node_api_client
node_architecture_ui -->|"calls"| node_api_client
node_api_client -->|"HTTP requests"| node_api
node_api -->|"stores and reads PDFs"| node_blob
node_api -->|"enqueues jobs"| node_queue
node_queue -->|"dispatches jobs"| node_worker
node_worker -->|"reads PDF; updates status"| node_blob
node_worker -->|"creates embeddings"| node_openai
node_worker -->|"indexes chunks"| node_search
node_api -->|"embeds and answers"| node_openai
node_api -->|"retrieves and deletes chunks"| node_search
node_aks -->|"runs service"| node_api
node_aks -->|"runs worker"| node_worker
node_aks -->|"runs frontend"| node_spa
node_aks -->|"uses pod identities"| node_identity
node_aks -->|"sends telemetry"| node_monitoring
node_acr -->|"supplies images"| node_aks

click node_spa "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/main.tsx"
click node_router "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/app/App.tsx"
click node_layout "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/app/Layout.tsx"
click node_rag_ui "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/features/rag-chat/RagChatPage.tsx"
click node_api_client "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/lib/api.ts"
click node_architecture_ui "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/features/architecture/ArchitecturePage.tsx"
click node_sentiment_ui "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/features/youtube-sentiment/SentimentPage.tsx"
click node_topics_ui "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/features/topic-modeling/TopicsPage.tsx"
click node_coming_soon "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/components/ComingSoon.tsx"
click node_api "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Backend/RAG/backend-api/main.py"
click node_worker "https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Backend/RAG/ingestion-worker/worker.py"
click node_ingress "https://github.com/dhanishetty/azure-cloud-ai/tree/main/k8s/platform"
click node_aks "https://github.com/dhanishetty/azure-cloud-ai/blob/main/infra/aks.bicep"
click node_identity "https://github.com/dhanishetty/azure-cloud-ai/blob/main/infra/identity.bicep"
click node_monitoring "https://github.com/dhanishetty/azure-cloud-ai/blob/main/infra/monitoring.bicep"
click node_acr "https://github.com/dhanishetty/azure-cloud-ai/blob/main/infra/acr.bicep"

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_spa,node_router,node_layout,node_rag_ui,node_api_client,node_architecture_ui,node_sentiment_ui,node_topics_ui,node_coming_soon,node_user toneBlue
class node_api,node_worker toneAmber
class node_blob,node_queue,node_search,node_openai toneMint
class node_ingress,node_aks,node_identity,node_monitoring,node_acr toneRose
```

## Components

### Web application

- [React SPA](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/main.tsx): `Code/Frontend/src/main.tsx`
- [App routes](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/app/App.tsx): `Code/Frontend/src/app/App.tsx`
- [Navigation layout](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/app/Layout.tsx): `Code/Frontend/src/app/Layout.tsx`
- [PDF chat UI](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/features/rag-chat/RagChatPage.tsx): `Code/Frontend/src/features/rag-chat/RagChatPage.tsx`
- [API client](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/lib/api.ts): `Code/Frontend/src/lib/api.ts`
- [Architecture view](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/features/architecture/ArchitecturePage.tsx): `Code/Frontend/src/features/architecture/ArchitecturePage.tsx`
- [Sentiment preview](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/features/youtube-sentiment/SentimentPage.tsx): `Code/Frontend/src/features/youtube-sentiment/SentimentPage.tsx`
- [Topics preview](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/features/topic-modeling/TopicsPage.tsx): `Code/Frontend/src/features/topic-modeling/TopicsPage.tsx`
- [Preview component](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Frontend/src/components/ComingSoon.tsx): `Code/Frontend/src/components/ComingSoon.tsx`

### RAG runtime

- [FastAPI service](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Backend/RAG/backend-api/main.py): `Code/Backend/RAG/backend-api/main.py`
- [Ingestion worker](https://github.com/dhanishetty/azure-cloud-ai/blob/main/Code/Backend/RAG/ingestion-worker/worker.py): `Code/Backend/RAG/ingestion-worker/worker.py`

### Azure services

- **PDF blob store**
- **Ingestion queue**
- **AI Search index**
- **Azure OpenAI**

### Platform operations

- [Traefik ingress](https://github.com/dhanishetty/azure-cloud-ai/tree/main/k8s/platform): `k8s/platform`
- [AKS cluster](https://github.com/dhanishetty/azure-cloud-ai/blob/main/infra/aks.bicep): `infra/aks.bicep`
- [Workload identity](https://github.com/dhanishetty/azure-cloud-ai/blob/main/infra/identity.bicep): `infra/identity.bicep`
- [Telemetry services](https://github.com/dhanishetty/azure-cloud-ai/blob/main/infra/monitoring.bicep): `infra/monitoring.bicep`
- [Container registry](https://github.com/dhanishetty/azure-cloud-ai/blob/main/infra/acr.bicep): `infra/acr.bicep`

### Other components

- **Browser user**

## Connections

- Browser user → Traefik ingress: opens HTTPS (evidence: `README.md`)
- Traefik ingress → React SPA: routes web traffic (evidence: `README.md`)
- React SPA → App routes: renders (evidence: `Code/Frontend/src/main.tsx`)
- App routes → Navigation layout: wraps routes (evidence: `Code/Frontend/src/app/App.tsx`)
- App routes → PDF chat UI: routes to (evidence: `Code/Frontend/src/app/App.tsx`)
- App routes → Architecture view: routes to (evidence: `Code/Frontend/src/app/App.tsx`)
- App routes → Sentiment preview: routes to (evidence: `Code/Frontend/src/app/App.tsx`)
- App routes → Topics preview: routes to (evidence: `Code/Frontend/src/app/App.tsx`)
- Sentiment preview → Preview component: renders (evidence: `Code/Frontend/src/features/youtube-sentiment/SentimentPage.tsx`)
- Topics preview → Preview component: renders (evidence: `Code/Frontend/src/features/topic-modeling/TopicsPage.tsx`)
- PDF chat UI → API client: calls (evidence: `Code/Frontend/src/features/rag-chat/RagChatPage.tsx`)
- Architecture view → API client: calls (evidence: `Code/Frontend/src/features/architecture/ArchitecturePage.tsx`)
- API client → FastAPI service: HTTP requests (evidence: `README.md`)
- FastAPI service → PDF blob store: stores and reads PDFs (evidence: `Code/Backend/RAG/backend-api/main.py`)
- FastAPI service → Ingestion queue: enqueues jobs (evidence: `Code/Backend/RAG/backend-api/main.py`)
- Ingestion queue → Ingestion worker: dispatches jobs (evidence: `README.md`)
- Ingestion worker → PDF blob store: reads PDF; updates status (evidence: `Code/Backend/RAG/ingestion-worker/worker.py`)
- Ingestion worker → Azure OpenAI: creates embeddings (evidence: `Code/Backend/RAG/ingestion-worker/worker.py`)
- Ingestion worker → AI Search index: indexes chunks (evidence: `Code/Backend/RAG/ingestion-worker/worker.py`)
- FastAPI service → Azure OpenAI: embeds and answers (evidence: `Code/Backend/RAG/backend-api/main.py`)
- FastAPI service → AI Search index: retrieves and deletes chunks (evidence: `Code/Backend/RAG/backend-api/main.py`)
- AKS cluster → FastAPI service: runs service (evidence: `README.md`)
- AKS cluster → Ingestion worker: runs worker (evidence: `README.md`)
- AKS cluster → React SPA: runs frontend (evidence: `README.md`)
- AKS cluster → Workload identity: uses pod identities (evidence: `README.md`)
- AKS cluster → Telemetry services: sends telemetry (evidence: `README.md`)
- Container registry → AKS cluster: supplies images (evidence: `README.md`)
