# nirzaf/auditsphere architecture

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

- Interactive diagram: https://gitdiagram.com/nirzaf/auditsphere
- Repository: https://github.com/nirzaf/auditsphere

## Overview

AuditSphereOps is a modular audit and accounting operations platform. Its principal workflow runs from staff-facing workbenches through client acceptance and engagement setup, accounting-source preparation, audit fieldwork and review, then controlled package release and records retention. The product also includes practice management, group consolidation, client document collaboration, Microsoft 365 administration, and durable background operations. Relationships are based on the README and the supplied source index/excerpts; unsampled implementation details are not inferred.

Main entry points: [`src/AuditSphereOps.Api/Ui/UiEndpoints.cs`](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Api/Ui/UiEndpoints.cs) (HTTP API), [`src/AuditSphereOps.Domain/Accounting/Accounting.cs`](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Accounting/Accounting.cs) (Accounting Preparation), [`src/AuditSphereOps.Ui/src/app/app.routes.ts`](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Ui/src/app/app.routes.ts) (Angular Workbenches), [`src/AuditSphereOps.Domain/Audit/Audit.cs`](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Audit/Audit.cs) (Audit Fieldwork)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_angular["Angular Workbenches<br/>[app.routes.ts]"]
  node_api["HTTP API<br/>[UiEndpoints.cs]"]
  node_portal["Client Portal"]
  node_documents["Document Services<br/>[Documents.cs]"]
  node_tabdrafts["Tab Draft State<br/>[tab-drafts.ts]"]
end

subgraph group_lifecycle["Engagement Lifecycle"]
  node_practice["Practice Management<br/>[Practice]"]
  node_acceptance["Client Acceptance<br/>[Acceptance]"]
  node_engagement["Engagement Setup<br/>[Engagements.cs]"]
end

subgraph group_finance["Accounting Workspaces"]
  node_clientaccounting["Client Accounting"]
  node_accounting["Accounting Preparation<br/>[Accounting.cs]"]
  node_consolidation["Group Consolidation<br/>[Consolidation]"]
end

subgraph group_assurance["Audit And Release"]
  node_audit["Audit Fieldwork<br/>[Audit.cs]"]
  node_reviews["Review Workflows<br/>[Reviews.cs]"]
  node_completion["Package And Release<br/>[Completion.cs]"]
  node_records["Records Retention<br/>[Records.cs]"]
end

subgraph group_platform["Platform Services"]
  node_tenant["Microsoft 365 Admin"]
  node_identity["Identity And Authorization"]
  node_operations["Durable Operations"]
  node_worker["Background Worker<br/>[Worker.cs]"]
  node_database[("PostgreSQL")]
end

node_staff(("Staff"))
node_client(("Client"))
node_entra{{"Entra ID"}}
node_sharepoint{{"SharePoint Online"}}

node_staff -->|"uses workbenches"| node_angular
node_client -->|"uses workbenches"| node_angular
node_angular -->|"sends requests"| node_api
node_api -->|"serves workflows"| node_acceptance
node_api -->|"serves workflows"| node_practice
node_api -->|"serves workflows"| node_accounting
node_api -->|"serves workflows"| node_audit
node_api -->|"serves workflows"| node_portal
node_acceptance -->|"activates"| node_engagement
node_engagement -->|"enables preparation"| node_accounting
node_accounting -->|"supports fieldwork"| node_audit
node_accounting -->|"supplies packages"| node_consolidation
node_audit -->|"produces evidence"| node_reviews
node_reviews -->|"supports release"| node_completion
node_completion -->|"archives release"| node_records
node_portal -->|"manages documents"| node_documents
node_tenant -.->|"uses identity"| node_entra
node_documents -.->|"stores documents"| node_sharepoint
node_api -->|"enforces access"| node_identity
node_worker -->|"dispatches work"| node_operations
node_operations -.->|"persists operations"| node_database
node_angular -->|"uses draft state"| node_tabdrafts
node_practice -.->|"persists practice data"| node_database
node_accounting -.->|"persists accounting data"| node_database
node_audit -.->|"persists audit evidence"| node_database

