This document defines how Origin composes at build time, at runtime, and across environments.
ui/: presentation, routing, plugin mounting, and host-adapter composition.shared/: reusable primitives and governed data-access helpers.platform/: runtime abstraction layer, SDKs, wasmCloud bindings, and delivery metadata.services/: backend service components.workflows/: orchestration components for cross-service flows.schemas/: contracts, events, WIT packages, and schema definitions.infrastructure/: manifests and provider configuration for AWS and Cloudflare deployment.
- Presentation:
ui/ - Platform/runtime mediation:
platform/ - Orchestration:
workflows/ - Execution:
services/ - Contract boundary:
schemas/ - Deployment and ingress:
infrastructure/
- User interaction enters synchronously through the
ui/shell. - The shell calls typed platform APIs synchronously or through request/response boundaries.
- Cross-service coordination prefers asynchronous event-driven execution through contracts from
schemas/events. - Backend execution is cloud-hosted on AWS in wasmCloud/Wasmtime runtime environments.
- Public ingress, routing, DNS, and edge/network mediation are handled by Cloudflare.
- The PWA runs locally in the browser as the baseline host; the Tauri desktop host extends the same platform surface with additional local capabilities.
- A user interacts with the Leptos/WebAssembly shell.
- The shell resolves the active plugin module and invokes typed platform interfaces.
platform/routes requests across host boundaries and published service/workflow contracts.shared/governed-storageis the only approved runtime gateway for durable SurrealDB access and loads its connection contract fromORIGIN_SURREALDB_ENDPOINT,ORIGIN_SURREALDB_USERNAME,ORIGIN_SURREALDB_PASSWORD,ORIGIN_SURREALDB_NAMESPACE, andORIGIN_SURREALDB_DATABASE.- wasmCloud services and workflows execute backend behavior on AWS-hosted runtime infrastructure.
- Cloudflare mediates public network ingress and routing to AWS-hosted workloads.
- Environment promotion uses digest-pinned manifests and release artifacts rather than rebuilds.
- Direct SurrealDB client usage remains isolated to
shared/surrealdb-access. - Runtime consumers use
shared/governed-storage::connect_from_env()orshared/governed-storage::connect_durable(...); tests and local harnesses may continue usingconnect_in_memory(). - The supported durable runtime path is a WebSocket connection to a host-installed SurrealDB
service, typically
ws://127.0.0.1:8000for local and Pulumi-provisioned hosts. - Namespace and database selection remain explicit even when callers accept the repository defaults
of
short_originandinstitutional. - Connection or credential misconfiguration is treated as a configuration failure before services enter normal repository operations.
- Local development: workspace tooling, browser/PWA shell, optional local wasmCloud lattice.
dev: automatic promotion from a green merge tomain.stage: release-candidate deployment of a selectedmainSHA.production: final promotion of already-published digests without rebuild.
Release flow:
- Merge to
mainafter required checks pass. Delivery Devpublishes immutable component descriptors and promotesdev.Release Candidaterebuilds and verifies a selectedmainSHA, deploysstage, and emits release artifacts.Promote Releaseretags the already-published digests, renders the production manifest, and deploysproduction.
Rollback expectation:
- redeploy a prior digest-pinned manifest and OCI references;
- do not rebuild a new artifact as the first rollback action.
The current production manifest artifact path remains infrastructure/wasmcloud/manifests/prod/.
Contributor-facing documentation refers to the same environment as production.