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 surface, and how build/deploy work. Read this first.
- Edit → build → deploy workflowStep-by-step workflow for editing a space: read → edit → build → deploy.
- `run_code` API referenceFull `run_code` API reference — every `state.*`, `host.*`, `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 via `config.setAssetConfig`, 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 behind the default-deny egress gateway (`allowEgress` the sibling host).
- SEO & indexingWhen and how to make a production space indexable — a space is deny robots and crawlers until you opt in: with no authored robots.txt the edge synthesizes a deny-all default; an authored public/robots.txt wins. Plus sitemap.xml + Content Signals.
- 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-ready (`__query`)Keep a space admin-ready — the private `__query` hook the platform `/database` console reads. Scaffolded by default; keep it when you write a custom `App`.