# scc-digitalhub/digitalhub-core architecture

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

- Interactive diagram: https://gitdiagram.com/scc-digitalhub/digitalhub-core
- Repository: https://github.com/scc-digitalhub/digitalhub-core

## Overview

DigitalHub CORE is a multi-module Java platform built around one central Spring Boot application, plus a large set of optional modules that plug in domain capabilities, execution backends, authentication, search, storage, and triggers.

##### Core application as the composition root

The `application` module is the runtime entry point. It wires together:

- REST controllers for the main resources
- security and token handling
- persistence configuration
- web socket configuration
- OpenAPI publishing
- API versioning and request handling
- configuration exposure and environment export
- the console UI

The application exposes resource-oriented controllers for:
- functions, projects, runs, tasks, workflows
- models, artifacts, data items, schemas, secrets
- users and user tokens
- logs
- context-specific operations such as search, trigger execution, and contextual resource views

It also has endpoint classes for:
- configuration
- well-known/discovery metadata
- versioned API handling and advice

The application is the central integration point where all modules converge.

##### Shared platform modules

Several modules provide the common substrate used everywhere else:

##### Common model and infrastructure layer
`modules/commons` defines:
- base resource types and DTOs
- metadata, spec, status, and state abstractions
- shared exceptions
- configuration property objects
- generic infrastructure interfaces such as `Framework`, `Runtime`, `Processor`, `ProcessorRegistry`, `SpecFactory`, `ConfigurationProvider`
- shared utility classes, Jackson helpers, and schema utilities

This module is the type system of the platform. It standardizes how resources, specs, statuses, and runtime abstractions look across the whole codebase.

##### Entity base layer
`modules/entity-base` provides:
- generic persistence entities
- base repositories and builders
- generic entity services and finalizers
- metadata builders for audit/versioning
- entity event abstractions
- query/filter support
- CBOR and map-to-CBOR conversion support

This is the persistence and lifecycle foundation used by each domain entity module.

##### FSM/lifecycle layer
`modules/fsm` provides:
- generic finite-state-machine support
- lifecycle managers and state transitions
- transition logic and invalid-transition protection
- lifecycle event types

This is used by run, trigger, and other stateful resources to keep state transitions consistent.

##### Relationship layer
`modules/component-relationships` adds:
- relationship metadata and persistence
- reusable relationships-aware entity services
- relationship managers

This is how the platform models links such as project ownership, run/function associations, and other cross-resource references.

##### Search layer
`modules/component-search` provides:
- generic indexing and search services
- search result and grouping models
- indexable entity service abstractions

This is the abstraction used by Lucene and Solr-backed search implementations.

##### Files and storage layer
`modules/component-files` provides:
- file store abstractions
- file metadata persistence
- upload/download models
- HTTP-based store support

This is the platform’s file/data artifact access boundary.

##### Authorization and credentials
`modules/authorization` manages:
- JWT/OAuth2 token issuance and validation
- user authentication context
- refresh/access token lifecycle
- resource sharing
- credentials service and schedulers
- dynamic credential providers used by jobs and user tools

This module is important because the platform gives executions temporary credentials derived from the authenticated user context.

##### Cloud and notifications
`modules/component-cloud` contains:
- cloud event listener abstractions
- entity event models
- websocket user notifications

This is the outbound event/notification path from entity changes to UI and external broadcasters.

##### Extensions
`modules/component-extensions` is the extensibility boundary:
- extension scanning
- extension definitions and schemas
- extension-aware entity services and controllers

This allows the platform to add new entity types or UI/API extensions without changing the core resource flow.

##### Labels, metrics, proxy, Envoy gateway
These modules add supporting concerns:
- labels as metadata resources
- metrics persistence and service abstractions
- proxy routing
- Envoy Gateway custom resource generation and management

##### Domain entity modules

