# nocobase/nocobase3 architecture

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

- Interactive diagram: https://gitdiagram.com/nocobase/nocobase3
- Repository: https://github.com/nocobase/nocobase3

## Overview

This repository is a broad NocoBase application platform: it includes app hosting and deployment management, server runtime and APIs, plugins, and a database playground. A typical flow is an operator managing hosted app deployments, while application users reach server APIs and plugin features. The map also preserves the sampled workflow engine, AI employee, UI library, and playground branches. Evidence is limited to the supplied tree, source index, and excerpts; unsampled relationships are omitted rather than inferred.

Main entry points: [`packages/app/app-host/src/management/manager.ts`](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/management/manager.ts) (Host manager), [`dev/db/playground/app.ts`](https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/app.ts) (Playground server), [`packages/app/app-host/src/app-registry.ts`](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/app-registry.ts) (App registry), [`dev/db/playground/server/routes`](https://github.com/nocobase/nocobase3/tree/develop/dev/db/playground/server/routes) (Playground routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hosting["App hosting"]
  node_host_manager["Host manager<br/>[manager.ts]"]
  node_host_registry["App registry<br/>[app-registry.ts]"]
  node_host_types["App definitions<br/>[app-types.ts]"]
  node_artifact_resolver["Artifact resolver"]
  node_deployment_catalog["Deployment catalog<br/>[catalog.ts]"]
  node_deployment_log[("Deployment log<br/>[deployment-log.ts]")]
  node_volume_manager["Volume manager<br/>[volume-manager.ts]"]
  node_managed_reconciler["Managed reconciler"]
  node_host_runtime["Host runtime<br/>[runtime.ts]"]
end

subgraph group_server["Server platform"]
  node_server_router["Repository API"]
  node_db_storage["Database storage<br/>[storage.ts]"]
end

subgraph group_plugins["Product plugins"]
  node_workflow_engine["Workflow engine<br/>[engine.ts]"]
  node_workflow_dispatcher["Workflow dispatcher<br/>[dispatcher.ts]"]
  node_workflow_processor["Workflow processor<br/>[processor.ts]"]
  node_ai_routes["AI service routes<br/>[llm-services.ts]"]
  node_ai_schemas["AI route schemas<br/>[schemas.ts]"]
  node_ai_cache["LLM stream cache"]
  node_ai_repository["LLM repository<br/>[llm-service.ts]"]
  node_quotation_routes["Review task routes"]
end

subgraph group_playground["Database playground"]
  node_playground_app["Playground server<br/>[app.ts]"]
  node_playground_db[("Playground databases<br/>[index.ts]")]
  node_playground_orders["Order service<br/>[orders.ts]"]
  node_playground_input["Input validation<br/>[input.ts]"]
  node_playground_temporal["Temporal helpers<br/>[temporal.ts]"]
  node_playground_routes["Playground routes"]
  node_playground_web["Playground web UI<br/>[app.js]"]
end

subgraph group_ui["Client and UI"]
  node_library_site["UI library site<br/>[app.tsx]"]
  node_library_sidebar["Sidebar component<br/>[sidebar.tsx]"]
end

node_operator(("Operator"))
node_visitor(("Application user"))

node_operator -->|"manages deployments"| node_host_manager
node_host_manager -->|"delegates reconciliation"| node_managed_reconciler
node_host_manager -->|"reads runtime"| node_host_runtime
node_host_manager -->|"uses registry"| node_host_registry
node_host_manager -->|"uses resolver"| node_artifact_resolver
node_host_manager -->|"uses catalog"| node_deployment_catalog
node_host_manager -->|"uses deployment log"| node_deployment_log
node_host_manager -->|"constructs reconciler"| node_managed_reconciler
node_artifact_resolver -->|"uses catalog"| node_deployment_catalog
node_artifact_resolver -->|"uses deployment log"| node_deployment_log
node_host_registry -->|"uses definitions"| node_host_types
node_host_registry -->|"uses deployment log"| node_deployment_log
node_host_registry -->|"emits events"| node_deployment_log
node_server_router -->|"queries repositories"| node_db_storage
node_workflow_engine -->|"constructs dispatcher"| node_workflow_dispatcher
node_workflow_engine -->|"uses processor"| node_workflow_processor
node_workflow_engine -->|"dispatches tasks"| node_workflow_dispatcher
node_ai_routes -->|"uses schemas"| node_ai_schemas
node_ai_repository -.->|"stores service entities"| node_playground_db
node_playground_app -->|"creates databases"| node_playground_db
node_playground_app -->|"creates order service"| node_playground_orders
node_playground_app -->|"mounts routes"| node_playground_routes
node_playground_app -->|"serves client script"| node_playground_web
node_playground_routes -->|"uses validation"| node_playground_input
node_playground_routes -->|"uses helpers"| node_playground_temporal
node_playground_routes -->|"calls service"| node_playground_orders
node_visitor -.->|"requests APIs"| node_server_router
node_visitor -.->|"uses playground"| node_playground_app
node_library_site -->|"renders sidebar"| node_library_sidebar

click node_host_manager "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/management/manager.ts"
click node_host_registry "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/app-registry.ts"
click node_host_types "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/app-types.ts"
click node_artifact_resolver "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/artifact-resolver.ts"
click node_deployment_catalog "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/deployment/catalog.ts"
click node_deployment_log "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/deployment-log.ts"
click node_volume_manager "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/deployment/volume-manager.ts"
click node_managed_reconciler "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/management/managed-reconciler.ts"
click node_host_runtime "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/management/runtime.ts"
click node_server_router "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-server/src/router/repository-routes.ts"
click node_db_storage "https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-server/src/database/storage.ts"
click node_workflow_engine "https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-workflow/server/engine/engine.ts"
click node_workflow_dispatcher "https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-workflow/server/engine/dispatcher.ts"
click node_workflow_processor "https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-workflow/server/engine/processor.ts"
click node_ai_routes "https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-ai-employee/server/route/llm-services.ts"
click node_ai_schemas "https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-ai-employee/server/route/schemas.ts"
click node_ai_cache "https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-ai-employee/server/manager/llm-stream-cached-manager.ts"
click node_ai_repository "https://github.com/nocobase/nocobase3/blob/develop/packages/libs/ai-employee/src/repository/llm-service.ts"
click node_quotation_routes "https://github.com/nocobase/nocobase3/blob/develop/packages/templates/app-template-examples/server/routes/quotation-review-tasks.ts"
click node_playground_app "https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/app.ts"
click node_playground_db "https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/database/index.ts"
click node_playground_orders "https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/server/services/orders.ts"
click node_playground_input "https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/server/input.ts"
click node_playground_temporal "https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/server/temporal.ts"
click node_playground_routes "https://github.com/nocobase/nocobase3/tree/develop/dev/db/playground/server/routes"
click node_playground_web "https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/web/app.js"
click node_library_site "https://github.com/nocobase/nocobase3/blob/develop/ui-library/website/app.tsx"
click node_library_sidebar "https://github.com/nocobase/nocobase3/blob/develop/ui-library/website/components/ui/sidebar.tsx"

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_host_manager,node_host_registry,node_host_types,node_artifact_resolver,node_deployment_catalog,node_deployment_log,node_volume_manager,node_managed_reconciler,node_host_runtime,node_visitor toneBlue
class node_server_router,node_db_storage toneAmber
class node_workflow_engine,node_workflow_dispatcher,node_workflow_processor,node_ai_routes,node_ai_schemas,node_ai_cache,node_ai_repository,node_quotation_routes toneMint
class node_playground_app,node_playground_db,node_playground_orders,node_playground_input,node_playground_temporal,node_playground_routes,node_playground_web toneRose
class node_library_site,node_library_sidebar,node_operator toneIndigo
```

## Components

### App hosting

- [Host manager](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/management/manager.ts): `packages/app/app-host/src/management/manager.ts`
- [App registry](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/app-registry.ts): `packages/app/app-host/src/app-registry.ts`
- [App definitions](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/app-types.ts): `packages/app/app-host/src/app-types.ts`
- [Artifact resolver](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/artifact-resolver.ts): `packages/app/app-host/src/artifact-resolver.ts`
- [Deployment catalog](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/deployment/catalog.ts): `packages/app/app-host/src/deployment/catalog.ts`
- [Deployment log](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/deployment-log.ts): `packages/app/app-host/src/deployment-log.ts`
- [Volume manager](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/deployment/volume-manager.ts): `packages/app/app-host/src/deployment/volume-manager.ts`
- [Managed reconciler](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/management/managed-reconciler.ts): `packages/app/app-host/src/management/managed-reconciler.ts`
- [Host runtime](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-host/src/management/runtime.ts): `packages/app/app-host/src/management/runtime.ts`

### Server platform

- [Repository API](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-server/src/router/repository-routes.ts): `packages/app/app-server/src/router/repository-routes.ts`
- [Database storage](https://github.com/nocobase/nocobase3/blob/develop/packages/app/app-server/src/database/storage.ts): `packages/app/app-server/src/database/storage.ts`

### Product plugins

- [Workflow engine](https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-workflow/server/engine/engine.ts): `packages/plugins/app-plugin-workflow/server/engine/engine.ts`
- [Workflow dispatcher](https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-workflow/server/engine/dispatcher.ts): `packages/plugins/app-plugin-workflow/server/engine/dispatcher.ts`
- [Workflow processor](https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-workflow/server/engine/processor.ts): `packages/plugins/app-plugin-workflow/server/engine/processor.ts`
- [AI service routes](https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-ai-employee/server/route/llm-services.ts): `packages/plugins/app-plugin-ai-employee/server/route/llm-services.ts`
- [AI route schemas](https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-ai-employee/server/route/schemas.ts): `packages/plugins/app-plugin-ai-employee/server/route/schemas.ts`
- [LLM stream cache](https://github.com/nocobase/nocobase3/blob/develop/packages/plugins/app-plugin-ai-employee/server/manager/llm-stream-cached-manager.ts): `packages/plugins/app-plugin-ai-employee/server/manager/llm-stream-cached-manager.ts`
- [LLM repository](https://github.com/nocobase/nocobase3/blob/develop/packages/libs/ai-employee/src/repository/llm-service.ts): `packages/libs/ai-employee/src/repository/llm-service.ts`
- [Review task routes](https://github.com/nocobase/nocobase3/blob/develop/packages/templates/app-template-examples/server/routes/quotation-review-tasks.ts): `packages/templates/app-template-examples/server/routes/quotation-review-tasks.ts`

### Database playground

- [Playground server](https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/app.ts): `dev/db/playground/app.ts`
- [Playground databases](https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/database/index.ts): `dev/db/playground/database/index.ts`
- [Order service](https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/server/services/orders.ts): `dev/db/playground/server/services/orders.ts`
- [Input validation](https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/server/input.ts): `dev/db/playground/server/input.ts`
- [Temporal helpers](https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/server/temporal.ts): `dev/db/playground/server/temporal.ts`
- [Playground routes](https://github.com/nocobase/nocobase3/tree/develop/dev/db/playground/server/routes): `dev/db/playground/server/routes`
- [Playground web UI](https://github.com/nocobase/nocobase3/blob/develop/dev/db/playground/web/app.js): `dev/db/playground/web/app.js`

### Client and UI

- [UI library site](https://github.com/nocobase/nocobase3/blob/develop/ui-library/website/app.tsx): `ui-library/website/app.tsx`
- [Sidebar component](https://github.com/nocobase/nocobase3/blob/develop/ui-library/website/components/ui/sidebar.tsx): `ui-library/website/components/ui/sidebar.tsx`

### Other components

- **Operator**
- **Application user**

## Connections

- Operator → Host manager: manages deployments
- Host manager → Managed reconciler: delegates reconciliation (evidence: `packages/app/app-host/src/management/manager.ts`)
- Host manager → Host runtime: reads runtime (evidence: `packages/app/app-host/src/management/manager.ts`)
- Host manager → App registry: uses registry (evidence: `packages/app/app-host/src/management/manager.ts`)
- Host manager → Artifact resolver: uses resolver (evidence: `packages/app/app-host/src/management/manager.ts`)
- Host manager → Deployment catalog: uses catalog (evidence: `packages/app/app-host/src/management/manager.ts`)
- Host manager → Deployment log: uses deployment log (evidence: `packages/app/app-host/src/management/manager.ts`)
- Host manager → Managed reconciler: constructs reconciler (evidence: `packages/app/app-host/src/management/manager.ts`)
- Artifact resolver → Deployment catalog: uses catalog (evidence: `packages/app/app-host/src/artifact-resolver.ts`)
- Artifact resolver → Deployment log: uses deployment log (evidence: `packages/app/app-host/src/artifact-resolver.ts`)
- App registry → App definitions: uses definitions (evidence: `packages/app/app-host/src/app-registry.ts`)
- App registry → Deployment log: uses deployment log (evidence: `packages/app/app-host/src/app-registry.ts`)
- App registry → Deployment log: emits events (evidence: `packages/app/app-host/src/app-registry.ts`)
- Repository API → Database storage: queries repositories (evidence: `packages/app/app-server/src/router/repository-routes.ts`)
- Workflow engine → Workflow dispatcher: constructs dispatcher (evidence: `packages/plugins/app-plugin-workflow/server/engine/engine.ts`)
- Workflow engine → Workflow processor: uses processor (evidence: `packages/plugins/app-plugin-workflow/server/engine/engine.ts`)
- Workflow engine → Workflow dispatcher: dispatches tasks (evidence: `packages/plugins/app-plugin-workflow/server/engine/engine.ts`)
- AI service routes → AI route schemas: uses schemas (evidence: `packages/plugins/app-plugin-ai-employee/server/route/llm-services.ts`)
- LLM repository → Playground databases: stores service entities
- Playground server → Playground databases: creates databases (evidence: `dev/db/playground/app.ts`)
- Playground server → Order service: creates order service (evidence: `dev/db/playground/app.ts`)
- Playground server → Playground routes: mounts routes (evidence: `dev/db/playground/app.ts`)
- Playground server → Playground web UI: serves client script (evidence: `dev/db/playground/app.ts`)
- Playground routes → Input validation: uses validation (evidence: `dev/db/playground/server/routes/orders.ts`)
- Playground routes → Temporal helpers: uses helpers (evidence: `dev/db/playground/server/routes/contacts.ts`)
- Playground routes → Order service: calls service (evidence: `dev/db/playground/server/routes/orders.ts`)
- Application user → Repository API: requests APIs
- Application user → Playground server: uses playground
- UI library site → Sidebar component: renders sidebar (evidence: `ui-library/website/app.tsx`)
