stackless-core 0.2.1

Definition model, state store, and lifecycle engine for stackless
Documentation
# stackless.toml — lives in any repo (the stranger test: this file is enough)

[stack]
name = "atto"

[stack.render]
region = "oregon"

[stack.projects.stripe]
# Recorded after the first `up` provisions hosted integrations/cloud resources.
project = "project_61UqVKJia4fs..."

[stack.verify]
# The proof contract, run by `stackless verify` (§7).
run = "bun e2e/smoke.ts"
env = { ATTO_STACKLESS = "1", ATTO_E2E_WEB_ORIGIN = "${services.web.origin}", ATTO_E2E_API_ORIGIN = "${services.api.origin}", ATTO_E2E_TENANT_SLUG = "${instance.name}", CLERK_SECRET_KEY = "${integrations.clerk.secret_key}", VITE_CLERK_PUBLISHABLE_KEY = "${integrations.clerk.publishable_key}" }

[secrets]
# v0 posture (§0): operator-visible, test-scoped. Resolved from the stack's
# Stripe Projects vault pull, with a local env-file override for
# hand-managed keys.
required = ["GITHUB_PACKAGES_TOKEN"]

[integrations.clerk]
provider = "clerk"

app_name       = "${stack.name}-${instance.name}"
credential_set = "development"
organizations  = true

# ── services: identity + wiring + health, substrate run config nested ──

[services.api]
source  = { repo = "https://github.com/haaku-co/atto-server", ref = "main" }
setup   = "mise install"                                                                                                                                                  # once, after materialization
prepare = "just migrate-run && just seed"                                                                                                                                 # every up, deps ready → before start
env     = { CORS_ALLOWED_ORIGINS = "${services.web.origin}", TENANT_SLUG = "${instance.name}", CLERK_SECRET_KEY = "${integrations.clerk.secret_key}", RUST_LOG = "info" }
health  = { path = "/health", contains = "ok" }                                                                                                                           # status defaults to 200

[services.api.local]
run = "cargo run" # $PORT injected; runs in the materialized source dir

[services.api.render]
runtime = "rust"
build   = "cargo build --release"
start   = "./target/release/atto-server"
env     = { SQLX_OFFLINE = "true", RUSTUP_TOOLCHAIN = "1.94.0" } # overlays the common env

[services.web]
source      = { repo = "https://github.com/haaku-co/atto-web", ref = "main" }
setup       = "mise install && bun install"
root_origin = true                                                                                                                 # also claims http://{instance}.localhost (§3)
env         = { VITE_API_ORIGIN = "${services.api.origin}", VITE_CLERK_PUBLISHABLE_KEY = "${integrations.clerk.publishable_key}" }
health      = { path = "/", contains = 'id="root"' }                                                                               # the SPA shell check, productized

[services.web.local]
run = "bunx vite --host 127.0.0.1 --port $PORT --strictPort"

[services.web.render]
static = { build = "bun install && bun run build", publish = "./dist", spa_rewrite = true }
env    = { BUN_VERSION = "1.3.11", GITHUB_PACKAGES_TOKEN = "${secrets.GITHUB_PACKAGES_TOKEN}" }