# Architecture

One Quarkus server, one DocType engine, PostgreSQL with row-level security; apps, Wasm, Seata, Keycloak and a CDC worker around it.

Company: AstraCMS Docs
API version: Không áp dụng
Requested language: en
Content language: en
Source: https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/architecture

![Astra architecture: every write goes through one engine](https://raw.githubusercontent.com/ZeroHostCMS/astra-cms/main/docs/architecture/astra-architecture.en.png)

Clients (the Desk web UI, the mobile app and AI agents over MCP) call one Quarkus server. A request passes the REST API and the tenant-scoping kernel into the DocType engine, which writes to PostgreSQL under row-level security.

## What is in the picture

- **Kernel and DocType engine:** one JSONB table holds every DocType; overlays add per-tenant fields without migrations.
- **Apps:** plain Java and YAML on `astra-spi`, hooked into the write path (CMS, Express, HRM, STMS).
- **Wasm host:** per-tenant business formulas run in a sandbox with time limits.
- **Transactions:** Seata (AT and TCC) with Redis coordinates writes that span services.
- **Identity:** Keycloak with OIDC, SAML SSO and SCIM provisioning.
- **CDC worker:** a Rust worker reads the write-ahead log and keeps read replicas up to date.

The interactive version is [astra-architecture.en.html](https://github.com/ZeroHostCMS/astra-cms/blob/main/docs/architecture/astra-architecture.en.html). The articles walk through each part: [DocType](/astra-cms/en/doctype), [multi-tenancy](/astra-cms/en/tenants), [Seata](/astra-cms/en/seata), [Keycloak](/astra-cms/en/keycloak), [Wasm](/astra-cms/en/wasm) and [CDC](/astra-cms/en/cdc).

