Mantle handbook
Mantle turns YAML manifests into a validated runtime plan, typed TypeScript bindings, and optional HTTP, MCP and Admin surfaces. Your application owns the host, storage and frontend. Four atoms describe the contract: Schema stores data, View reads it, Procedure acts on it, and Trigger binds an action to HTTP, MCP or lifecycle events.
This handbook describes the SDK snapshot that carries it. For an installed project, read node_modules/@aotter/mantle/docs/handbook/; a website or Git branch can describe a different version. The release index links published releases. A prerelease capability is not a promise that the current npm latest contains it.
Start with your integration
| Goal | Start here | Result |
|---|---|---|
| Understand what manifests can express | Manifest feature reference | A capability-to-field map across the four atoms. |
| Validate manifests in an existing tool | Spec-only adoption | Parse and link without Runtime, storage or a UI. |
| Bring Mantle into an existing application | Integration skill | Inspect the app and choose embedding, incremental replacement or rebuilding with data migration. |
| Embed Runtime in an existing host | Runtime and adapters, then typed queries | Bind your storage and call the generated API. |
| Build a local Cloudflare API | Minimal Worker tutorial | A running public View and a verified HTTP response. |
| Add a staff console | Local Admin tutorial | Email OTP, Admin assets and a local human workflow. |
| Build on ChatGPT Sites | Sites integration | Host-owned sign-in and deployment with Mantle content. |
| Work through a coding agent | Skill installation and handoff | Bootstrap skill, pinned package, then project-local instructions. |
Human authors can follow these pages directly; installing an agent skill is optional. For a new app, install an exact SDK version and run mantle generate --host cf or --host chatgpt-sites. The CLI assembles a blank site by default; add your own Manifests after generation. Use explicit --features for a smaller composition, including host-free Spec-only.
Find the right kind of documentation
- Tutorials walk through a running minimal service or local Admin.
- Task guides explain typed queries, Admin customization and agent setup.
- Concepts explain the four atoms, runtime, lifecycle, authorization and transports.
- Reference lists accepted fields, defaults, restrictions and diagnostics.
- Host guides cover Cloudflare and Sites wiring and operations.
- Examples supply complete domain manifests and runnable host references.
The project and CLI guide describes file ownership and the verification loop. The examples hub helps select a domain model. Use the field reference when checking exact syntax; do not infer grammar from a UI screenshot.