CodamAIDocs
Topicdone

The CodamAI modules

CDMS, CIAS, CRMS, the hub and the shared building blocks: what each module is for, which repositories it consists of and how everything fits together.

Variants
CDMS: data layer and generatorCIAS: identity and accessCRMS: reportsHub: user interface and central backendshared building blockslibrary, service, user interface, tool

What this is about

CodamAI is the software factory of Codamic AG. You use it to build business applications without starting from zero every time. CodamAI consists of several modules. Each module has one clearly separated job:

  • CDMS (CodamAI Data Management System) manages the data: models, REST API, database, files, history.
  • CIAS (CodamAI Identity & Access System) handles identity and access: users, tenants, roles, registration.
  • CRMS (CodamAI Reporting Management System) creates reports from templates.
  • The hub is the central user interface with its backend. There you create projects, model your data and manage access.

Below them are shared building blocks that all Java modules use. Next to everything stands Keycloak, the identity provider. That is where people sign in.

The module map

Each module has a fixed color. You see the same colors on every page of this documentation.

flowchart TB
    subgraph HUBG["Hub"]
        direction LR
        HF["Hub user interface<br/>hub-frontend"]
        HB["Hub backend<br/>hub-backend<br/>+ MCP server"]
    end
    CP["CDMS portal<br/>modeling"]
    CIP["CIAS portal"]
    CDMS["CDMS<br/>data layer, generator,<br/>project scaffold"]
    CIAS["CIAS<br/>identity and access"]
    CRMS["CRMS<br/>reports from templates"]
    KC["Keycloak<br/>identity provider"]
    G["Shared building blocks<br/>global-parent, commons,<br/>commons-persistence"]

    HF --> HB
    CP --> HB
    CIP --> HB
    HB -- "is built with" --> CDMS
    HB -- "embeds" --> CIAS
    CRMS -- "is built with" --> CDMS
    CRMS -- "uses" --> CIAS
    CIAS -- "adapter" --> KC
    CDMS --> G
    CIAS --> G

    classDef hub fill:#4f46e5,stroke:#4f46e5,color:#fff
    classDef cdms fill:#1976d2,stroke:#1976d2,color:#fff
    classDef cias fill:#8e24aa,stroke:#8e24aa,color:#fff
    classDef crms fill:#ffc107,stroke:#b38600,color:#1f1a00
    classDef idp fill:#c2410c,stroke:#c2410c,color:#fff
    classDef shared fill:#64748b,stroke:#64748b,color:#fff
    class HF,HB hub
    class CDMS,CP cdms
    class CIAS,CIP cias
    class CRMS crms
    class KC idp
    class G shared
ColorStands for
Cobalt blueCDMS and the CDMS portal
VioletCIAS and the CIAS portal
Indigothe hub (user interface, backend, MCP server)
YellowCRMS
OrangeKeycloak
Grayshared building blocks

Read the arrows like this: “The hub backend is built with CDMS and embeds CIAS.” Embedding means: CIAS runs as a building block inside the same program, not as a separate service. What that means is explained in Embedded and standalone compared.

The modules one by one

What each module is for
CDMS
the data
  • From a model, the generator creates the code of a Spring Boot application during the build
  • REST API to create, read, search, change, delete
  • a database per tenant, history, files
  • permissions on models, row filters
  • custom business logic through hooks
CIAS
identity and access
  • checks token and tenant on every request (filter chain)
  • users, tenants, roles, groups, attributes
  • registration, invitation, emails, audit
  • writes roles and groups to Keycloak through an adapter
  • runs embedded or as a separate service
CRMS
reports
  • a CDMS application with the models template and report
  • templates in FreeMarker, state draft, published, archived
  • renders template + data to HTML and PDF
  • preview as PDF, without storing
  • charts in reports
Hub
the center
  • projects, services, licenses, people, permissions
  • holds the models of all CDMS applications
  • provides the project scaffold and the metadata for the build
  • administration of users, tenants, roles (area "Access")
  • MCP server for AI clients

A few words from the table:

  • A model describes a kind of thing your application knows, for example “customer” with its fields. More in Modeling in the hub.
  • A tenant is a customer of your application whose data is separated from everyone else’s.
  • A hook is your own code that plugs into a CDMS process.
  • MCP (Model Context Protocol) is a protocol through which AI clients call tools. The hub’s MCP server lets them read models and change them in a controlled way, see Schema change through the MCP server.

The map of the repositories

