Skip to content

Examples overview

These examples are the framework’s verification matrix: 11 independent scenarios, each proving one concrete behaviour with a run.sh. The sub-pages below list the key checks and copyable snippets, so you can verify the same properties in your own project.

  • Test token: scenarios that pass auth need a JWT. Sign one with your project’s auth — see Getting a dev token. The example set also ships a tools/mint HS256 minter, resolving the secret from -secretGORTEXA_AUTH__JWT_SECRETetc/config.yaml.
  • Ports: server scenarios run from :18080 up (each uses a distinct port to avoid clashes), polling /readyz before probing.
  • Cleanup: each scenario tears down its server via trap cleanup EXIT or docker compose stop; all are re-runnable.
  • Dependencies: only the two NATS-family scenarios (core and JetStream) need docker; the rest are pure local binaries.
  • Developer flow: the full scaffold loop, one entity across three protocols.
  • Security & boundaries: auth rejections leak nothing, secret startup safety, the header allowlist, the reflection gate.
  • Contract & resilience: the buf breaking gate, graceful drain on SIGTERM.
  • AI & messaging: export tool schemas, NATS/JetStream integration.
  • Full example: after go get, wire the public packages into a service with a complete, annotated main.go.
  1. Developer flow — walk the full development loop once.
  2. See one proto become three protocols.
  3. Security & boundaries — the error model and interceptor chain under adversarial input.