Examples

[ AxiomCore · Documentation ]

Examples

Runnable AxiomCore examples, what each one shows, its status, and the git commands to get its source.

Each example is a small project you can run to see one AxiomCore path end to end. The examples use synthetic local data. They are learning fixtures, not production templates.

Pick an example by where you are starting
Pick an example by where you are starting
Diagram source
flowchart TD
  S{Existing backend?}
  S -->|FastAPI| FW[fastapi-web]
  S -->|Go| GW[go-web]
  S -->|None| A{What to run?}
  A -->|A complete app| T[task-app]
  T --> E[exam-app]
  A -->|One endpoint| H[hello-api]
  H --> M[managed-title]

If you already run FastAPI or Go, start with the matching existing-stack example. Otherwise start with task-app for a complete Acore application and continue with exam-app, or start with hello-api for a single endpoint and continue with managed-title.

Get the source

The documentation examples live in the public AxiomCore repository. A shallow clone is about 6 MB:

Terminal
git clone --depth 1 https://github.com/AxiomCore/AxiomCore.git
cd AxiomCore/examples/documentation/task-app

Replace task-app with the directory from the table below. Each directory has a README with its own setup and cleanup steps.

Documentation examples

Status is the most restrictive label among the capabilities an example uses (see Support and availability).

DirectoryWhat it showsStatusPortsGuide
task-appAcore UI and API, form validation, typed errors, SQLite create, update, deleteExperimental: managed actions and SQLite persistence; Acore UI is Alpha8080, 5173Task app
exam-appAcore UI and API, server-side grading, persisted resultsExperimental: managed actions and SQLite persistence; Acore UI is Alpha8082, 5174Exam app
hello-apiOne Acore endpoint that returns a JSON greetingExperimental: managed action8081Build your first API
managed-titleAcore input normalization and a typed 422 failureExperimental: managed logic and typed failures8085Backend declarations
fastapi-webAn existing FastAPI service called from an atmx-web browser clientAvailable8083, 5175FastAPI
go-webAn existing Go service on Chi called from an atmx-web browser clientAlpha: Go extraction8084, 5176Go

Requirements: Axiom CLI 0.149.1 on macOS arm64. The Acore UI examples also need web UI host 0.6.12. The existing-stack examples need their backend extractor and pin their client generator and runtime versions. For patterns beyond these apps, read Advanced patterns (Experimental).

Capability fixtures

The separate AxiomCore/examples repository holds smaller fixtures that each test one boundary:

Terminal
git clone --depth 1 https://github.com/AxiomCore/examples.git
cd examples/domain-commerce
DirectoryCapabilityNeedsStatusPrimary check
domain-commerceDomain entities, relationships, invariants, projections, and an audience-visible projection changeAxiom CLIAlphaaxiom domain validate commerce-v1.acore
domain-supportA compact domain model with an audience projectionAxiom CLIAlphaaxiom domain validate support-v1.acore
domain-inference-fastapiFastAPI and Pydantic extraction with explicit domain promotionFastAPI extractorAlphaaxiom domain validate axiom.acore
security-mode-v1A passing audit baseline and an intentionally rejected strict inputAxiom CLIAlphaaxiom security check axiom.acore
simple-backendFastAPI and Go services with web, React and Flutter consumersThe chosen backend and frontend toolchainsAvailable to Alpha, by pathValidate the backend and the consumer separately
offline-first-feedA cached feed with online and offline consumer statesBackend and web toolchainsExperimental: cachingBuild the contract, then exercise online and offline states
realtime-chatA Go streaming service with web, React and Flutter consumersGo and the chosen frontend toolchainExperimental: streamsBuild, then test connect, message, error, reconnect and dispose

The rpc, stream and observability-and-auth directories are lower-level runtime fixtures for maintainers. The repository README also lists UI galleries, demos and extension samples.

Validate a fixture

From the domain-commerce directory:

examples/domain-commerce
axiom domain validate commerce-v1.acore
axiom diff commerce-v1.acore commerce-v2.acore --format semantic
Expected output
✅ Domain Model v1 valid · 2 entities · 1 relationships · 2 projections
   Manifest: "ab07fcf7185f6cdf4ecaa803493d0cc5b3140d87461abad8e7573dd0aedd4213"
Semantic State Changes:

- $.domain.projections.publicCustomer.fields[1]
~ $.project.version : "v1.0.0" -> "v1.1.0"
+ $.models.Customer.fields.loyaltyTier = {"isOptional":true,"name":"loyaltyTier","typeRef":{"kind"...

The - line is the removed projection field. The diff reports it as a path change but does not classify it as breaking, so you must treat it as a consumer-breaking change in review.

From the security-mode-v1 directory:

examples/security-mode-v1
axiom security check axiom.acore
axiom security check axiom.unsafe.acore
Expected output
Security Mode audit · 0 error(s), 0 warning(s) · 3 of 3 endpoints covered (2 direct, 1 default-policy)
Security Mode strict · 1 error(s), 0 warning(s) · 0 of 1 endpoints covered (0 direct, 0 default-policy)
AXSEC-001 ERROR [GetNote] `GetNote` is externally reachable but has no explicit public declaration or authorization policy.
  → Declare `security.endpoints[endpoint]` as public or bind it to a user-defined policy.
Error: security check found 1 error(s) and 0 warning(s)

The safe input passes. The unsafe input exits with a non-zero status and AXSEC-001.

Example safety rules

Examples use relative paths, synthetic data and visibly non-production placeholder values. They never contain a home-directory path, token, private key, telemetry DSN, cookie, sandbox key or production endpoint. When an example depends on an Alpha or Experimental surface, its README states the runtime and dependency boundary.

Next steps