# rzhvms/project-data-hub architecture

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

- Interactive diagram: https://gitdiagram.com/rzhvms/project-data-hub
- Repository: https://github.com/rzhvms/project-data-hub

## Overview

project-data-hub is an Angular web application and .NET microservice system for managing an architecture-and-construction company’s project portfolio. The main workflow is an authenticated client request routed through the API gateway to project management, where projects can be listed, drafted, updated, and published; related capabilities include categories, participants, metrics, images, and document exports. Identity handles users and JWT tokens. The graph uses README statements and sampled call sites for evidenced links; unsampled feature wiring is omitted or marked unverified.

Main entry points: [`api/Apps/ProviderApi/Api/Controllers/ProjectManage/ProjectController.cs`](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Api/Controllers/ProjectManage/ProjectController.cs) (Provider endpoints), [`frontend/src/app/app.ts`](https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/app/app.ts) (Angular app), [`api/Apps/IdentityApi/Application/UseCases/Auth/AuthUseCaseManager.cs`](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Application/UseCases/Auth/AuthUseCaseManager.cs) (Auth and token use cases), [`api/Apps/IdentityApi/Api/Controllers/Auth/AuthController.cs`](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Api/Controllers/Auth/AuthController.cs) (Identity endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_angular["Angular app<br/>[app.ts]"]
  node_authui["Login and auth<br/>[auth.service.ts]"]
  node_objectui["Project workspace<br/>[objects.page.ts]"]
  node_mediaui["Media workspace<br/>[media.page.ts]"]
  node_wpui["WordPress settings"]
end

subgraph group_edge["API entry"]
  node_gateway["YARP gateway"]
end

subgraph group_identity["Identity service"]
  node_identityapi["Identity endpoints<br/>[AuthController.cs]"]
  node_authcases["Auth and token use cases"]
  node_usercases["User management"]
  node_userrepo[("User persistence<br/>[UserRepository.cs]")]
  node_userentity["Users and refresh tokens<br/>[User.cs]"]
end

subgraph group_portfolio["Portfolio service"]
  node_providerapi["Provider endpoints"]
  node_projects["Project workflows"]
  node_projectrepo[("Project persistence")]
  node_participants["Participants"]
  node_categories["Categories"]
  node_metrics["Project metrics"]
  node_images["Project images<br/>[ImageUseCase.cs]"]
  node_exports["Portfolio exports"]
  node_minio[("MinIO object storage<br/>[MinioFileReader.cs]")]
end

subgraph group_shared["Shared services"]
  node_jwt["JWT generation"]
  node_audit[("Audit logging")]
end

node_user(("Staff user"))
node_postgres[("PostgreSQL")]

node_user -->|"uses"| node_angular
node_angular -->|"opens login"| node_authui
node_angular -->|"routes to"| node_objectui
node_angular -->|"routes to"| node_mediaui
node_angular -->|"routes to"| node_wpui
node_angular -->|"sends requests"| node_gateway
node_gateway -->|"proxies identity"| node_identityapi
node_gateway -->|"proxies provider"| node_providerapi
node_identityapi -.->|"delegates auth"| node_authcases
node_authcases -->|"reads and writes"| node_userrepo
node_authcases -->|"creates token state"| node_userentity
node_authcases -->|"generates tokens"| node_jwt
node_userrepo -->|"persists users"| node_postgres
node_identityapi -.->|"delegates users"| node_usercases
node_objectui -.->|"requests projects"| node_providerapi
node_providerapi -->|"calls project use cases"| node_projects
node_providerapi -->|"calls image use cases"| node_images
node_projects -->|"reads and writes"| node_projectrepo
node_projects -->|"records actions"| node_audit
node_projectrepo -->|"persists projects"| node_postgres
node_providerapi -.->|"manages participants"| node_participants
node_providerapi -.->|"manages categories"| node_categories
node_providerapi -.->|"manages metrics"| node_metrics
node_providerapi -.->|"requests exports"| node_exports
node_images -.->|"stores images"| node_minio
node_exports -.->|"reads stored files"| node_minio

click node_angular "https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/app/app.ts"
click node_authui "https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/libs/modules/auth/services/auth.service.ts"
click node_objectui "https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/app/pages/main/children/objects/objects.page.ts"
click node_mediaui "https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/app/pages/main/children/media/media.page.ts"
click node_wpui "https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/app/pages/main/children/wp-settings/wp-settings.page.ts"
click node_identityapi "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Api/Controllers/Auth/AuthController.cs"
click node_authcases "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Application/UseCases/Auth/AuthUseCaseManager.cs"
click node_usercases "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Application/UseCases/Users/UserUseCaseManager.cs"
click node_userrepo "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Infrastructure/Repositories/Users/UserRepository.cs"
click node_userentity "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Domain/Entities/IdentityUser/User.cs"
click node_jwt "https://github.com/rzhvms/project-data-hub/blob/master/api/Libs/IdentityLib/IdentityLib/Jwt/Services/JwtGenerationService.cs"
click node_providerapi "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Api/Controllers/ProjectManage/ProjectController.cs"
click node_projects "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/ProjectManage/ProjectUseCaseManager.cs"
click node_projectrepo "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Infrastructure/Repositories/Project/ProjectRepository.cs"
click node_participants "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/Participants/ParticipantUseCaseManager.cs"
click node_categories "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/Categories/CategoryUseCaseManager.cs"
click node_metrics "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/ProjectManage/ProjectMetricsUseCaseManager.cs"
click node_images "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/Images/ImageUseCase.cs"
click node_exports "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/ExportFiles/ExportFilesUseCaseManager.cs"
click node_minio "https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Infrastructure/Storages/MinioFileReader.cs"
click node_audit "https://github.com/rzhvms/project-data-hub/blob/master/api/Libs/CoreLib/CoreLib/Audit/DapperAuditService.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_angular,node_authui,node_objectui,node_mediaui,node_wpui,node_user toneBlue
class node_gateway,node_postgres toneAmber
class node_identityapi,node_authcases,node_usercases,node_userrepo,node_userentity toneMint
class node_providerapi,node_projects,node_projectrepo,node_participants,node_categories,node_metrics,node_images,node_exports,node_minio toneRose
class node_jwt,node_audit toneIndigo
```

## Components

### Web client

- [Angular app](https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/app/app.ts): `frontend/src/app/app.ts`
- [Login and auth](https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/libs/modules/auth/services/auth.service.ts): `frontend/src/libs/modules/auth/services/auth.service.ts`
- [Project workspace](https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/app/pages/main/children/objects/objects.page.ts): `frontend/src/app/pages/main/children/objects/objects.page.ts`
- [Media workspace](https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/app/pages/main/children/media/media.page.ts): `frontend/src/app/pages/main/children/media/media.page.ts`
- [WordPress settings](https://github.com/rzhvms/project-data-hub/blob/master/frontend/src/app/pages/main/children/wp-settings/wp-settings.page.ts): `frontend/src/app/pages/main/children/wp-settings/wp-settings.page.ts`

### API entry

- **YARP gateway**

### Identity service

- [Identity endpoints](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Api/Controllers/Auth/AuthController.cs): `api/Apps/IdentityApi/Api/Controllers/Auth/AuthController.cs`
- [Auth and token use cases](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Application/UseCases/Auth/AuthUseCaseManager.cs): `api/Apps/IdentityApi/Application/UseCases/Auth/AuthUseCaseManager.cs`
- [User management](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Application/UseCases/Users/UserUseCaseManager.cs): `api/Apps/IdentityApi/Application/UseCases/Users/UserUseCaseManager.cs`
- [User persistence](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Infrastructure/Repositories/Users/UserRepository.cs): `api/Apps/IdentityApi/Infrastructure/Repositories/Users/UserRepository.cs`
- [Users and refresh tokens](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/IdentityApi/Domain/Entities/IdentityUser/User.cs): `api/Apps/IdentityApi/Domain/Entities/IdentityUser/User.cs`

### Portfolio service

- [Provider endpoints](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Api/Controllers/ProjectManage/ProjectController.cs): `api/Apps/ProviderApi/Api/Controllers/ProjectManage/ProjectController.cs`
- [Project workflows](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/ProjectManage/ProjectUseCaseManager.cs): `api/Apps/ProviderApi/Application/UseCases/ProjectManage/ProjectUseCaseManager.cs`
- [Project persistence](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Infrastructure/Repositories/Project/ProjectRepository.cs): `api/Apps/ProviderApi/Infrastructure/Repositories/Project/ProjectRepository.cs`
- [Participants](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/Participants/ParticipantUseCaseManager.cs): `api/Apps/ProviderApi/Application/UseCases/Participants/ParticipantUseCaseManager.cs`
- [Categories](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/Categories/CategoryUseCaseManager.cs): `api/Apps/ProviderApi/Application/UseCases/Categories/CategoryUseCaseManager.cs`
- [Project metrics](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/ProjectManage/ProjectMetricsUseCaseManager.cs): `api/Apps/ProviderApi/Application/UseCases/ProjectManage/ProjectMetricsUseCaseManager.cs`
- [Project images](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/Images/ImageUseCase.cs): `api/Apps/ProviderApi/Application/UseCases/Images/ImageUseCase.cs`
- [Portfolio exports](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Application/UseCases/ExportFiles/ExportFilesUseCaseManager.cs): `api/Apps/ProviderApi/Application/UseCases/ExportFiles/ExportFilesUseCaseManager.cs`
- [MinIO object storage](https://github.com/rzhvms/project-data-hub/blob/master/api/Apps/ProviderApi/Infrastructure/Storages/MinioFileReader.cs): `api/Apps/ProviderApi/Infrastructure/Storages/MinioFileReader.cs`

### Shared services

- [JWT generation](https://github.com/rzhvms/project-data-hub/blob/master/api/Libs/IdentityLib/IdentityLib/Jwt/Services/JwtGenerationService.cs): `api/Libs/IdentityLib/IdentityLib/Jwt/Services/JwtGenerationService.cs`
- [Audit logging](https://github.com/rzhvms/project-data-hub/blob/master/api/Libs/CoreLib/CoreLib/Audit/DapperAuditService.cs): `api/Libs/CoreLib/CoreLib/Audit/DapperAuditService.cs`

### Other components

- **Staff user**
- **PostgreSQL**

## Connections

- Staff user → Angular app: uses (evidence: `README.md`)
- Angular app → Login and auth: opens login
- Angular app → Project workspace: routes to
- Angular app → Media workspace: routes to
- Angular app → WordPress settings: routes to
- Angular app → YARP gateway: sends requests (evidence: `README.md`)
- YARP gateway → Identity endpoints: proxies identity (evidence: `README.md`)
- YARP gateway → Provider endpoints: proxies provider (evidence: `README.md`)
- Identity endpoints → Auth and token use cases: delegates auth
- Auth and token use cases → User persistence: reads and writes (evidence: `api/Apps/IdentityApi/Application/UseCases/Auth/AuthUseCaseManager.cs`)
- Auth and token use cases → Users and refresh tokens: creates token state (evidence: `api/Apps/IdentityApi/Application/UseCases/Auth/AuthUseCaseManager.cs`)
- Auth and token use cases → JWT generation: generates tokens (evidence: `api/Apps/IdentityApi/Application/UseCases/Auth/AuthUseCaseManager.cs`)
- User persistence → PostgreSQL: persists users (evidence: `README.md`)
- Identity endpoints → User management: delegates users
- Project workspace → Provider endpoints: requests projects
- Provider endpoints → Project workflows: calls project use cases (evidence: `api/Apps/ProviderApi/Api/Controllers/ProjectManage/ProjectController.cs`)
- Provider endpoints → Project images: calls image use cases (evidence: `api/Apps/ProviderApi/Api/Controllers/ProjectManage/ProjectController.cs`)
- Project workflows → Project persistence: reads and writes (evidence: `api/Apps/ProviderApi/Application/UseCases/ProjectManage/ProjectUseCaseManager.cs`)
- Project workflows → Audit logging: records actions (evidence: `api/Apps/ProviderApi/Application/UseCases/ProjectManage/ProjectUseCaseManager.cs`)
- Project persistence → PostgreSQL: persists projects (evidence: `README.md`)
- Provider endpoints → Participants: manages participants
- Provider endpoints → Categories: manages categories
- Provider endpoints → Project metrics: manages metrics
- Provider endpoints → Portfolio exports: requests exports
- Project images → MinIO object storage: stores images
- Portfolio exports → MinIO object storage: reads stored files
