Expand infrastructure diagram in README.md to include detailed business service groups, dependencies, and inter-service connections

This commit is contained in:
emelinda 2026-05-08 17:03:08 +03:00
parent 5903d245d6
commit 57e2867d15

231
README.md
View File

@ -89,7 +89,60 @@ flowchart LR
%% ===== Бизнес-сервисы =====
subgraph APPS["💼 Бизнес-сервисы"]
direction TB
ExampleApp["example-app<br/>HTTP :8080"]:::app
subgraph CORE["🧩 Платформа / Core"]
direction LR
Django["django<br/>:8000 + srx-admin"]:::app
EAV["eav<br/>атрибуты сущностей"]:::app
CI["control-interface<br/>UI :80"]:::app
Workspaces["workspaces"]:::app
Projects["projects"]:::app
Subs["subscriptions"]:::app
SysLog["system-log"]:::app
MsgHub["message-hub"]:::app
FaaS["faas<br/>functions runtime"]:::app
Flows["flows<br/>оркестрация"]:::app
end
subgraph DOCS["📂 Документы / CDE"]
direction LR
Docs["documentations<br/>filestream + pdm"]:::app
DocLink["document-link"]:::app
Attach["attachments<br/>HelmRelease"]:::app
Transmittal["transmittal"]:::app
CDE["cde<br/>common data env"]:::app
Drawings["drawings"]:::app
BIM["bim<br/>3D-модели"]:::app
Stamp["stamp-verification"]:::app
end
subgraph QUALITY["✅ Контроль качества"]
direction LR
Inspect["inspections"]:::app
Checklists["checklists"]:::app
Remarks["remarks"]:::app
Issues["issues"]:::app
RFI["rfi<br/>request for info"]:::app
Reviews["reviews"]:::app
Prescr["prescriptions"]:::app
Compare["comparisons<br/>diff чертежей"]:::app
end
subgraph FIELD["📐 Полевые данные"]
direction LR
Measure["measurements"]:::app
Mapper["mapper"]:::app
XSection["cross-section"]:::app
Process["processing"]:::app
end
subgraph PMG["🏗 Управление проектом"]
direction LR
PM["pm<br/>project mgmt"]:::app
Contracts["contracts"]:::app
Resources["resources"]:::app
Notes["notes"]:::app
end
end
%% ===== GitOps потоки =====
@ -107,8 +160,13 @@ flowchart LR
%% ===== Внешний трафик =====
User ==>|HTTPS 443| Gateway
LE -. ACME HTTP-01 .-> Cert
Gateway ==>|VirtualService<br/>mTLS| ExampleApp
Gateway ==>|VirtualService<br/>mTLS| Camunda
Gateway ==>|VirtualService<br/>mTLS| CI
Gateway ==>|/api| Django
Gateway ==>|/bim| BIM
Gateway ==>|/cde| CDE
Gateway ==>|/docs| Docs
Gateway ==>|/pm| PM
Gateway ==>|VirtualService| Camunda
Gateway ==>|VirtualService| Operate
Gateway ==>|/auth| Keycloak
Gateway ==>|/oauth| Zitadel
@ -116,26 +174,80 @@ flowchart LR
Gateway ==>|/minio| MinIO
Admin -.->|kubectl| Dashboard
%% ===== Frontend → backend (через control-interface) =====
CI -- "API gateway" --> Django
CI -- "API gateway" --> PM
CI -- "API gateway" --> Projects
CI -- "API gateway" --> Workspaces
%% ===== Подключения к данным =====
Django -- "JDBC/ORM" --> PG
EAV -- "JDBC" --> PG
PM -- "JDBC" --> PG
Contracts -- "JDBC" --> PG
Resources -- "JDBC" --> PG
Projects -- "JDBC" --> PG
Workspaces -- "JDBC" --> PG
Subs -- "JDBC" --> PG
SysLog -- "JDBC" --> PG
Docs -- "JDBC" --> PG
DocLink -- "JDBC" --> PG
CDE -- "JDBC" --> PG
BIM -- "JDBC" --> PG
Drawings -- "JDBC" --> PG
Inspect -- "JDBC" --> PG
Checklists -- "JDBC" --> PG
Issues -- "JDBC" --> PG
Remarks -- "JDBC" --> PG
RFI -- "JDBC" --> PG
Reviews -- "JDBC" --> PG
Prescr -- "JDBC" --> PG
Compare -- "JDBC" --> PG
Measure -- "JDBC" --> PG
Mapper -- "JDBC" --> PG
XSection -- "JDBC" --> PG
Notes -- "JDBC" --> PG
Stamp -- "JDBC" --> PG
Transmittal -- "JDBC" --> PG
Camunda -- "JDBC" --> PG
Operate -- "JDBC" --> PG
ExampleApp -- "JDBC" --> PG
Zitadel -- "JDBC" --> PG
Keycloak -- "JDBC" --> PG
Camunda -- "cache TTL" --> Redis
ExampleApp -- "cache + pub/sub" --> Redis
Keycloak -- "session cache" --> Redis
%% ===== Redis (общий кэш / sessions) =====
Django -- "session/cache" --> Redis
CI -- "session" --> Redis
PM -- "cache" --> Redis
Workspaces -- "cache" --> Redis
Subs -- "pub/sub realtime" --> Redis
MsgHub -- "pub/sub" --> Redis
Flows -- "state" --> Redis
FaaS -- "queue" --> Redis
Camunda -- "cache" --> Redis
Keycloak -- "session" --> Redis
%% ===== S3 / объектное хранилище =====
ExampleApp -- "PUT/GET" --> S3Proxy
Camunda -- "attachments" --> S3Proxy
Attach -- "PUT/GET" --> S3Proxy
Docs -- "filestream" --> S3Proxy
BIM -- "IFC/RVT" --> S3Proxy
Drawings -- "DWG/PDF" --> S3Proxy
CDE -- "files" --> S3Proxy
Compare -- "rendered diff" --> S3Proxy
Stamp -- "signed PDF" --> S3Proxy
Transmittal -- "bundles" --> S3Proxy
Process -- "raw + результаты" --> S3Proxy
Mapper -- "tiles" --> S3Proxy
Measure -- "snapshots" --> S3Proxy
XSection -- "профили" --> S3Proxy
S3Proxy -- "S3 API" --> MinIO
%% ===== Секреты =====
ExampleApp -. "approle" .-> Vault
%% ===== Vault (secrets) =====
Django -. "kv" .-> Vault
Camunda -. "approle" .-> Vault
Keycloak -. "kv/secrets" .-> Vault
Zitadel -. "kv/secrets" .-> Vault
Keycloak -. "kv" .-> Vault
Zitadel -. "kv" .-> Vault
FaaS -. "approle" .-> Vault
Flows -. "approle" .-> Vault
%% ===== Storage / PVC =====
PG -.->|PVC| LPP
@ -146,26 +258,87 @@ flowchart LR
MinIO -.->|PVC| LPP
Vault -.->|PVC| LPP
%% ===== Межсервисные маршруты =====
ExampleApp -- "REST POST /process<br/>start workflow" --> Camunda
Camunda -- "REST callback<br/>job worker" --> ExampleApp
Camunda -- "produce<br/>topic: bpm.events" --> Kafka
ExampleApp -- "consume<br/>topic: bpm.events" --> Kafka
ExampleApp -- "produce<br/>topic: app.audit" --> Kafka
Operate -- "consume<br/>zeebe-records" --> Kafka
ExampleApp -- "publish<br/>queue: tasks" --> RMQ
Camunda -- "consume<br/>queue: tasks" --> RMQ
%% ===== Kafka (event bus) =====
SysLog -- "consume audit.*" --> Kafka
MsgHub -- "produce notify.*" --> Kafka
Subs -- "consume notify.*" --> Kafka
Flows -- "produce/consume flows.*" --> Kafka
Camunda -- "produce bpm.events" --> Kafka
Operate -- "consume zeebe-records" --> Kafka
BIM -- "produce bim.processed" --> Kafka
Drawings -- "produce drawings.uploaded" --> Kafka
Process -- "consume processing.jobs" --> Kafka
Compare -- "consume drawings.uploaded" --> Kafka
Inspect -- "produce inspect.events" --> Kafka
Issues -- "consume inspect.events" --> Kafka
Remarks -- "produce remarks.events" --> Kafka
Reviews -- "consume remarks.events" --> Kafka
%% ===== RabbitMQ (work queues) =====
FaaS -- "consume tasks.*" --> RMQ
Flows -- "publish tasks.*" --> RMQ
Process -- "publish jobs" --> RMQ
Mapper -- "consume tile.jobs" --> RMQ
XSection -- "consume xs.jobs" --> RMQ
Stamp -- "consume sign.jobs" --> RMQ
Camunda -- "consume bpm.tasks" --> RMQ
%% ===== Межсервисные REST маршруты =====
PM -- "REST" --> Projects
PM -- "REST" --> Contracts
PM -- "REST" --> Resources
Projects -- "REST" --> Workspaces
Contracts -- "REST" --> Resources
Inspect -- "REST" --> Checklists
Inspect -- "REST" --> Issues
Issues -- "REST" --> Remarks
Reviews -- "REST" --> RFI
Reviews -- "REST" --> Prescr
RFI -- "REST" --> DocLink
DocLink --> Docs
DocLink --> CDE
CDE -- "REST" --> Docs
CDE -- "REST" --> Drawings
CDE -- "REST" --> BIM
Transmittal -- "REST" --> CDE
Transmittal -- "REST" --> Docs
Drawings -- "REST" --> Compare
Drawings -- "REST" --> Stamp
Measure -- "REST" --> Mapper
Mapper -- "REST" --> XSection
XSection --> Process
BIM -- "REST" --> Process
Notes -- "REST" --> DocLink
Flows -- "trigger" --> FaaS
Flows -- "start" --> Camunda
Camunda -- "callback" --> Flows
EAV -- "schemas" --> Django
MsgHub -- "deliver email/push" --> Subs
%% ===== AuthN / AuthZ =====
ExampleApp -. "validate JWT<br/>JWKS" .-> Keycloak
Camunda -. "validate JWT<br/>JWKS" .-> Zitadel
Operate -. "OIDC login" .-> Zitadel
Django -. "OIDC validate" .-> Keycloak
CI -. "OIDC login" .-> Keycloak
PM -. "JWT" .-> Keycloak
Camunda -. "JWT" .-> Zitadel
Operate -. "OIDC" .-> Zitadel
Dashboard -. "OIDC" .-> Keycloak
BIM -. "JWT" .-> Keycloak
CDE -. "JWT" .-> Keycloak
Docs -. "JWT" .-> Keycloak
%% ===== Service mesh observability =====
Camunda -. "envoy sidecar<br/>metrics" .-> Pilot
ExampleApp -. "envoy sidecar<br/>metrics" .-> Pilot
Operate -. "envoy sidecar" .-> Pilot
%% ===== Service mesh sidecar metrics =====
CI -. "envoy" .-> Pilot
Django -. "envoy" .-> Pilot
Camunda -. "envoy" .-> Pilot
BIM -. "envoy" .-> Pilot
Flows -. "envoy" .-> Pilot
%% ===== Стили подгрупп бизнес-сервисов =====
style CORE fill:#fdf2f8,stroke:#ec4899,stroke-width:1px
style DOCS fill:#fdf2f8,stroke:#ec4899,stroke-width:1px
style QUALITY fill:#fdf2f8,stroke:#ec4899,stroke-width:1px
style FIELD fill:#fdf2f8,stroke:#ec4899,stroke-width:1px
style PMG fill:#fdf2f8,stroke:#ec4899,stroke-width:1px
%% ===== Стили =====
classDef ext fill:#1f2937,stroke:#9ca3af,stroke-width:2px,color:#f9fafb