# rami6782/axe-database-analyzer architecture

> Architecture diagram of the GitHub repository rami6782/axe-database-analyzer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rami6782/axe-database-analyzer
- Repository: https://github.com/rami6782/axe-database-analyzer

## Overview

AxeDbAnalyzer.Web is an ASP.NET Core web app for browsing configured SQL Server databases, running stored procedures (including Blitz procedures), viewing results, and exporting them to Excel. The main workflow runs from the Blitz form through parameter building and SQL execution to a results view; export reruns the procedure before creating a workbook. A separate API supports database and procedure discovery for the browser UI. Source excerpts establish these calls; some views and the parameter builder were not sampled, so their internal behavior is not expanded here.

Main entry points: [`Controllers/BlitzController.cs`](https://github.com/rami6782/axe-database-analyzer/blob/main/Controllers/BlitzController.cs) (Blitz actions), [`Services/SqlServerRepository.cs`](https://github.com/rami6782/axe-database-analyzer/blob/main/Services/SqlServerRepository.cs) (SQL repository), [`Controllers/ApiController.cs`](https://github.com/rami6782/axe-database-analyzer/blob/main/Controllers/ApiController.cs) (Discovery API), [`Services/ExcelExporter.cs`](https://github.com/rami6782/axe-database-analyzer/blob/main/Services/ExcelExporter.cs) (Excel exporter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_blitz["Blitz actions<br/>[BlitzController.cs]"]
  node_api["Discovery API<br/>[ApiController.cs]"]
  node_browser["Browser helpers<br/>[site.js]"]
  node_views["Blitz views"]
end

subgraph group_workflow["Execution workflow"]
  node_builder["Parameter builder"]
  node_resultmodel["Result view model"]
end

subgraph group_sql["SQL access"]
  node_repository["SQL repository"]
  node_sqlserver[("SQL Server")]
  node_repointerface["Repository contract"]
end

subgraph group_export["Excel export"]
  node_exporter["Excel exporter<br/>[ExcelExporter.cs]"]
  node_exportcontract["Export contract<br/>[IExcelExporter.cs]"]
  node_exportfiles["Exported workbooks"]
end

subgraph group_models["Request and settings"]
  node_connectionoptions["Connection options"]
  node_serverinfo["Server settings<br/>[ServerInfo.cs]"]
  node_sprocrequest["Procedure request<br/>[SprocRequest.cs]"]
end

node_user(("User"))

node_user -->|"submits request"| node_blitz
node_blitz -->|"returns views"| node_views
node_browser -->|"fetches databases"| node_api
node_api -->|"queries metadata"| node_repository
node_blitz -->|"queries and executes"| node_repository
node_blitz -->|"builds parameters"| node_builder
node_blitz -->|"exports results"| node_exporter
node_blitz -->|"populates results"| node_resultmodel
node_blitz -->|"accepts request"| node_sprocrequest
node_repository -->|"queries and executes"| node_sqlserver
node_repository -->|"reads settings"| node_connectionoptions
node_connectionoptions -->|"contains server entries"| node_serverinfo
node_exporter -->|"writes workbooks"| node_exportfiles
node_blitz -->|"reads download file"| node_exportfiles

click node_blitz "https://github.com/rami6782/axe-database-analyzer/blob/main/Controllers/BlitzController.cs"
click node_api "https://github.com/rami6782/axe-database-analyzer/blob/main/Controllers/ApiController.cs"
click node_browser "https://github.com/rami6782/axe-database-analyzer/blob/main/wwwroot/js/site.js"
click node_views "https://github.com/rami6782/axe-database-analyzer/tree/main/Views/Blitz"
click node_builder "https://github.com/rami6782/axe-database-analyzer/blob/main/Services/BlitzParameterBuilder.cs"
click node_resultmodel "https://github.com/rami6782/axe-database-analyzer/blob/main/Models/SprocResultViewModel.cs"
click node_repository "https://github.com/rami6782/axe-database-analyzer/blob/main/Services/SqlServerRepository.cs"
click node_repointerface "https://github.com/rami6782/axe-database-analyzer/blob/main/Services/ISqlServerRepository.cs"
click node_exporter "https://github.com/rami6782/axe-database-analyzer/blob/main/Services/ExcelExporter.cs"
click node_exportcontract "https://github.com/rami6782/axe-database-analyzer/blob/main/Services/IExcelExporter.cs"
click node_connectionoptions "https://github.com/rami6782/axe-database-analyzer/blob/main/Models/ConnectionOptions.cs"
click node_serverinfo "https://github.com/rami6782/axe-database-analyzer/blob/main/Models/ServerInfo.cs"
click node_sprocrequest "https://github.com/rami6782/axe-database-analyzer/blob/main/Models/SprocRequest.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_blitz,node_api,node_browser,node_views,node_user toneBlue
class node_builder,node_resultmodel toneAmber
class node_repository,node_sqlserver,node_repointerface toneMint
class node_exporter,node_exportcontract,node_exportfiles toneRose
class node_connectionoptions,node_serverinfo,node_sprocrequest toneIndigo
```

## Components

### Web interface

- [Blitz actions](https://github.com/rami6782/axe-database-analyzer/blob/main/Controllers/BlitzController.cs): `Controllers/BlitzController.cs`
- [Discovery API](https://github.com/rami6782/axe-database-analyzer/blob/main/Controllers/ApiController.cs): `Controllers/ApiController.cs`
- [Browser helpers](https://github.com/rami6782/axe-database-analyzer/blob/main/wwwroot/js/site.js): `wwwroot/js/site.js`
- [Blitz views](https://github.com/rami6782/axe-database-analyzer/tree/main/Views/Blitz): `Views/Blitz`

### Execution workflow

- [Parameter builder](https://github.com/rami6782/axe-database-analyzer/blob/main/Services/BlitzParameterBuilder.cs): `Services/BlitzParameterBuilder.cs`
- [Result view model](https://github.com/rami6782/axe-database-analyzer/blob/main/Models/SprocResultViewModel.cs): `Models/SprocResultViewModel.cs`

### SQL access

- [SQL repository](https://github.com/rami6782/axe-database-analyzer/blob/main/Services/SqlServerRepository.cs): `Services/SqlServerRepository.cs`
- **SQL Server**
- [Repository contract](https://github.com/rami6782/axe-database-analyzer/blob/main/Services/ISqlServerRepository.cs): `Services/ISqlServerRepository.cs`

### Excel export

- [Excel exporter](https://github.com/rami6782/axe-database-analyzer/blob/main/Services/ExcelExporter.cs): `Services/ExcelExporter.cs`
- [Export contract](https://github.com/rami6782/axe-database-analyzer/blob/main/Services/IExcelExporter.cs): `Services/IExcelExporter.cs`
- **Exported workbooks**

### Request and settings

- [Connection options](https://github.com/rami6782/axe-database-analyzer/blob/main/Models/ConnectionOptions.cs): `Models/ConnectionOptions.cs`
- [Server settings](https://github.com/rami6782/axe-database-analyzer/blob/main/Models/ServerInfo.cs): `Models/ServerInfo.cs`
- [Procedure request](https://github.com/rami6782/axe-database-analyzer/blob/main/Models/SprocRequest.cs): `Models/SprocRequest.cs`

### Other components

- **User**

## Connections

- User → Blitz actions: submits request (evidence: `Controllers/BlitzController.cs`)
- Blitz actions → Blitz views: returns views (evidence: `Controllers/BlitzController.cs`)
- Browser helpers → Discovery API: fetches databases (evidence: `wwwroot/js/site.js`)
- Discovery API → SQL repository: queries metadata (evidence: `Controllers/ApiController.cs`)
- Blitz actions → SQL repository: queries and executes (evidence: `Controllers/BlitzController.cs`)
- Blitz actions → Parameter builder: builds parameters (evidence: `Controllers/BlitzController.cs`)
- Blitz actions → Excel exporter: exports results (evidence: `Controllers/BlitzController.cs`)
- Blitz actions → Result view model: populates results (evidence: `Controllers/BlitzController.cs`)
- Blitz actions → Procedure request: accepts request (evidence: `Controllers/BlitzController.cs`)
- SQL repository → SQL Server: queries and executes (evidence: `Services/SqlServerRepository.cs`)
- SQL repository → Connection options: reads settings (evidence: `Services/SqlServerRepository.cs`)
- Connection options → Server settings: contains server entries (evidence: `Models/ConnectionOptions.cs`)
- Excel exporter → Exported workbooks: writes workbooks (evidence: `Services/ExcelExporter.cs`)
- Blitz actions → Exported workbooks: reads download file (evidence: `Controllers/BlitzController.cs`)
