# governmentbg/epro_2021 architecture

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

- Interactive diagram: https://gitdiagram.com/governmentbg/epro_2021
- Repository: https://github.com/governmentbg/epro_2021

## Overview

EPRO is a judicial recusals (dismissal/self-recusal) registry with public and administrative web interfaces and a court-system REST API. The main workflows accept or manage dismissal records, validate and persist them, and expose them for search or exchange; related capabilities include account administration, nomenclatures, audit logging, and attached files. The diagram separates interfaces, domain services, infrastructure, and persistence. The README gives no architecture detail, so relationships rely on the supplied excerpts and SOURCE INDEX; unsampled subsystems are represented only where the tree supports a path.

Main entry points: [`EPRO.Infrastructure/Data/Common/Repository.cs`](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Infrastructure/Data/Common/Repository.cs) (Repository), [`EPRO/Areas/Admin/Controllers`](https://github.com/governmentbg/epro_2021/tree/master/EPRO/Areas/Admin/Controllers) (Admin web), [`EPRO/Areas/Public/Controllers`](https://github.com/governmentbg/epro_2021/tree/master/EPRO/Areas/Public/Controllers) (Public web), [`EPRO.Core/Services/ApiService.cs`](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/ApiService.cs) (Court exchange)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_admin_ui["Admin web"]
  node_public_ui["Public web"]
  node_rest_api["REST API"]
  node_api_auth["API authentication<br/>[Authentication]"]
end

subgraph group_services["Domain services"]
  node_dismissal_ops["Dismissal management"]
  node_api_exchange["Court exchange<br/>[ApiService.cs]"]
  node_accounts["Accounts<br/>[AccountService.cs]"]
  node_nomenclatures["Nomenclatures"]
  node_audit["Audit logging<br/>[AuditLogService.cs]"]
end

subgraph group_infra["Infrastructure"]
  node_files["File service<br/>[CdnService.cs]"]
  node_repo["Repository<br/>[Repository.cs]"]
end

subgraph group_persistence["Persistence"]
  node_db_context["Database context"]
  node_dismissal_data[("Dismissal records<br/>[Dismissal.cs]")]
  node_nomenclature_data[("Nomenclature records<br/>[Nomenclatures]")]
  node_file_store[("File storage<br/>[Cdn]")]
end

node_court_user(("Court user"))
node_public_user(("Public user"))
node_court_software(("Court software"))

node_court_user -->|"manages records"| node_admin_ui
node_public_user -->|"searches records"| node_public_ui
node_court_software -->|"submits requests"| node_rest_api
node_rest_api -.->|"requires authentication"| node_api_auth
node_rest_api -->|"dispatches requests"| node_api_exchange
node_admin_ui -->|"manages dismissals"| node_dismissal_ops
node_public_ui -->|"searches dismissals"| node_dismissal_ops
node_admin_ui -->|"loads options"| node_nomenclatures
node_public_ui -->|"loads options"| node_nomenclatures
node_admin_ui -->|"manages accounts"| node_accounts
node_public_ui -->|"authenticates users"| node_accounts
node_admin_ui -->|"records operations"| node_audit
node_admin_ui -->|"accesses attachments"| node_files
node_public_ui -->|"accesses attachments"| node_files
node_api_exchange -.->|"uses dismissal data"| node_dismissal_ops
node_api_exchange -->|"validates codes"| node_nomenclatures
node_api_exchange -->|"handles attachments"| node_files
node_dismissal_ops -->|"queries and saves"| node_repo
node_api_exchange -->|"queries and saves"| node_repo
node_nomenclatures -.->|"queries records"| node_repo
node_accounts -.->|"queries records"| node_repo
node_audit -.->|"stores events"| node_repo
node_files -->|"stores file metadata"| node_repo
node_repo -->|"uses context"| node_db_context
node_db_context -.->|"maps records"| node_dismissal_data
node_db_context -.->|"maps records"| node_nomenclature_data
node_files -.->|"stores file content"| node_file_store

click node_admin_ui "https://github.com/governmentbg/epro_2021/tree/master/EPRO/Areas/Admin/Controllers"
click node_public_ui "https://github.com/governmentbg/epro_2021/tree/master/EPRO/Areas/Public/Controllers"
click node_rest_api "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Api/Controllers/DismissalController.cs"
click node_api_auth "https://github.com/governmentbg/epro_2021/tree/master/EPRO.Api/Authentication"
click node_dismissal_ops "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/DismissalService.cs"
click node_api_exchange "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/ApiService.cs"
click node_accounts "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/AccountService.cs"
click node_nomenclatures "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/NomenclatureService.cs"
click node_audit "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/AuditLogService.cs"
click node_files "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Infrastructure/Services/CdnService.cs"
click node_repo "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Infrastructure/Data/Common/Repository.cs"
click node_db_context "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Infrastructure/Data/ApplicationDbContext.cs"
click node_dismissal_data "https://github.com/governmentbg/epro_2021/blob/master/EPRO.Infrastructure/Data/Models/Common/Dismissal.cs"
click node_nomenclature_data "https://github.com/governmentbg/epro_2021/tree/master/EPRO.Infrastructure/Data/Models/Nomenclatures"
click node_file_store "https://github.com/governmentbg/epro_2021/tree/master/EPRO.Infrastructure/ViewModels/Cdn"

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_admin_ui,node_public_ui,node_rest_api,node_api_auth,node_court_user,node_public_user toneBlue
class node_dismissal_ops,node_api_exchange,node_accounts,node_nomenclatures,node_audit toneAmber
class node_files,node_repo toneMint
class node_db_context,node_dismissal_data,node_nomenclature_data,node_file_store toneRose
class node_court_software toneIndigo
```

## Components

### User interfaces

- [Admin web](https://github.com/governmentbg/epro_2021/tree/master/EPRO/Areas/Admin/Controllers): `EPRO/Areas/Admin/Controllers`
- [Public web](https://github.com/governmentbg/epro_2021/tree/master/EPRO/Areas/Public/Controllers): `EPRO/Areas/Public/Controllers`
- [REST API](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Api/Controllers/DismissalController.cs): `EPRO.Api/Controllers/DismissalController.cs`
- [API authentication](https://github.com/governmentbg/epro_2021/tree/master/EPRO.Api/Authentication): `EPRO.Api/Authentication`

### Domain services

- [Dismissal management](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/DismissalService.cs): `EPRO.Core/Services/DismissalService.cs`
- [Court exchange](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/ApiService.cs): `EPRO.Core/Services/ApiService.cs`
- [Accounts](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/AccountService.cs): `EPRO.Core/Services/AccountService.cs`
- [Nomenclatures](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/NomenclatureService.cs): `EPRO.Core/Services/NomenclatureService.cs`
- [Audit logging](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Core/Services/AuditLogService.cs): `EPRO.Core/Services/AuditLogService.cs`

### Infrastructure

- [File service](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Infrastructure/Services/CdnService.cs): `EPRO.Infrastructure/Services/CdnService.cs`
- [Repository](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Infrastructure/Data/Common/Repository.cs): `EPRO.Infrastructure/Data/Common/Repository.cs`

### Persistence

- [Database context](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Infrastructure/Data/ApplicationDbContext.cs): `EPRO.Infrastructure/Data/ApplicationDbContext.cs`
- [Dismissal records](https://github.com/governmentbg/epro_2021/blob/master/EPRO.Infrastructure/Data/Models/Common/Dismissal.cs): `EPRO.Infrastructure/Data/Models/Common/Dismissal.cs`
- [Nomenclature records](https://github.com/governmentbg/epro_2021/tree/master/EPRO.Infrastructure/Data/Models/Nomenclatures): `EPRO.Infrastructure/Data/Models/Nomenclatures`
- [File storage](https://github.com/governmentbg/epro_2021/tree/master/EPRO.Infrastructure/ViewModels/Cdn): `EPRO.Infrastructure/ViewModels/Cdn`

### Other components

- **Court user**
- **Public user**
- **Court software**

## Connections

- Court user → Admin web: manages records (evidence: `EPRO/Areas/Admin/Controllers/DismissalController.cs`)
- Public user → Public web: searches records (evidence: `EPRO/Areas/Public/Controllers/PublicController.cs`)
- Court software → REST API: submits requests (evidence: `EPRO.Api/Controllers/DismissalController.cs`)
- REST API → API authentication: requires authentication
- REST API → Court exchange: dispatches requests (evidence: `EPRO.Api/Controllers/DismissalController.cs`)
- Admin web → Dismissal management: manages dismissals (evidence: `EPRO/Areas/Admin/Controllers/DismissalController.cs`)
- Public web → Dismissal management: searches dismissals (evidence: `EPRO/Areas/Public/Controllers/PublicController.cs`)
- Admin web → Nomenclatures: loads options (evidence: `EPRO/Areas/Admin/Controllers/DismissalController.cs`)
- Public web → Nomenclatures: loads options (evidence: `EPRO/Areas/Public/Controllers/PublicController.cs`)
- Admin web → Accounts: manages accounts (evidence: `EPRO/Areas/Admin/Controllers/AccountController.cs`)
- Public web → Accounts: authenticates users (evidence: `EPRO/Areas/Public/Controllers/AccountController.cs`)
- Admin web → Audit logging: records operations (evidence: `EPRO/Areas/Admin/Controllers/AccountController.cs`)
- Admin web → File service: accesses attachments (evidence: `EPRO/Areas/Admin/Controllers/DismissalController.cs`)
- Public web → File service: accesses attachments (evidence: `EPRO/Areas/Public/Controllers/PublicController.cs`)
- Court exchange → Dismissal management: uses dismissal data (evidence: `EPRO.Core/Services/ApiService.cs`)
- Court exchange → Nomenclatures: validates codes (evidence: `EPRO.Core/Services/ApiService.cs`)
- Court exchange → File service: handles attachments (evidence: `EPRO.Core/Services/ApiService.cs`)
- Dismissal management → Repository: queries and saves (evidence: `EPRO.Core/Services/DismissalService.cs`)
- Court exchange → Repository: queries and saves (evidence: `EPRO.Core/Services/ApiService.cs`)
- Nomenclatures → Repository: queries records
- Accounts → Repository: queries records
- Audit logging → Repository: stores events
- File service → Repository: stores file metadata (evidence: `EPRO.Infrastructure/Services/CdnService.cs`)
- Repository → Database context: uses context (evidence: `EPRO.Infrastructure/Data/Common/Repository.cs`)
- Database context → Dismissal records: maps records
- Database context → Nomenclature records: maps records
- File service → File storage: stores file content (evidence: `EPRO.Infrastructure/Services/CdnService.cs`)