Each entity module follows a very similar internal structure:
- model/spec/status types
- persistence entity and repository
- DTO/entity builders
- filters for query/search
- services or managers
- lifecycle/listener hooks
- relationship managers when needed
- optional indexing, metrics, or cloud listeners

Examples:

- `entities/entity-project`
- `entities/entity-function`
- `entities/entity-run`
- `entities/entity-task`
- `entities/entity-workflow`
- `entities/entity-model`
- `entities/entity-dataitem`
- `entities/entity-artifact`
- `entities/entity-secret`
- `entities/entity-log`
- `entities/entity-trigger`

##### Important patterns inside entity modules
- **Persistence**: repositories store entity state in the shared relational database.
- **Filtering/search**: entity-specific filters are converted to query criteria.
- **Lifecycle**: listeners and lifecycle managers handle state changes.
- **Relationships**: associated resources are tracked separately from the main entity row.
- **Finalization**: when a resource is removed or transitions, finalizers handle cleanup.
- **DTO builders**: internal entities are mapped to API-facing objects.

##### Runs, tasks, and lifecycles: the core execution flow

The most important functional flow in the platform is:

**function definition -> runtime selection -> run creation -> task generation -> framework execution -> status/log updates -> persisted run state**

Runs are central because they represent executable instances of functions. Tasks are the lower-level execution units produced from a run. Lifecycles ensure the run progresses through valid states.

The repository contains several layers that enforce this:

- `modules/fsm` for generic state transitions
- `modules/runtime-base` for runnable persistence and run lifecycle management
- `application/core/runs` for run-specific lifecycle processors and listeners
- `entities/entity-run` for persisted run state and metrics
- `entities/entity-task` for task-level records

The run lifecycle path is typically:
1

Main entry points: [`application/src/main/java/it/smartcommunitylabdhub/core/CoreApplication.java`](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/application/src/main/java/it/smartcommunitylabdhub/core/CoreApplication.java) (Core app), [`frameworks/framework-k8s/src/main/java/it/smartcommunitylabdhub/framework/k8s/infrastructure/k8s/K8sBaseFramework.java`](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/frameworks/framework-k8s/src/main/java/it/smartcommunitylabdhub/framework/k8s/infrastructure/k8s/K8sBaseFramework.java) (K8s fw), [`entities/entity-function/src/main/java/it/smartcommunitylabdhub/functions/service/FunctionEntityServiceImpl.java`](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-function/src/main/java/it/smartcommunitylabdhub/functions/service/FunctionEntityServiceImpl.java) (Functions), [`modules/component-cloud/src/main/java/it/smartcommunitylabdhub/components/cloud/BaseCloudListener.java`](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/component-cloud/src/main/java/it/smartcommunitylabdhub/components/cloud/BaseCloudListener.java) (Cloud events)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph "Application"
  app["Core app<br/>spring-boot entry"]
  app_api["API layer<br/>rest controllers"]
  app_config["App config<br/>boot config<br/>[AppConfig.java]"]
  app_runs["Run lifecycle<br/>orchestration service"]
end

subgraph "Shared modules"
  commons["Commons<br/>platform types<br/>[BaseSpec.java]"]
  entity_base["Entity base<br/>persistence base"]
  fsm["FSM<br/>lifecycle engine<br/>[Fsm.java]"]
  relationships["Relationships<br/>link model"]
  search["Search<br/>[SearchService.java]"]
  files["Files<br/>file store<br/>[FilesService.java]"]
  auth["Auth<br/>[TokenService.java]"]
  cloud["Cloud events<br/>eventing"]
  extensions["Extensions<br/>extensibility"]
end

subgraph "Domain entities"
  projects["Projects<br/>domain module"]
  functions["Functions<br/>domain module"]
  runs["Runs<br/>domain module"]
  tasks["Tasks<br/>domain module<br/>[TaskEntity.java]"]
  workflows["Workflows<br/>domain module"]
  models["Models<br/>domain module"]
  artifacts["Artifacts<br/>domain module"]
  dataitems["Data items<br/>domain module"]
  secrets["Secrets<br/>domain module"]
  logs["Logs<br/>domain module"]
  triggers["Triggers<br/>domain module"]