Each module consists of several repositories, that is, separate Git projects. There are four kinds:

  • Library: a Java building block (JAR) that other projects include. It never runs on its own.
  • Service: a program that starts on its own and answers requests.
  • User interface: a web application (Nuxt) with its own server, the BFF. What a BFF is, is described in The parties in a request.
  • Tool: something that runs during the build, in tests, or inside Keycloak.
flowchart LR
    subgraph GEM["Shared"]
        direction TB
        gp["global-parent"]
        co["commons"]
        cpe["commons-persistence"]
    end
    subgraph CD["CDMS"]
        direction TB
        cdl["cdms-commons · cdms-rest-api<br/>cdms-system-layer · cdms-authorization<br/>cdms-persistence-database<br/>cdms-localfs-storage"]
        cdw["cdms-generator · cdms-scaffold<br/>cdms-parent · cdms-integrationtest"]
        cdf["CDMS/frontend<br/>(CDMS portal)"]
    end
    subgraph CI["CIAS"]
        direction TB
        cil["cias-kernel · cias-authentication<br/>cias-tenancy · cias-user<br/>cias-authorization · cias-registration<br/>cias-notification · cias-audit<br/>cias-iam-api · cias-iam-keycloak<br/>cias-iam-memory · cias-tenancy-client<br/>cias-spring-boot-starter"]
        cir["cias-runtime"]
        ciw["cias-parent · cias-test-support<br/>cias-integrationtest<br/>cias-iam-keycloak-provider"]
        cif["cias-frontend<br/>(CIAS portal)"]
    end
    subgraph HU["Hub"]
        direction TB
        hb["hub-backend"]
        hf["hub-frontend"]
        hl["hub-login"]
    end
    subgraph CR["CRMS"]
        direction TB
        crb["crms-backend-mvp"]
        crf["crms-frontend-mvp"]
    end

    classDef hub fill:#4f46e5,stroke:#4f46e5,color:#fff
    classDef cdms fill:#1976d2,stroke:#1976d2,color:#fff
    classDef cias fill:#8e24aa,stroke:#8e24aa,color:#fff
    classDef crms fill:#ffc107,stroke:#b38600,color:#1f1a00
    classDef shared fill:#64748b,stroke:#64748b,color:#fff
    class gp,co,cpe shared
    class cdl,cdw,cdf cdms
    class cil,cir,ciw,cif cias
    class hb,hf,hl hub
    class crb,crf crms

Shared building blocks

RepositoryKindWhat for
global-parentToolparent POM of all Java modules: versions, plugins, quality rules
commonsLibrarya small base without business logic, e.g. the RequestContext of a request, model and hook interfaces
commons-persistenceLibrarytenant infrastructure: one system database plus one database per tenant, connections, migration. CDMS, CIAS and CRMS share it

CDMS

RepositoryKindWhat for
cdms-commonsLibrarythe contract of CDMS: interfaces, annotations, request and response formats
cdms-rest-apiLibrarythe REST layer: controllers, payloads, field selection
cdms-system-layerLibrarythe core: create, change, read, delete across relations, validation, hooks
cdms-authorizationLibraryrole checks per model and operation, attribute filters
cdms-persistence-databaseLibraryqueries, projection, history (artifact cdms-database)
cdms-localfs-storageLibraryfile contents on the file system or a volume
cdms-generatorToolcreates the code from the model during the build
cdms-scaffoldLibrarywrites the pom.xml and the project scaffold of a CDMS application
cdms-parentToolparent POMs of the CDMS libraries and of CDMS applications
cdms-integrationtestTooltest suite against a generated test application
CDMS/frontendUser interfacethe CDMS portal: edit models, fields, relations, endpoints, permissions

CIAS

RepositoryKindWhat for
cias-kernelLibrarybasic terms: tenant, user, signed-in identity, events
cias-authenticationLibrarythe filter chain: check and exchange the token, resolve and admit the tenant
cias-tenancyLibrarytenants and their life cycle
cias-userLibrarythe user record, status, attributes
cias-authorizationLibraryrole catalog, role grants, groups
cias-registrationLibraryregistration and invitation
cias-notificationLibraryemails and their templates
cias-auditLibrarythe log of all changes to people and permissions
cias-iam-apiLibrarythe ports to the identity provider, without any Keycloak reference
cias-iam-keycloakLibrarythe adapter for Keycloak
cias-iam-memoryLibraryan in-memory identity provider, for tests and development
cias-tenancy-clientLibraryasks a standalone CIAS service over HTTP whether a tenant is served
cias-spring-boot-starterLibrarywires the CIAS modules into a Spring Boot application
cias-runtimeServiceCIAS as a separate service with its own database
cias-iam-keycloak-providerToolan extension that runs inside Keycloak (link to set a password)
cias-parent, cias-test-support, cias-integrationtestToolparent POM, shared test suites for adapters, integration tests
cias-frontendUser interfacethe CIAS portal: which services are connected to CIAS and how

