# AstraCMS Docs: API documentation > Astra CMS: a metadata-driven, Java-based platform that changes continuously without downtime. Architecture, demo videos and deep-dive articles in English and Vietnamese. Public product documentation. Never put API tokens, customer data, or private contracts into AI prompts. API version: Không áp dụng. Content fallback is explicitly labeled per page. ## Machine-readable resources - [OpenAPI 3.1](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/openapi.json): Machine-readable request and response contracts. - [Complete documentation](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/llms-full.txt): All published pages for this company and locale, including Mermaid source. ## Documentation - [Overview](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/overview.md): Astra CMS documentation: why it exists, how it is built, 22 demo videos and 21 deep-dive articles. [content: en] - [Why Astra](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/why-astra.md): English · Tiếng Việt · Back to the README [content: en] - [Architecture](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/architecture.md): One Quarkus server, one DocType engine, PostgreSQL with row-level security; apps, Wasm, Seata, Keycloak and a CDC worker around it. [content: en] - [IAM: integrating the Flutter app](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/iam-mobile.md): How the mobile app signs users in to Astra and calls the API. The local stack (make k3d-up) serves the API and the Keycloak login page from one origin, http://localhost:8080 by default. [content: en] - [Demo videos](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/videos.md): All demo videos with English and Vietnamese versions and a link to the article behind each one. [content: en] - [Video scripts](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/video-scripts.md): Vietnamese original: demo-video-series.md. [content: en] - [What is Astra & running it locally](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/quickstart.md): Astra is a metadata-driven business kernel; five commands give you a real Kubernetes cluster on a laptop, two seeded courier companies and a Desk generated from the DocTypes the apps contribute. Read this if: you want… [content: en] - [DocType: from one YAML file to API, UI and indexes](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/doctype.md): A DocType is one YAML file; from it the kernel serves a validated REST API, Desk builds the form and list, projected fields get online expression indexes, and every DocType is stored in one shared JSONB table with no… [content: en] - [Business rules: hooks & validation](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/hooks.md): A business rule is a plain Java CDI bean that the kernel calls before every write of its DocType, inside the write's transaction, so the 73,000 ₫ shipping fee and the validation errors are identical whether the order… [content: en] - [Document lifecycle: Submit, Cancel, Amend](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/lifecycle.md): a submitted document in Astra is final; you correct it by cancelling (which writes reversals, never edits) and amending (which creates one new linked draft), and every step runs in a single database transaction together… [content: en] - [Operations: the parcel state machine](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/ops.md): a parcel's status in Astra can only move along a transition table declared in one Java map, every accepted move appends a milestone to a scan log that no user can write, and an order cannot be cancelled once its parcel… [content: en] - [Customer care sees operations](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/care.md): when a care agent opens a support ticket against a waybill, a hook raises the priority for loss or damage complaints, sets an SLA deadline and copies the parcel's current status onto the ticket, while a card under the… [content: en] - [Multi-tenancy](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/tenants.md): One Astra server hosts many companies; the kernel decides which tenant a request belongs to, carries that decision in a Java ScopedValue into a transaction-local PostgreSQL setting, and row-level security returns zero… [content: en] - [Fail-closed security](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/failclosed.md): If the kernel is pointed at a PostgreSQL role that would ignore row-level security (a superuser or a BYPASSRLS role), it refuses to start, before any migration runs, instead of quietly serving every tenant's data to… [content: en] - [Running on Kubernetes](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/k8s.md): Astra runs as two stateless kernel replicas from day one; document numbers stay gapless and unique across pods because the counter is one PostgreSQL upsert under a row lock inside the document's own transaction, and a… [content: en] - [For developers: writing an Astra app](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/developer.md): an Astra app is plain Java and YAML compiled against one small SPI module (astra-spi); the kernel turns the YAML into storage, REST, Desk and validation, and runs your hooks inside the document's own transaction. Read… [content: en] - [Tenant overlays](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/overlay.md): a tenant overlay is a small YAML file, stored per tenant under row-level security, that adds fields to an app's DocType or adjusts a safe subset of field properties, and takes effect at once for that tenant only… [content: en] - [Tier 2 Wasm: each tenant's own shipping formula](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/wasm.md): a tenant uploads its own shipping-fee formula as a WebAssembly module inside an ordinary PricingRule document; the kernel test-runs it in a pure-Java sandbox on save, and once switched on it prices orders with a 1 MiB… [content: en] - [Keycloak: one identity, roles per tenant, permissions per DocType](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/keycloak.md): a person signs in once with Keycloak, their roles come from signed Keycloak group paths /tenants//, and each DocType's YAML decides what those roles may read, create, write, submit and cancel, with… [content: en] - [SAML SSO and SCIM](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/sso.md): a company's employees sign in to Astra through their own SAML 2.0 IdP brokered by Keycloak, IdP groups become tenant roles in the OIDC token, and the company's directory creates, assigns roles to, disables and deletes… [content: en] - [Append-only ledger](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/ledger.md): business documents post balanced double-entry lines into one PostgreSQL table, astraledger, in the same transaction as the document; corrections are reversing entries, and a database trigger refuses UPDATE and DELETE… [content: en] - [MCP: AI agents use Astra with the user's permissions](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/mcp.md): Astra exposes one MCP endpoint, /mcp, where an AI agent signs in with the same Keycloak token as its human user, so it gets that user's tenant, row-level security and DocType permissions, and personal data is masked… [content: en] - [Rust CDC + Sync-Aware LSN](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/cdc.md): A Rust worker reads PostgreSQL's write-ahead log and keeps replica tables for customer care, every write tells the client its WAL position (X-Tx-LSN), and a replica read that demands that position gets 202 Sync Pending… [content: en] - [Seata: one submit, three resources](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/seata.md): One YAML line, transaction: global, makes submitting an order a single Apache Seata global transaction that spans the BMS credit limit (an AT branch in its own schema), a pickup slot in Redis (a TCC branch) and the… [content: en] - [HRM: attendance and payroll](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/hrm.md): A payroll app that uses only Astra's public SPI and follows the Frappe HRMS model: attendance sets the working days, a tenant's Wasm module computes the courier bonus, one Payroll Entry computes every salary slip in… [content: en] - [STMS: vehicle dispatch with Timefold + AI copilot](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/stms.md): Timefold Solver plans delivery routes inside the Astra kernel and plans them again from the current routes when a vehicle breaks down, an urgent order arrives or traffic slows; a dispatch copilot turns Vietnamese… [content: en] - [Roadmap: the rest of use-case-01](https://zerohost-b69e460a-fdedfaced775e42578cf55c1346b15d0.zhst.app/astra-cms/en/roadmap.md): Videos 1 to 17 and 19 to 21 show thin slices of running code; this video, and this article, list what the courier use case still needs and label every one of those items In development. Read this if: you want to know… [content: en]