Deployment overview
SAPA 0.1.0 is an Effect-native library with an official Cloudflare reference
deployment in this repository. There is no hosted SAPA SaaS, and installing the npm
package alone does not create a server.
Support matrix
Section titled “Support matrix”| Model | Status in 0.1.x | What you receive |
|---|---|---|
Pure definitions and validation from @byfungsi/sapa | Supported | Browser-safe Schemas and resource-free Effect programs |
| Embedded durable workflows | Framework contract | Requires host-supplied concrete capability Layers |
| Cloudflare reference deployment from source | Official reference | Worker, D1, Queues, Workflows, R2, Access, assets, providers, and email |
| Hosted SAPA service | Not available | No SAPA-operated multi-tenant endpoint exists |
| Complete merchant-facing HTTP API | Not available | Production contracts and authentication are not yet defined |
| Other infrastructure targets | Custom | Implement and verify every required capability contract |
How an application uses SAPA today
Section titled “How an application uses SAPA today”flowchart LR accTitle: Embedded SAPA deployment model accDescr: A merchant application imports the SAPA package and owns a composition root that provides storage and external provider capabilities to an Effect runtime. App["Merchant application"] -->|"imports"| Package["@byfungsi/sapa"] App --> Composition["Merchant-owned composition root"] Package --> Composition Composition --> Runtime["Effect runtime with concrete Layers"] Runtime --> Storage["Authoritative storage"] Runtime --> Providers["Payments, email, crypto, and downloads"]
Pure offer construction and validation need no infrastructure. Durable checkout,
payments, subscriptions, access, metering, seats, credits, downloads, and licensing
require the capability Layers inferred by Sapa.layer or a configured Sapa
constructor.
The repository’s Cloudflare composition is currently single-installation-oriented:
one stable SAPA_INSTALLATION_ID identifies the installation for its lifetime.
Do not treat the dashboard as a public API
Section titled “Do not treat the dashboard as a public API”The reference Worker exposes operator reads protected by Cloudflare Access, a signed
customer-action checkout route, and extensive sandbox-only automation routes. It
does not expose a complete production merchant API for offer registration,
general checkout creation, usage recording, seats, credits, licensing, or access
checks. Do not couple an application to /api/admin/* or /api/sandbox/* as if they
were public commerce contracts.
Continue with self-hosting, the Cloudflare reference deployment, or runtime composition.