Hub

RepositoryKindWhat for
hub-backendServicethe central CDMS: holds projects, services and the models of all CDMS applications. Embeds CIAS and contains the MCP server
hub-frontendUser interfacethe hub user interface: projects, services, licenses, people, permissions. From here you jump into the portals of the modules
hub-loginToolthe look of the login pages, as a theme in Keycloak

CRMS

RepositoryKindWhat for
crms-backend-mvpServicea CDMS application with the models template (Template) and report (Report), plus the endpoints for preview and report
crms-frontend-mvpUser interfacecreate and edit templates, view their versions, preview them as PDF

Documentation

RepositoryKindWhat for
documentationKnowledgethe knowledge base about CodamAI, as Markdown
codamai-web-docsToolbuilds the public documentation website from the knowledge base

How the modules fit together

Dependencies always point downward: an application includes libraries, libraries include the shared building blocks. Never the other way round.

flowchart BT
    GP["global-parent"]
    CO["commons"]
    CPE["commons-persistence"]
    CDL["CDMS libraries"]
    CIL["CIAS libraries"]
    GEN["cdms-generator<br/>(during the build)"]
    HB["hub-backend"]
    CRB["crms-backend-mvp"]
    APP["your CDMS application"]
    CIR["cias-runtime"]

    CO --> GP
    CPE --> CO
    CDL --> CO
    CDL --> CPE
    CIL --> CO
    CIL --> CPE
    HB --> CDL
    HB --> CIL
    CRB --> CDL
    CRB --> CIL
    APP --> CDL
    APP --> CIL
    CIR --> CIL
    GEN -. "creates code for" .-> HB
    GEN -. "creates code for" .-> CRB
    GEN -. "creates code for" .-> APP

    classDef hub fill:#4f46e5,stroke:#4f46e5,color:#fff
    classDef cdms fill:#1976d2,stroke:#1976d2,color:#fff
    classDef cias fill:#8e24aa,stroke:#8e24aa,color:#fff
    classDef crms fill:#ffc107,stroke:#b38600,color:#1f1a00
    classDef shared fill:#64748b,stroke:#64748b,color:#fff
    classDef build fill:#57534e,stroke:#57534e,color:#fff
    class GP,CO,CPE shared
    class CDL,APP cdms
    class CIL,CIR cias
    class HB hub
    class CRB crms
    class GEN build

Three things stand out:

  1. Every CDMS application is built the same way. The hub backend, the CRMS backend and your own application include the same CDMS libraries. The generator creates the code from their model for all three. It fetches the models of your application from the hub, see Code generation in the build.
  2. CIAS comes as libraries. An application with sign-in includes cias-authentication, so that every request goes through the filter chain. Whether the other CIAS modules run in the same process or in cias-runtime is the operating mode, see Embedded and standalone compared.
  3. Only one module knows Keycloak. Only the adapter cias-iam-keycloak talks to the Keycloak admin API. Why, is explained in CIAS as a bridge to the identity provider.

Which kind of repository is this?

How you recognize the kind
starts on its own?has a Nuxt user interface?Kind
yesnoService, e.g. hub-backend, cias-runtime, crms-backend-mvp
yesyesUser interface with BFF, e.g. hub-frontend, CDMS/frontend, cias-frontend
nonoLibrary or tool, e.g. cdms-system-layer, cias-authentication, cdms-generator

Pitfalls

Next

Sources in the code and the knowledge base
  • CodamAI/CLAUDE.md §2 (modules and colors)
  • documentation/00-plattform/01-ueberblick.md, 03-repos-und-artefakte.md
  • global-parent, commons, commons-persistence – CLAUDE.md, pom.xml
  • CDMS – repositories cdms-*, cdms-parent/cdms-app-parent, cdms-scaffold/README.md, frontend/README.md
  • CIAS/CLAUDE.md §3 project structure, §6 operating models; cias-runtime/pom.xml; cias-frontend/README.md
  • hub-backend – pom.xml, CLAUDE.md, application.yaml (codamai.cias.*), structure/
  • hub-frontend – README.md, shared/types/module.ts, app/composables/useModulePortals.ts
  • CRMS/crms-backend-mvp – pom.xml, ReporterAPI, ReporterService, TemplateHookService, STATE; CRMS/crms-frontend-mvp – README.md
  • hub-login/CLAUDE.md, CIAS/cias-iam-keycloak-provider, codamai-web-docs/CLAUDE.md, documentation/CLAUDE.md
Search