end

subgraph "Execution runtimes"
  runtime_base["Runtime base<br/>runtime foundation"]
  container_rt["Container rt<br/>runtime adapter"]
  python_rt["Python rt<br/>runtime adapter<br/>[PythonRuntime.java]"]
  modelserve_rt["Model serve rt<br/>runtime adapter"]
  dbt_rt["DBT rt<br/>runtime adapter<br/>[DbtRuntime.java]"]
  flower_rt["Flower rt<br/>runtime adapter"]
  hera_rt["Hera rt<br/>runtime adapter<br/>[HeraRuntime.java]"]
  kfp_rt["KFP rt<br/>runtime adapter<br/>[KFPRuntime.java]"]
  kubeai_rt["KubeAI rt<br/>runtime adapter<br/>[KubeAIRuntime.java]"]
end

subgraph "Infrastructure frameworks"
  k8s_fw["K8s fw<br/>infra backend"]
end

subgraph "Providers"
end

subgraph "User surface"
end

app -->|"exposes"| app_api
app -->|"wires"| app_config
app -->|"coordinates"| app_runs
app -->|"uses"| commons
app -->|"uses"| entity_base
app -->|"uses"| auth
app -->|"notifies"| cloud
app -->|"extends"| extensions
app -->|"manages"| projects
app -->|"manages"| functions
app -->|"manages"| runs
app -->|"manages"| tasks
app -->|"manages"| workflows
app -->|"manages"| models
app -->|"manages"| artifacts
app -->|"manages"| dataitems
app -->|"manages"| secrets
app -->|"manages"| logs
app -->|"manages"| triggers
app -->|"loads"| container_rt
app -->|"loads"| python_rt
app -->|"loads"| modelserve_rt
app -->|"loads"| dbt_rt
app -->|"loads"| flower_rt
app -->|"loads"| hera_rt
app -->|"loads"| kfp_rt
app -->|"loads"| kubeai_rt
container_rt -->|"executes on"| k8s_fw
python_rt -->|"executes on"| k8s_fw
modelserve_rt -->|"executes on"| k8s_fw
dbt_rt -->|"executes on"| k8s_fw
flower_rt -->|"executes on"| k8s_fw
hera_rt -->|"executes on"| k8s_fw
kfp_rt -->|"executes on"| k8s_fw
kubeai_rt -->|"executes on"| k8s_fw
app_runs -->|"depends on"| runtime_base
app_runs -->|"uses"| fsm
runs -->|"persists"| runtime_base
runs -->|"emits"| cloud
functions -->|"links"| relationships
functions -->|"indexes"| search
functions -->|"emits"| cloud
workflows -->|"links"| relationships
workflows -->|"indexes"| search
models -->|"emits"| cloud
artifacts -->|"stores"| files
dataitems -->|"stores"| files
secrets -->|"secures"| auth

