# phankhanhhung/mudop-core architecture

> Architecture diagram of the GitHub repository phankhanhhung/mudop-core, 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/phankhanhhung/mudop-core
- Repository: https://github.com/phankhanhhung/mudop-core

## Overview

Mudop is a meta-model-driven business application platform: domain definitions become PostgreSQL schemas and OData APIs, which users operate through a Vue SPA. The graph follows that lifecycle and retains the separate registry/control plane, runtime/data plane, and documented enterprise capabilities. Several backend subsystems are represented by directory-level nodes because their implementation files were not sampled; uncertain links are omitted or marked unverified.

Main entry points: [`src/BMMDL.Runtime.Api/Controllers/DynamicEntityController.cs`](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime.Api/Controllers/DynamicEntityController.cs) (OData API), [`src/BMMDL.Compiler/Pipeline/CompilerPipeline.cs`](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Compiler/Pipeline/CompilerPipeline.cs) (Compiler pipeline), [`frontend/src/App.vue`](https://github.com/phankhanhhung/mudop-core/blob/main/frontend/src/App.vue) (Vue application), [`src/BMMDL.Registry.Api/Controllers/RegistryControllers.cs`](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Registry.Api/Controllers/RegistryControllers.cs) (Registry API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Model authoring"]
  node_definitions["Business definitions<br/>[BmModel.cs]"]
  node_entitymodel["Entity model<br/>[BmEntity.cs]"]
end

subgraph group_control["Compilation and control plane"]
  node_compiler["Compiler pipeline"]
  node_postgresgen["Postgres DDL"]
  node_schemamanager["Schema evolution"]
  node_registryapi["Registry API"]
  node_compilationservice["Module compilation"]
  node_registry["Module registry"]
  node_registrydb[("Registry database")]
end

subgraph group_runtime["Runtime data plane"]
  node_runtimeapi["OData API"]
  node_queryservice["Entity query service"]
  node_ruleengine["Business rules<br/>[RuleEngine.cs]"]
  node_pluginmanager["Plugin runtime<br/>[PluginManager.cs]"]
  node_fileapi["File storage API"]
  node_storageproviders["Storage providers<br/>[Storage]"]
end

subgraph group_frontend["User experience"]
  node_frontend["Vue application<br/>[App.vue]"]
  node_entityviews["Entity CRUD views"]
  node_odata["OData client layer<br/>[RequestPipeline.ts]"]
  node_adminviews["Admin workflows"]
end

subgraph group_platform["Enterprise platform"]
  node_identity["Authentication and tenancy<br/>[BMMDL.Runtime.Api]"]
  node_temporal["Temporal data"]
  node_authorization["Access control<br/>[Authorization]"]
end

node_modeler(("Domain author"))
node_postgres[("PostgreSQL")]
node_enduser(("Platform user"))

node_modeler -->|"defines model"| node_definitions
node_definitions -->|"compiles"| node_compiler
node_compiler -.->|"builds model"| node_entitymodel
node_compiler -->|"generates schema"| node_postgresgen
node_postgresgen -->|"creates schema"| node_postgres
node_schemamanager -->|"uses DDL"| node_postgresgen
node_registryapi -.->|"compiles modules"| node_compilationservice
node_registryapi -->|"routes registry requests"| node_registry
node_registry -.->|"persists models"| node_registrydb
node_enduser -->|"uses"| node_frontend
node_frontend -->|"presents CRUD"| node_entityviews
node_entityviews -.->|"issues OData requests"| node_odata
node_odata -->|"calls OData API"| node_runtimeapi
node_runtimeapi -.->|"dispatches queries"| node_queryservice
node_queryservice -.->|"executes queries"| node_postgres
node_runtimeapi -->|"enforces rules"| node_ruleengine
node_fileapi -->|"uses provider"| node_storageproviders
node_storageproviders -.->|"stores file metadata"| node_postgres
node_adminviews -.->|"manages modules"| node_registryapi
node_frontend -->|"supports login and tenants"| node_identity
node_runtimeapi -->|"checks permissions"| node_authorization
node_runtimeapi -->|"supports time travel"| node_temporal
node_pluginmanager -.->|"extends runtime"| node_runtimeapi

click node_definitions "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.MetaModel/BmModel.cs"
click node_entitymodel "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.MetaModel/Structure/BmEntity.cs"
click node_compiler "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Compiler/Pipeline/CompilerPipeline.cs"
click node_postgresgen "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.CodeGen/PostgresDdlGenerator.cs"
click node_schemamanager "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.SchemaManager/PostgresSchemaManager.cs"
click node_registryapi "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Registry.Api/Controllers/RegistryControllers.cs"
click node_compilationservice "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Registry.Api/Services/ModuleCompilationService.cs"
click node_registry "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Registry/Repositories/EfCoreMetaModelRepository.cs"
click node_registrydb "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Registry/Data/RegistryDbContext.cs"
click node_runtimeapi "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime.Api/Controllers/DynamicEntityController.cs"
click node_queryservice "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime.Api/Services/EntityQueryService.cs"
click node_ruleengine "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime/Rules/RuleEngine.cs"
click node_pluginmanager "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime/Plugins/PluginManager.cs"
click node_fileapi "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime.Api/Controllers/FileStorageController.cs"
click node_storageproviders "https://github.com/phankhanhhung/mudop-core/tree/main/src/BMMDL.Runtime/Storage"
click node_frontend "https://github.com/phankhanhhung/mudop-core/blob/main/frontend/src/App.vue"
click node_entityviews "https://github.com/phankhanhhung/mudop-core/tree/main/frontend/src/views/entity"
click node_odata "https://github.com/phankhanhhung/mudop-core/blob/main/frontend/src/odata/RequestPipeline.ts"
click node_adminviews "https://github.com/phankhanhhung/mudop-core/tree/main/frontend/src/views/admin"
click node_identity "https://github.com/phankhanhhung/mudop-core/tree/main/src/BMMDL.Runtime.Api"
click node_temporal "https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime/DataAccess/TemporalQueryBuilder.cs"
click node_authorization "https://github.com/phankhanhhung/mudop-core/tree/main/src/BMMDL.Runtime/Authorization"

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_definitions,node_entitymodel,node_enduser toneBlue
class node_compiler,node_postgresgen,node_schemamanager,node_registryapi,node_compilationservice,node_registry,node_registrydb,node_postgres toneAmber
class node_runtimeapi,node_queryservice,node_ruleengine,node_pluginmanager,node_fileapi,node_storageproviders toneMint
class node_frontend,node_entityviews,node_odata,node_adminviews toneRose
class node_identity,node_temporal,node_authorization,node_modeler toneIndigo
```

## Components

### Model authoring

- [Business definitions](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.MetaModel/BmModel.cs): `src/BMMDL.MetaModel/BmModel.cs`
- [Entity model](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.MetaModel/Structure/BmEntity.cs): `src/BMMDL.MetaModel/Structure/BmEntity.cs`

### Compilation and control plane

- [Compiler pipeline](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Compiler/Pipeline/CompilerPipeline.cs): `src/BMMDL.Compiler/Pipeline/CompilerPipeline.cs`
- [Postgres DDL](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.CodeGen/PostgresDdlGenerator.cs): `src/BMMDL.CodeGen/PostgresDdlGenerator.cs`
- [Schema evolution](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.SchemaManager/PostgresSchemaManager.cs): `src/BMMDL.SchemaManager/PostgresSchemaManager.cs`
- [Registry API](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Registry.Api/Controllers/RegistryControllers.cs): `src/BMMDL.Registry.Api/Controllers/RegistryControllers.cs`
- [Module compilation](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Registry.Api/Services/ModuleCompilationService.cs): `src/BMMDL.Registry.Api/Services/ModuleCompilationService.cs`
- [Module registry](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Registry/Repositories/EfCoreMetaModelRepository.cs): `src/BMMDL.Registry/Repositories/EfCoreMetaModelRepository.cs`
- [Registry database](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Registry/Data/RegistryDbContext.cs): `src/BMMDL.Registry/Data/RegistryDbContext.cs`

### Runtime data plane

- [OData API](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime.Api/Controllers/DynamicEntityController.cs): `src/BMMDL.Runtime.Api/Controllers/DynamicEntityController.cs`
- [Entity query service](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime.Api/Services/EntityQueryService.cs): `src/BMMDL.Runtime.Api/Services/EntityQueryService.cs`
- [Business rules](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime/Rules/RuleEngine.cs): `src/BMMDL.Runtime/Rules/RuleEngine.cs`
- [Plugin runtime](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime/Plugins/PluginManager.cs): `src/BMMDL.Runtime/Plugins/PluginManager.cs`
- [File storage API](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime.Api/Controllers/FileStorageController.cs): `src/BMMDL.Runtime.Api/Controllers/FileStorageController.cs`
- [Storage providers](https://github.com/phankhanhhung/mudop-core/tree/main/src/BMMDL.Runtime/Storage): `src/BMMDL.Runtime/Storage`

### User experience

- [Vue application](https://github.com/phankhanhhung/mudop-core/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Entity CRUD views](https://github.com/phankhanhhung/mudop-core/tree/main/frontend/src/views/entity): `frontend/src/views/entity`
- [OData client layer](https://github.com/phankhanhhung/mudop-core/blob/main/frontend/src/odata/RequestPipeline.ts): `frontend/src/odata/RequestPipeline.ts`
- [Admin workflows](https://github.com/phankhanhhung/mudop-core/tree/main/frontend/src/views/admin): `frontend/src/views/admin`

### Enterprise platform

- [Authentication and tenancy](https://github.com/phankhanhhung/mudop-core/tree/main/src/BMMDL.Runtime.Api): `src/BMMDL.Runtime.Api`
- [Temporal data](https://github.com/phankhanhhung/mudop-core/blob/main/src/BMMDL.Runtime/DataAccess/TemporalQueryBuilder.cs): `src/BMMDL.Runtime/DataAccess/TemporalQueryBuilder.cs`
- [Access control](https://github.com/phankhanhhung/mudop-core/tree/main/src/BMMDL.Runtime/Authorization): `src/BMMDL.Runtime/Authorization`

### Other components

- **Domain author**
- **PostgreSQL**
- **Platform user**

## Connections

- Domain author → Business definitions: defines model (evidence: `README.md`)
- Business definitions → Compiler pipeline: compiles (evidence: `README.md`)
- Compiler pipeline → Entity model: builds model
- Compiler pipeline → Postgres DDL: generates schema (evidence: `README.md`)
- Postgres DDL → PostgreSQL: creates schema (evidence: `README.md`)
- Schema evolution → Postgres DDL: uses DDL (evidence: `src/BMMDL.SchemaManager/PostgresSchemaManager.cs`)
- Registry API → Module compilation: compiles modules
- Registry API → Module registry: routes registry requests (evidence: `src/BMMDL.Registry.Api/Controllers/RegistryControllers.cs`)
- Module registry → Registry database: persists models (evidence: `src/BMMDL.Registry/Repositories/EfCoreMetaModelRepository.cs`)
- Platform user → Vue application: uses (evidence: `README.md`)
- Vue application → Entity CRUD views: presents CRUD (evidence: `README.md`)
- Entity CRUD views → OData client layer: issues OData requests
- OData client layer → OData API: calls OData API (evidence: `README.md`)
- OData API → Entity query service: dispatches queries
- Entity query service → PostgreSQL: executes queries
- OData API → Business rules: enforces rules (evidence: `README.md`)
- File storage API → Storage providers: uses provider (evidence: `src/BMMDL.Runtime.Api/Controllers/FileStorageController.cs`)
- Storage providers → PostgreSQL: stores file metadata
- Admin workflows → Registry API: manages modules
- Vue application → Authentication and tenancy: supports login and tenants (evidence: `README.md`)
- OData API → Access control: checks permissions (evidence: `README.md`)
- OData API → Temporal data: supports time travel (evidence: `README.md`)
- Plugin runtime → OData API: extends runtime
