Application flow
This guide shows the Axonyx app loop in the order you actually use it: install tools, create a project, edit pages, inspect contracts, and run.
1. Install the tools
`create-axonyx` creates new projects. `cargo-axonyx` adds the `cargo ax ...` commands used while developing.
cargo install create-axonyx --version 0.2.16
cargo install cargo-axonyx --version 0.2.16
cargo install axonyx-aegis --version 0.1.8 --force2. Create a site
The site template is the safest starting point because it already wires routes, assets, Foundry UI, and the Axonyx runtime.
create-axonyx my-site --yes --template site
cd my-site3. Know the core files
app/layout.asx
Shared head, stylesheet links, header, shell, and root slot.
app/page.asx
The home route. Nested folders with `page.asx` become routes.
Axonyx.toml
App config for runtime, generated output, UI entry, and content collections.
public/
Static assets such as CSS, images, icons, and small JS helpers.
app/error.asx
Global render fallback. Nested `app/**/error.asx` files can override a route subtree.
app/not-found.asx
Global 404 boundary. Nested `app/**/not-found.asx` files keep missing pages branded per section.
4. Check the app
`cargo ax check` validates Axonyx files before you build or deploy. `doctor` adds package/config checks and can fail CI when warnings exist.
cargo ax check
cargo ax doctor --deny-warnings5. Inspect routes and contracts
These commands make the app discoverable for humans and tooling. They are the early Axonyx equivalent of "show me what this app exposes".
cargo ax routes
cargo ax api
cargo ax api --schema
cargo ax actions
cargo ax actions --schema6. Run locally
`cargo ax run dev` starts the local server. Keep `.asx` pages small, move data into loaders/actions, and use Foundry components for layout.
cargo ax run dev7. Deploy
Hosted starts use `cargo ax run start`. On Render, pass the platform port through `$PORT`.
cargo install cargo-axonyx --version 0.2.16 --force && cargo ax build --clean
cargo ax run start --host 0.0.0.0 --port $PORT8. Run fast QA
New Axonyx templates include `aegis.toml`. With the dev server running, `cargo ax test` delegates route checks to Aegis.
cargo ax test
cargo ax test --format json --fail-fast false