click node_angular "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Ui/src/app/app.routes.ts"
click node_api "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Api/Ui/UiEndpoints.cs"
click node_practice "https://github.com/nirzaf/auditsphere/tree/master/src/AuditSphereOps.Application/Practice"
click node_acceptance "https://github.com/nirzaf/auditsphere/tree/master/src/AuditSphereOps.Application/Acceptance"
click node_engagement "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Engagements/Engagements.cs"
click node_clientaccounting "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Accounting/ClientAccounting.cs"
click node_accounting "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Accounting/Accounting.cs"
click node_consolidation "https://github.com/nirzaf/auditsphere/tree/master/src/AuditSphereOps.Application/Accounting/Consolidation"
click node_audit "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Audit/Audit.cs"
click node_reviews "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Reviews/Reviews.cs"
click node_completion "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Completion/Completion.cs"
click node_records "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Records/Records.cs"
click node_portal "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Application/Documents/ClientPortalService.cs"
click node_documents "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Documents/Documents.cs"
click node_tenant "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Microsoft365/TenantAdministration.cs"
click node_identity "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Application/Security/AuthorizationDecision.cs"
click node_operations "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Application/Operations/OperationDispatcher.cs"
click node_worker "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Worker/Worker.cs"
click node_database "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Infrastructure/Persistence/AuditSphereDbContext.cs"
click node_tabdrafts "https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Ui/src/app/core/tab-drafts.ts"

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_angular,node_api,node_portal,node_documents,node_tabdrafts,node_client toneBlue
class node_practice,node_acceptance,node_engagement toneAmber
class node_clientaccounting,node_accounting,node_consolidation toneMint
class node_audit,node_reviews,node_completion,node_records toneRose
class node_tenant,node_identity,node_operations,node_worker,node_database,node_staff,node_entra,node_sharepoint toneIndigo
```

## Components

### User Experience

- [Angular Workbenches](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Ui/src/app/app.routes.ts): `src/AuditSphereOps.Ui/src/app/app.routes.ts`
- [HTTP API](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Api/Ui/UiEndpoints.cs): `src/AuditSphereOps.Api/Ui/UiEndpoints.cs`
- [Client Portal](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Application/Documents/ClientPortalService.cs): `src/AuditSphereOps.Application/Documents/ClientPortalService.cs`
- [Document Services](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Documents/Documents.cs): `src/AuditSphereOps.Domain/Documents/Documents.cs`
- [Tab Draft State](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Ui/src/app/core/tab-drafts.ts): `src/AuditSphereOps.Ui/src/app/core/tab-drafts.ts`

### Engagement Lifecycle

- [Practice Management](https://github.com/nirzaf/auditsphere/tree/master/src/AuditSphereOps.Application/Practice): `src/AuditSphereOps.Application/Practice`
- [Client Acceptance](https://github.com/nirzaf/auditsphere/tree/master/src/AuditSphereOps.Application/Acceptance): `src/AuditSphereOps.Application/Acceptance`
- [Engagement Setup](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Engagements/Engagements.cs): `src/AuditSphereOps.Domain/Engagements/Engagements.cs`

### Accounting Workspaces

- [Client Accounting](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Accounting/ClientAccounting.cs): `src/AuditSphereOps.Domain/Accounting/ClientAccounting.cs`
- [Accounting Preparation](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Accounting/Accounting.cs): `src/AuditSphereOps.Domain/Accounting/Accounting.cs`
- [Group Consolidation](https://github.com/nirzaf/auditsphere/tree/master/src/AuditSphereOps.Application/Accounting/Consolidation): `src/AuditSphereOps.Application/Accounting/Consolidation`

### Audit And Release

- [Audit Fieldwork](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Audit/Audit.cs): `src/AuditSphereOps.Domain/Audit/Audit.cs`
- [Review Workflows](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Reviews/Reviews.cs): `src/AuditSphereOps.Domain/Reviews/Reviews.cs`
- [Package And Release](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Completion/Completion.cs): `src/AuditSphereOps.Domain/Completion/Completion.cs`
- [Records Retention](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Records/Records.cs): `src/AuditSphereOps.Domain/Records/Records.cs`

### Platform Services

- [Microsoft 365 Admin](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Domain/Microsoft365/TenantAdministration.cs): `src/AuditSphereOps.Domain/Microsoft365/TenantAdministration.cs`
- [Identity And Authorization](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Application/Security/AuthorizationDecision.cs): `src/AuditSphereOps.Application/Security/AuthorizationDecision.cs`
- [Durable Operations](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Application/Operations/OperationDispatcher.cs): `src/AuditSphereOps.Application/Operations/OperationDispatcher.cs`
- [Background Worker](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Worker/Worker.cs): `src/AuditSphereOps.Worker/Worker.cs`
- [PostgreSQL](https://github.com/nirzaf/auditsphere/blob/master/src/AuditSphereOps.Infrastructure/Persistence/AuditSphereDbContext.cs): `src/AuditSphereOps.Infrastructure/Persistence/AuditSphereDbContext.cs`

### Other components

- **Staff**
- **Client**
- **Entra ID**
- **SharePoint Online**

## Connections

- Staff → Angular Workbenches: uses workbenches (evidence: `README.md`)
- Client → Angular Workbenches: uses workbenches (evidence: `README.md`)
- Angular Workbenches → HTTP API: sends requests (evidence: `README.md`)
- HTTP API → Client Acceptance: serves workflows (evidence: `README.md`)
- HTTP API → Practice Management: serves workflows (evidence: `README.md`)
- HTTP API → Accounting Preparation: serves workflows (evidence: `README.md`)
- HTTP API → Audit Fieldwork: serves workflows (evidence: `README.md`)
- HTTP API → Client Portal: serves workflows (evidence: `README.md`)
- Client Acceptance → Engagement Setup: activates (evidence: `README.md`)
- Engagement Setup → Accounting Preparation: enables preparation (evidence: `README.md`)
- Accounting Preparation → Audit Fieldwork: supports fieldwork (evidence: `README.md`)
- Accounting Preparation → Group Consolidation: supplies packages (evidence: `README.md`)
- Audit Fieldwork → Review Workflows: produces evidence (evidence: `README.md`)
- Review Workflows → Package And Release: supports release (evidence: `README.md`)
- Package And Release → Records Retention: archives release (evidence: `README.md`)
- Client Portal → Document Services: manages documents (evidence: `README.md`)
- Microsoft 365 Admin → Entra ID: uses identity (evidence: `README.md`)
- Document Services → SharePoint Online: stores documents (evidence: `README.md`)
- HTTP API → Identity And Authorization: enforces access (evidence: `src/AuditSphereOps.Application/Security/AuthorizationDecision.cs`)
- Background Worker → Durable Operations: dispatches work (evidence: `src/AuditSphereOps.Worker/Worker.cs`)
- Durable Operations → PostgreSQL: persists operations
- Angular Workbenches → Tab Draft State: uses draft state
- Practice Management → PostgreSQL: persists practice data
- Accounting Preparation → PostgreSQL: persists accounting data (evidence: `src/AuditSphereOps.Infrastructure/Persistence/AuditSphereDbContext.cs`)
- Audit Fieldwork → PostgreSQL: persists audit evidence (evidence: `src/AuditSphereOps.Infrastructure/Persistence/AuditSphereDbContext.cs`)
