# santirb03/repo-insight architecture

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

- Interactive diagram: https://gitdiagram.com/santirb03/repo-insight
- Repository: https://github.com/santirb03/repo-insight

## Overview

RepoInsight is an early-stage repository-analysis platform. Its principal workflow accepts a repository archive, scans files, detects technologies, selects architecture analyzers, merges their graphs, evaluates diagnostics, generates a narrative, and renders a Mermaid diagram. The API service owns this orchestration; domain types carry the scan, graph, findings, and result. README capabilities include ingestion, technology detection, architecture reconstruction, diagrams, diagnostics, and reports. The graph reflects the shown orchestration and indexed references; analyzer internals and endpoint wiring were not sampled, so uncertain links are omitted or marked dashed.

Main entry points: [`src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Api/Services/RepositoryAnalysisService.cs) (Analysis orchestration), [`src/RepoInsight.Analysis/ArchitectureDiagnosticsEngine.cs`](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/ArchitectureDiagnosticsEngine.cs) (Diagnostics engine), [`src/RepoInsight.Infrastructure/AzureOpenAIRepositoryAnalysisNarrator.cs`](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Infrastructure/AzureOpenAIRepositoryAnalysisNarrator.cs) (Narrative generation), [`src/RepoInsight.Domain/RepositoryScan.cs`](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Domain/RepositoryScan.cs) (Repository scan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API workflow"]
  node_endpoints["Repository endpoints"]
  node_zip["Archive processing"]
  node_service["Analysis orchestration"]
end

subgraph group_analysis["Repository analysis"]
  node_scanner["Source scanner"]
  node_technology["Technology detection"]
  node_selector["Analyzer selection"]
  node_aspnet["ASP.NET analyzer"]
  node_nestjs["NestJS analyzer"]
  node_diagnostics["Diagnostics engine"]
end

subgraph group_domain["Analysis data"]
  node_scanmodel["Repository scan<br/>[RepositoryScan.cs]"]
  node_graph["Architecture graph"]
  node_findings["Diagnostic findings"]
  node_result["Analysis result"]
end

subgraph group_narrative["Technical reports"]
  node_narrator["Narrative generation"]
  node_deterministic["Deterministic fallback"]
  node_prompt["Narrative prompt"]
  node_completion["Azure completion client"]
end

subgraph group_rendering["Diagram output"]
  node_simplifier["Diagram simplifier"]
  node_renderer["Mermaid renderer"]
end

node_user(("Repository submitter"))
node_azure(("Azure AI"))

node_user -->|"submits archive"| node_endpoints
node_endpoints -->|"requests analysis"| node_service
node_service -->|"processes archive"| node_zip
node_service -->|"scans files"| node_scanner
node_scanner -->|"produces scan"| node_scanmodel
node_service -->|"detects technologies"| node_technology
node_technology -->|"reads scan"| node_scanmodel
node_service -->|"selects analyzers"| node_selector
node_service -.->|"runs selected analyzers"| node_aspnet
node_service -.->|"runs selected analyzers"| node_nestjs
node_service -->|"merges graphs"| node_graph
node_service -->|"evaluates findings"| node_diagnostics
node_diagnostics -->|"returns findings"| node_findings
node_diagnostics -->|"reads scan"| node_scanmodel
node_diagnostics -->|"reads graph"| node_graph
node_service -->|"generates narrative"| node_narrator
node_narrator -->|"builds prompt"| node_prompt
node_narrator -->|"requests completion"| node_completion
node_completion -.->|"requests AI completion"| node_azure
node_narrator -->|"falls back"| node_deterministic
node_service -->|"simplifies graph"| node_simplifier
node_service -->|"renders diagram"| node_renderer
node_service -->|"builds result"| node_result

click node_endpoints "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Api/RepositoryEndpoints.cs"
click node_zip "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Api/Services/RepositoryZipService.cs"
click node_service "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Api/Services/RepositoryAnalysisService.cs"
click node_scanner "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/RepositoryScanner.cs"
click node_technology "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/TechnologyDetector.cs"
click node_selector "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/ArchitectureAnalyzerSelector.cs"
click node_aspnet "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/AspNetArchitectureAnalyzer.cs"
click node_nestjs "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/NestJsArchitectureAnalyzer.cs"
click node_diagnostics "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/ArchitectureDiagnosticsEngine.cs"
click node_scanmodel "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Domain/RepositoryScan.cs"
click node_graph "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Domain/ArchitectureGraph.cs"
click node_findings "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Domain/DiagnosticFinding.cs"
click node_result "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Application/RepositoryAnalysisResult.cs"
click node_narrator "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Infrastructure/AzureOpenAIRepositoryAnalysisNarrator.cs"
click node_deterministic "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Infrastructure/DeterministicRepositoryAnalysisNarrator.cs"
click node_prompt "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Infrastructure/RepositoryNarrativePromptBuilder.cs"
click node_completion "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Infrastructure/AzureOpenAINarrativeClient.cs"
click node_simplifier "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/ArchitectureDiagramSimplifier.cs"
click node_renderer "https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/Mermaid/MermaidDiagramRenderer.cs"

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_endpoints,node_zip,node_service toneBlue
class node_scanner,node_technology,node_selector,node_aspnet,node_nestjs,node_diagnostics toneAmber
class node_scanmodel,node_graph,node_findings,node_result toneMint
class node_narrator,node_deterministic,node_prompt,node_completion toneRose
class node_simplifier,node_renderer,node_user,node_azure toneIndigo
```

## Components

### API workflow

- [Repository endpoints](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Api/RepositoryEndpoints.cs): `src/RepoInsight.Api/RepositoryEndpoints.cs`
- [Archive processing](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Api/Services/RepositoryZipService.cs): `src/RepoInsight.Api/Services/RepositoryZipService.cs`
- [Analysis orchestration](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Api/Services/RepositoryAnalysisService.cs): `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`

### Repository analysis

- [Source scanner](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/RepositoryScanner.cs): `src/RepoInsight.Analysis/RepositoryScanner.cs`
- [Technology detection](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/TechnologyDetector.cs): `src/RepoInsight.Analysis/TechnologyDetector.cs`
- [Analyzer selection](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/ArchitectureAnalyzerSelector.cs): `src/RepoInsight.Analysis/ArchitectureAnalyzerSelector.cs`
- [ASP.NET analyzer](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/AspNetArchitectureAnalyzer.cs): `src/RepoInsight.Analysis/AspNetArchitectureAnalyzer.cs`
- [NestJS analyzer](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/NestJsArchitectureAnalyzer.cs): `src/RepoInsight.Analysis/NestJsArchitectureAnalyzer.cs`
- [Diagnostics engine](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/ArchitectureDiagnosticsEngine.cs): `src/RepoInsight.Analysis/ArchitectureDiagnosticsEngine.cs`

### Analysis data

- [Repository scan](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Domain/RepositoryScan.cs): `src/RepoInsight.Domain/RepositoryScan.cs`
- [Architecture graph](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Domain/ArchitectureGraph.cs): `src/RepoInsight.Domain/ArchitectureGraph.cs`
- [Diagnostic findings](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Domain/DiagnosticFinding.cs): `src/RepoInsight.Domain/DiagnosticFinding.cs`
- [Analysis result](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Application/RepositoryAnalysisResult.cs): `src/RepoInsight.Application/RepositoryAnalysisResult.cs`

### Technical reports

- [Narrative generation](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Infrastructure/AzureOpenAIRepositoryAnalysisNarrator.cs): `src/RepoInsight.Infrastructure/AzureOpenAIRepositoryAnalysisNarrator.cs`
- [Deterministic fallback](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Infrastructure/DeterministicRepositoryAnalysisNarrator.cs): `src/RepoInsight.Infrastructure/DeterministicRepositoryAnalysisNarrator.cs`
- [Narrative prompt](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Infrastructure/RepositoryNarrativePromptBuilder.cs): `src/RepoInsight.Infrastructure/RepositoryNarrativePromptBuilder.cs`
- [Azure completion client](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Infrastructure/AzureOpenAINarrativeClient.cs): `src/RepoInsight.Infrastructure/AzureOpenAINarrativeClient.cs`

### Diagram output

- [Diagram simplifier](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/ArchitectureDiagramSimplifier.cs): `src/RepoInsight.Analysis/ArchitectureDiagramSimplifier.cs`
- [Mermaid renderer](https://github.com/santirb03/repo-insight/blob/main/src/RepoInsight.Analysis/Mermaid/MermaidDiagramRenderer.cs): `src/RepoInsight.Analysis/Mermaid/MermaidDiagramRenderer.cs`

### Other components

- **Repository submitter**
- **Azure AI**

## Connections

- Repository submitter → Repository endpoints: submits archive (evidence: `README.md`)
- Repository endpoints → Analysis orchestration: requests analysis (evidence: `src/RepoInsight.Api/RepositoryEndpoints.cs`)
- Analysis orchestration → Archive processing: processes archive (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
- Analysis orchestration → Source scanner: scans files (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
- Source scanner → Repository scan: produces scan (evidence: `src/RepoInsight.Analysis/RepositoryScanner.cs`)
- Analysis orchestration → Technology detection: detects technologies (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
- Technology detection → Repository scan: reads scan (evidence: `src/RepoInsight.Analysis/TechnologyDetector.cs`)
- Analysis orchestration → Analyzer selection: selects analyzers (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
- Analysis orchestration → ASP.NET analyzer: runs selected analyzers
- Analysis orchestration → NestJS analyzer: runs selected analyzers
- Analysis orchestration → Architecture graph: merges graphs (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
- Analysis orchestration → Diagnostics engine: evaluates findings (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
- Diagnostics engine → Diagnostic findings: returns findings (evidence: `src/RepoInsight.Analysis/ArchitectureDiagnosticsEngine.cs`)
- Diagnostics engine → Repository scan: reads scan (evidence: `src/RepoInsight.Analysis/ArchitectureDiagnosticsEngine.cs`)
- Diagnostics engine → Architecture graph: reads graph (evidence: `src/RepoInsight.Analysis/ArchitectureDiagnosticsEngine.cs`)
- Analysis orchestration → Narrative generation: generates narrative (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
- Narrative generation → Narrative prompt: builds prompt (evidence: `src/RepoInsight.Infrastructure/AzureOpenAIRepositoryAnalysisNarrator.cs`)
- Narrative generation → Azure completion client: requests completion (evidence: `src/RepoInsight.Infrastructure/AzureOpenAIRepositoryAnalysisNarrator.cs`)
- Azure completion client → Azure AI: requests AI completion
- Narrative generation → Deterministic fallback: falls back (evidence: `src/RepoInsight.Infrastructure/AzureOpenAIRepositoryAnalysisNarrator.cs`)
- Analysis orchestration → Diagram simplifier: simplifies graph (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
- Analysis orchestration → Mermaid renderer: renders diagram (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
- Analysis orchestration → Analysis result: builds result (evidence: `src/RepoInsight.Api/Services/RepositoryAnalysisService.cs`)
