Docs
How the platform works, end to end. The same reference your agent reads over MCP.
- Intro & orientationOrientation: the unfolder.space model (one space = one site), the `run_code` file/git surface, and how build/deploy work. Read this first.
- Edit → commit → deploy workflowStep-by-step workflow for editing a space: read → edit → commit → build → preview → deploy.
- `run_code` API referenceFull `run_code` API reference — every `state.*`, `git.*`, `config.*`, `media.*`, `introspect.*` method with a one-line usage example.
- Bundling (createApp)What `@cloudflare/worker-bundler`'s `createApp` accepts — entry point, the `App` class convention, static assets, `_headers` / `_redirects`, npm.
- Deployed worker runtimeWhat's available inside a deployed space worker — capability boundary, App-DO storage, cross-space fetch, read-only SQLite via `introspect`.
- Media (uploads + static)The two stores (workspace vs media), serving precedence, and the `media.*` surface for uploaded/static assets served by URL.
- Multi-spaceWorking with multiple spaces — one space per site, HTTP between them, `_headers` / `_redirects` conventions.
- SEO & indexingWhen and how to make a production space indexable — robots.txt + sitemap.xml (Content Signals). Previews are auto-blocked from indexing.
- Variables, secrets & egressVariables, secrets (owner-set, injected into `env`), and outbound access (a default-deny host allowlist) — secrets and egress are fully decoupled.
- Custom domainAttach a custom hostname (e.g. portfolio.example.com) to a space — CNAME → self.unfolder.space, then the custom-domain tools.
- Admin PrepKeep a space admin-ready — the private `__query` hook the platform `/database` console reads. Scaffolded by default; keep it when you write a custom `App`.