click app "https://github.com/scc-digitalhub/digitalhub-core/blob/main/application/src/main/java/it/smartcommunitylabdhub/core/CoreApplication.java"
click app_api "https://github.com/scc-digitalhub/digitalhub-core/blob/main/application/src/main/java/it/smartcommunitylabdhub/core/controllers/v1/base/FunctionController.java"
click app_config "https://github.com/scc-digitalhub/digitalhub-core/blob/main/application/src/main/java/it/smartcommunitylabdhub/core/config/AppConfig.java"
click app_runs "https://github.com/scc-digitalhub/digitalhub-core/blob/main/application/src/main/java/it/smartcommunitylabdhub/core/runs/service/RunManagerImpl.java"
click commons "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/commons/src/main/java/it/smartcommunitylabdhub/commons/models/base/BaseSpec.java"
click entity_base "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/entity-base/src/main/java/it/smartcommunitylabdhub/core/services/BaseEntityServiceImpl.java"
click fsm "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/fsm/src/main/java/it/smartcommunitylabdhub/fsm/Fsm.java"
click relationships "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/component-relationships/src/main/java/it/smartcommunitylabdhub/relationships/RelationshipsManager.java"
click search "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/component-search/src/main/java/it/smartcommunitylabdhub/search/service/SearchService.java"
click files "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/component-files/src/main/java/it/smartcommunitylabdhub/files/service/FilesService.java"
click auth "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/authorization/src/main/java/it/smartcommunitylabdhub/authorization/services/TokenService.java"
click cloud "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/component-cloud/src/main/java/it/smartcommunitylabdhub/components/cloud/BaseCloudListener.java"
click extensions "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/component-extensions/src/main/java/it/smartcommunitylabdhub/extensions/ExtensionManager.java"
click projects "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-project/src/main/java/it/smartcommunitylabdhub/projects/service/ProjectEntityServiceImpl.java"
click functions "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-function/src/main/java/it/smartcommunitylabdhub/functions/service/FunctionEntityServiceImpl.java"
click runs "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-run/src/main/java/it/smartcommunitylabdhub/runs/service/RunEntityServiceImpl.java"
click tasks "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-task/src/main/java/it/smartcommunitylabdhub/tasks/persistence/TaskEntity.java"
click workflows "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-workflow/src/main/java/it/smartcommunitylabdhub/workflows/service/WorkflowEntityServiceImpl.java"
click models "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-model/src/main/java/it/smartcommunitylabdhub/models/services/ModelManagerImpl.java"
click artifacts "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-artifact/src/main/java/it/smartcommunitylabdhub/artifacts/services/ArtifactManagerImpl.java"
click dataitems "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-dataitem/src/main/java/it/smartcommunitylabdhub/dataitems/services/DataItemManagerImpl.java"
click secrets "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-secret/src/main/java/it/smartcommunitylabdhub/secrets/SecretServiceImpl.java"
click logs "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-log/src/main/java/it/smartcommunitylabdhub/logs/service/LogServiceImpl.java"
click triggers "https://github.com/scc-digitalhub/digitalhub-core/blob/main/entities/entity-trigger/src/main/java/it/smartcommunitylabdhub/triggers/service/TriggerManagerImpl.java"
click runtime_base "https://github.com/scc-digitalhub/digitalhub-core/blob/main/modules/runtime-base/src/main/java/it/smartcommunitylabdhub/runtimes/base/AbstractBaseRuntime.java"
click container_rt "https://github.com/scc-digitalhub/digitalhub-core/blob/main/runtimes/runtime-container/src/main/java/it/smartcommunitylabdhub/runtime/container/ContainerRuntime.java"
click python_rt "https://github.com/scc-digitalhub/digitalhub-core/blob/main/runtimes/runtime-python/src/main/java/it/smartcommunitylabdhub/runtime/python/PythonRuntime.java"
click modelserve_rt "https://github.com/scc-digitalhub/digitalhub-core/blob/main/runtimes/runtime-model-serve/src/main/java/it/smartcommunitylabdhub/runtime/huggingface/HuggingfaceServeRuntime.java"
click dbt_rt "https://github.com/scc-digitalhub/digitalhub-core/blob/main/runtimes/runtime-dbt/src/main/java/it/smartcommunitylabdhub/runtime/dbt/DbtRuntime.java"
click flower_rt "https://github.com/scc-digitalhub/digitalhub-core/blob/main/runtimes/runtime-flower/src/main/java/it/smartcommunitylabdhub/runtime/flower/app/FlowerAppRuntime.java"
click hera_rt "https://github.com/scc-digitalhub/digitalhub-core/blob/main/runtimes/runtime-hera/src/main/java/it/smartcommunitylabdhub/runtime/hera/HeraRuntime.java"
click kfp_rt "https://github.com/scc-digitalhub/digitalhub-core/blob/main/runtimes/runtime-kfp/src/main/java/it/smartcommunitylabdhub/runtime/kfp/KFPRuntime.java"
click kubeai_rt "https://github.com/scc-digitalhub/digitalhub-core/blob/main/runtimes/runtime-kubeai/src/main/java/it/smartcommunitylabdhub/runtime/kubeai/base/KubeAIRuntime.java"
click k8s_fw "https://github.com/scc-digitalhub/digitalhub-core/blob/main/frameworks/framework-k8s/src/main/java/it/smartcommunitylabdhub/framework/k8s/infrastructure/k8s/K8sBaseFramework.java"

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 app,app_api,app_config,app_runs toneBlue
class commons,entity_base,fsm,relationships,search,files,auth,cloud,extensions toneAmber
class projects,functions,runs,tasks,workflows,models,artifacts,dataitems,secrets,logs,triggers toneMint
class runtime_base,container_rt,python_rt,modelserve_rt,dbt_rt,flower_rt,hera_rt,kfp_rt,kubeai_rt toneRose
class k8s_fw toneIndigo
```

## Components

### Application

Spring Boot composition root and public API

- [Core app](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/application/src/main/java/it/smartcommunitylabdhub/core/CoreApplication.java): spring-boot entry · Main application wiring controllers, security, persistence, versioning, and UI hosting · `application/src/main/java/it/smartcommunitylabdhub/core/CoreApplication.java`
- [API layer](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/application/src/main/java/it/smartcommunitylabdhub/core/controllers/v1/base/FunctionController.java): rest controllers · Versioned resource endpoints, context controllers, and advice · `application/src/main/java/it/smartcommunitylabdhub/core/controllers/v1/base/FunctionController.java`
- [App config](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/application/src/main/java/it/smartcommunitylabdhub/core/config/AppConfig.java): boot config · Security, OpenAPI, websocket, persistence, async, and versioning configuration · `application/src/main/java/it/smartcommunitylabdhub/core/config/AppConfig.java`
- [Run lifecycle](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/application/src/main/java/it/smartcommunitylabdhub/core/runs/service/RunManagerImpl.java): orchestration service · Run managers, lifecycle processors, listeners, and task coordination · `application/src/main/java/it/smartcommunitylabdhub/core/runs/service/RunManagerImpl.java`

### Shared modules

Cross-cutting platform foundations and reusable services

- [Commons](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/commons/src/main/java/it/smartcommunitylabdhub/commons/models/base/BaseSpec.java): platform types · Shared resource model, spec/status abstractions, infrastructure interfaces, and schema utilities · `modules/commons/src/main/java/it/smartcommunitylabdhub/commons/models/base/BaseSpec.java`
- [Entity base](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/entity-base/src/main/java/it/smartcommunitylabdhub/core/services/BaseEntityServiceImpl.java): persistence base · Generic entity persistence, repositories, DTO builders, and versioning support · `modules/entity-base/src/main/java/it/smartcommunitylabdhub/core/services/BaseEntityServiceImpl.java`
- [FSM](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/fsm/src/main/java/it/smartcommunitylabdhub/fsm/Fsm.java): lifecycle engine · Finite-state-machine and lifecycle transition framework · `modules/fsm/src/main/java/it/smartcommunitylabdhub/fsm/Fsm.java`
- [Relationships](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/component-relationships/src/main/java/it/smartcommunitylabdhub/relationships/RelationshipsManager.java): link model · Reusable relationship metadata and services between entities · `modules/component-relationships/src/main/java/it/smartcommunitylabdhub/relationships/RelationshipsManager.java`
- [Search](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/component-search/src/main/java/it/smartcommunitylabdhub/search/service/SearchService.java): index/search · Search and indexing abstractions shared by Lucene and Solr implementations · `modules/component-search/src/main/java/it/smartcommunitylabdhub/search/service/SearchService.java`
- [Files](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/component-files/src/main/java/it/smartcommunitylabdhub/files/service/FilesService.java): file store · Artifact/file storage abstractions and HTTP-backed stores · `modules/component-files/src/main/java/it/smartcommunitylabdhub/files/service/FilesService.java`
- [Auth](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/authorization/src/main/java/it/smartcommunitylabdhub/authorization/services/TokenService.java): jwt/oauth2 · Authentication, token lifecycle, resource sharing, and dynamic credentials · `modules/authorization/src/main/java/it/smartcommunitylabdhub/authorization/services/TokenService.java`
- [Cloud events](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/component-cloud/src/main/java/it/smartcommunitylabdhub/components/cloud/BaseCloudListener.java): eventing · Entity events and websocket notification path · `modules/component-cloud/src/main/java/it/smartcommunitylabdhub/components/cloud/BaseCloudListener.java`
- [Extensions](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/component-extensions/src/main/java/it/smartcommunitylabdhub/extensions/ExtensionManager.java): extensibility · Extension scanning, schemas, and extensible entity controllers · `modules/component-extensions/src/main/java/it/smartcommunitylabdhub/extensions/ExtensionManager.java`

### Domain entities

Resource-specific modules for core business objects

- [Projects](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-project/src/main/java/it/smartcommunitylabdhub/projects/service/ProjectEntityServiceImpl.java): domain module · Project entities, authorization-aware services, and sharing support · `entities/entity-project/src/main/java/it/smartcommunitylabdhub/projects/service/ProjectEntityServiceImpl.java`
- [Functions](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-function/src/main/java/it/smartcommunitylabdhub/functions/service/FunctionEntityServiceImpl.java): domain module · Function model, persistence, relationships, indexing, and versioning · `entities/entity-function/src/main/java/it/smartcommunitylabdhub/functions/service/FunctionEntityServiceImpl.java`
- [Runs](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-run/src/main/java/it/smartcommunitylabdhub/runs/service/RunEntityServiceImpl.java): domain module · Persisted run state, metrics, relationships, and notifications · `entities/entity-run/src/main/java/it/smartcommunitylabdhub/runs/service/RunEntityServiceImpl.java`
- [Tasks](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-task/src/main/java/it/smartcommunitylabdhub/tasks/persistence/TaskEntity.java): domain module · Task persistence and filtering for execution units · `entities/entity-task/src/main/java/it/smartcommunitylabdhub/tasks/persistence/TaskEntity.java`
- [Workflows](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-workflow/src/main/java/it/smartcommunitylabdhub/workflows/service/WorkflowEntityServiceImpl.java): domain module · Workflow entities, relationship handling, and versioned service layer · `entities/entity-workflow/src/main/java/it/smartcommunitylabdhub/workflows/service/WorkflowEntityServiceImpl.java`
- [Models](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-model/src/main/java/it/smartcommunitylabdhub/models/services/ModelManagerImpl.java): domain module · Model entities and metrics-aware lifecycle services · `entities/entity-model/src/main/java/it/smartcommunitylabdhub/models/services/ModelManagerImpl.java`
- [Artifacts](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-artifact/src/main/java/it/smartcommunitylabdhub/artifacts/services/ArtifactManagerImpl.java): domain module · Artifact persistence, lifecycle, and relationship management · `entities/entity-artifact/src/main/java/it/smartcommunitylabdhub/artifacts/services/ArtifactManagerImpl.java`
- [Data items](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-dataitem/src/main/java/it/smartcommunitylabdhub/dataitems/services/DataItemManagerImpl.java): domain module · Data item and table schema resources · `entities/entity-dataitem/src/main/java/it/smartcommunitylabdhub/dataitems/services/DataItemManagerImpl.java`
- [Secrets](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-secret/src/main/java/it/smartcommunitylabdhub/secrets/SecretServiceImpl.java): domain module · Secret resource service and persistence · `entities/entity-secret/src/main/java/it/smartcommunitylabdhub/secrets/SecretServiceImpl.java`
- [Logs](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-log/src/main/java/it/smartcommunitylabdhub/logs/service/LogServiceImpl.java): domain module · Log persistence and query service · `entities/entity-log/src/main/java/it/smartcommunitylabdhub/logs/service/LogServiceImpl.java`
- [Triggers](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/entities/entity-trigger/src/main/java/it/smartcommunitylabdhub/triggers/service/TriggerManagerImpl.java): domain module · Trigger resources and execution relationships · `entities/entity-trigger/src/main/java/it/smartcommunitylabdhub/triggers/service/TriggerManagerImpl.java`

### Execution runtimes

Function and workflow execution adapters

- [Runtime base](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/modules/runtime-base/src/main/java/it/smartcommunitylabdhub/runtimes/base/AbstractBaseRuntime.java): runtime foundation · Runnable persistence, lifecycle, and runtime abstractions · `modules/runtime-base/src/main/java/it/smartcommunitylabdhub/runtimes/base/AbstractBaseRuntime.java`
- [Container rt](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/runtimes/runtime-container/src/main/java/it/smartcommunitylabdhub/runtime/container/ContainerRuntime.java): runtime adapter · Container build/deploy/job/serve runtime implementation · `runtimes/runtime-container/src/main/java/it/smartcommunitylabdhub/runtime/container/ContainerRuntime.java`
- [Python rt](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/runtimes/runtime-python/src/main/java/it/smartcommunitylabdhub/runtime/python/PythonRuntime.java): runtime adapter · Python build/job/serve plus guardrail and openinference runtimes · `runtimes/runtime-python/src/main/java/it/smartcommunitylabdhub/runtime/python/PythonRuntime.java`
- [Model serve rt](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/runtimes/runtime-model-serve/src/main/java/it/smartcommunitylabdhub/runtime/huggingface/HuggingfaceServeRuntime.java): runtime adapter · Model-serving runtimes for MLflow, HuggingFace, sklearn, VLLM, and variants · `runtimes/runtime-model-serve/src/main/java/it/smartcommunitylabdhub/runtime/huggingface/HuggingfaceServeRuntime.java`
- [DBT rt](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/runtimes/runtime-dbt/src/main/java/it/smartcommunitylabdhub/runtime/dbt/DbtRuntime.java): runtime adapter · DBT transform runtime · `runtimes/runtime-dbt/src/main/java/it/smartcommunitylabdhub/runtime/dbt/DbtRuntime.java`
- [Flower rt](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/runtimes/runtime-flower/src/main/java/it/smartcommunitylabdhub/runtime/flower/app/FlowerAppRuntime.java): runtime adapter · Flower client/server/application training runtimes · `runtimes/runtime-flower/src/main/java/it/smartcommunitylabdhub/runtime/flower/app/FlowerAppRuntime.java`
- [Hera rt](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/runtimes/runtime-hera/src/main/java/it/smartcommunitylabdhub/runtime/hera/HeraRuntime.java): runtime adapter · Hera build and pipeline runtime · `runtimes/runtime-hera/src/main/java/it/smartcommunitylabdhub/runtime/hera/HeraRuntime.java`
- [KFP rt](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/runtimes/runtime-kfp/src/main/java/it/smartcommunitylabdhub/runtime/kfp/KFPRuntime.java): runtime adapter · Kubeflow Pipelines build and pipeline runtime · `runtimes/runtime-kfp/src/main/java/it/smartcommunitylabdhub/runtime/kfp/KFPRuntime.java`
- [KubeAI rt](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/runtimes/runtime-kubeai/src/main/java/it/smartcommunitylabdhub/runtime/kubeai/base/KubeAIRuntime.java): runtime adapter · KubeAI text and speech serving runtime · `runtimes/runtime-kubeai/src/main/java/it/smartcommunitylabdhub/runtime/kubeai/base/KubeAIRuntime.java`

### Infrastructure frameworks

Kubernetes, build, and orchestration backends

- [K8s fw](https://github.com/scc-digitalhub/digitalhub-core/blob/HEAD/frameworks/framework-k8s/src/main/java/it/smartcommunitylabdhub/framework/k8s/infrastructure/k8s/K8sBaseFramework.java): infra backend · Shared Kubernetes execution primitives, monitors, watchers, and runnable helpers · `frameworks/framework-k8s/src/main/java/it/smartcommunitylabdhub/framework/k8s/infrastructure/k8s/K8sBaseFramework.java`

## Connections

- Core app → API layer: exposes · Publishes public REST surface
- Core app → App config: wires · Bootstraps infrastructure and security
- Core app → Run lifecycle: coordinates · Drives run lifecycle services
- Core app → Commons: uses · Shares platform model and interfaces
- Core app → Entity base: uses · Builds on base persistence services
- Core app → Auth: uses · Authenticates users and issues tokens
- Core app → Cloud events: notifies · Publishes entity events to UI and broadcasters
- Core app → Extensions: extends · Supports extensible entity/API surfaces
- Core app → Projects: manages · Hosts core project resource service
- Core app → Functions: manages · Hosts function resource service
- Core app → Runs: manages · Hosts run resource service
- Core app → Tasks: manages · Hosts task resource service
- Core app → Workflows: manages · Hosts workflow resource service
- Core app → Models: manages · Hosts model resource service
- Core app → Artifacts: manages · Hosts artifact resource service
- Core app → Data items: manages · Hosts data item resource service
- Core app → Secrets: manages · Hosts secret resource service
- Core app → Logs: manages · Hosts log resource service
- Core app → Triggers: manages · Hosts trigger resource service
- Core app → Container rt: loads · Activates container runtime module
- Core app → Python rt: loads · Activates Python runtime module
- Core app → Model serve rt: loads · Activates model-serving runtimes
- Core app → DBT rt: loads · Activates DBT runtime module
- Core app → Flower rt: loads · Activates Flower runtime module
- Core app → Hera rt: loads · Activates Hera runtime module
- Core app → KFP rt: loads · Activates KFP runtime module
- Core app → KubeAI rt: loads · Activates KubeAI runtime module
- Container rt → K8s fw: executes on · Uses Kubernetes primitives for build/deploy/job/serve
- Python rt → K8s fw: executes on · Uses Kubernetes-backed runtime primitives
- Model serve rt → K8s fw: executes on · Uses Kubernetes-backed serving infrastructure
- DBT rt → K8s fw: executes on · Uses Kubernetes-backed jobs
- Flower rt → K8s fw: executes on · Uses Kubernetes-backed runners
- Hera rt → K8s fw: executes on · Uses Kubernetes-backed pipelines
- KFP rt → K8s fw: executes on · Uses Kubernetes-backed pipelines
- KubeAI rt → K8s fw: executes on · Uses Kubernetes-backed serve workloads
- Run lifecycle → Runtime base: depends on · Run orchestration is built on runtime base abstractions
- Run lifecycle → FSM: uses · Applies lifecycle state machines
- Runs → Runtime base: persists · Run entity is stored via runtime base layer
- Runs → Cloud events: emits · Broadcasts run state changes
- Functions → Relationships: links · Tracks function relationships
- Functions → Search: indexes · Provides function search/index support
- Functions → Cloud events: emits · Broadcasts function changes
- Workflows → Relationships: links · Tracks workflow relationships
- Workflows → Search: indexes · Provides workflow search/index support
- Models → Cloud events: emits · Broadcasts model changes
- Artifacts → Files: stores · Uses file storage boundary for artifacts
- Data items → Files: stores · Uses file storage boundary for data items
- Secrets → Auth: secures · Uses credential and auth services
