Docs overview
The docs explain how SAPA behaves and how its pieces fit together. For a step-by-step first use, begin with the Guide. For exact exported signatures, use the API reference.
Core topics
Section titled “Core topics”- Mental model — definitions, accepted facts, derived state, and capabilities.
- Architecture — public facade, application contracts, storage, adapters, and composition roots.
- Domain glossary — the exact meaning of SAPA terms.
- Offers and purchases — immutable commercial terms and composable benefits.
- Exact money — minor-unit
bigintvalues and JSON codecs. - Idempotency — retry rules for every durable command.
- Runtime composition — services, Layers, and host-owned adapters.
- Errors and boundaries — validation, typed failures, and safe external handling.
Workflow guides
Section titled “Workflow guides”- Checkout and payments
- Subscriptions and metered billing
- Seats and prepaid credits
- Downloads and licensing
- Access checks and explanations
Build from an example
Section titled “Build from an example”Use recipes for end-to-end product flows, integrations for host boundaries, and use cases for choosing a product shape.
Documentation contract
Section titled “Documentation contract”Narrative pages use public @byfungsi/sapa vocabulary. The generated reference
starts from the package’s single public entrypoint. Internal workspace packages,
storage rows, provider payloads, and deployment implementation details are not
consumer APIs.