Every example is a self-contained application built with the reusable PolyAPI compiler and runtime packages. Keeping application specifications and their generated output here prevents example schemas, migrations, deployment files, and compiled host wiring from becoming part of the core source tree.
| Example | Purpose | Backends |
|---|---|---|
| quote | Typed quote calculation with immutable idempotent Postgres persistence | Go and Python |
| auth | Bearer-session user and organization authentication with adversarial security gates | Go, Python, Rust, Java, and Postgres |
Each example owns:
- one
.polysource file and its checked canonical IR; - a README with behavior, build, run, and API instructions;
- generated language backends, bundle assets, and migrations;
- its host composition code when generated packages are linked at build time;
- Dockerfile, Compose stack, database bootstrap, and runtime dependencies;
- generation and end-to-end scripts;
- any review or verification evidence specific to that application.
Core packages must not assume an example name or use an example as an implicit CLI default. Compiler examples may be used explicitly by tests as conformance fixtures, but application artifacts remain inside their example directory.