Skip to content
Built with

Build & Deploy ​

Build & Deploy

Everything between npm ci and a live site: building implemented.stream itself, and building and deploying your own SDK apps.

What this zone covers ​

  • Building, testing and deploying this docs site.
  • The SDK features you use while building: routing, data, auth, jobs, email and edge rules.
  • Running the self-hosted deploy platform in your own Cloudflare account.

Build and ship this docs site ​

These five commands build and ship implemented.stream itself. Building your own site? Follow the 9-step track instead.

  1. Install the dependencies. This step uses the lockfile for a clean install.

    bash
    npm ci

    Example output: npm reports the number of packages added and exits without errors.

  2. Start the local dev server. This step lets you preview the site in a browser.

    bash
    npm run dev

    Example output: VitePress prints a local URL to open.

  3. Build the site. This step checks that every page compiles and every link resolves.

    bash
    npm run build

    Example output: the build completes with no dead-link errors.

  4. Test in 2–3 rounds: build, link scan, then a desktop and mobile check. See Build this site.

  5. Deploy only with the owner's approval. See Deploy your app and Production.

Safe deploys

Do not deploy from an untested branch. Production deploys need the owner's approval. Keep secrets out of code, templates and zips.

Find your topic ​

GroupCovers
This siteBuild this site, Production
Routing & RenderingServer routes, Pages, SSR, SSG
DataDatabase, KV, Object storage, Durable state
Backend featuresAuth, Jobs, Queues, Email, AI
Deploy & teamsDeployment, Remote development, Collaboration
Self-hosted platformOverview, Administration, Development

Every page in this zone ​

Show all 68 pages, in sidebar reading order
PageWhat it is for
Self-hosted platformAn SDK platform lets your team deploy apps into a shared Cloudflare account.
PrerequisitesWhat you need before installing the platform: Cloudflare features, accounts and local tools.
CredentialsKeep one password-manager entry for this platform. Paste the saved values into the installer when asked; most do not need shell environment variables.
Install and configure loginPress Enter to accept a suggested zone or display name, or type to replace it.
First deploymentOpen your platform's API URL in a browser to see its welcome page, CLI connection instructions, and a link to the administrator dashboard.
Domains and resourcesConnect your domain to the platform: zone, DNS and routing are set up in one command.
Maintenance and recoveryRun void platform list to find the installation slug beside its name.
Install from CIFor your first installation, follow the interactive setup. Use this page when automating a configured installation.
Disable and uninstallPause a platform without losing data, or remove it completely when you no longer need it.
Platform administrationvoid platform lets you manage the people and apps on an SDK platform from your terminal.
Sign-in and accessFor the browser admin UI, open <API URL>/admin and use the administrator login method selected during setup.
Connected appsA connected app is a separate application registered as an OAuth client on your SDK installation.
Users and projectsFind users and projects on your platform, inspect them, and change ownership, plans or status.
Plans and limitsPlans define the resource limits you assign to accounts on your platform.
Project Zero TrustProject Zero Trust puts Cloudflare Access in front of the hostnames of projects deployed to your platform, including custom domains.
EmailThese commands apply to a platform that enables email.
OperationsCommands that change the platform show the affected objects before asking for confirmation.
Developing an SDK platformThe framework, CLI, and platform live in one repository. You can change the platform, test it locally, and deploy a runtime built from your fork into your own Cloudflare account.
Local developmentRun the platform from a local checkout: clone, install with Vite+, and start the dev stack.
Runtime and source buildsBuild and publish the platform runtime from source, with the commit recorded in its manifest.
Schema and CIThe schema lives in platform/packages/api/src/schema.ts.
Build this siteInstall, build, test and deploy implemented.stream from the agensdklab/devstacks repo.
Deploymentvoid deploy builds your app, provisions resources, applies migrations, and deploys it. Choose your own Cloudflare account or an SDK platform run by your team.
ProductionLive URLs, the Cloudflare Worker behind implemented.stream, and what to check after a deploy.
Remote developmentThe SDK normally uses local D1, KV, and R2 through Miniflare.
Project CollaborationA project hosted on an SDK platform can have one owner and additional readers, collaborators, and project administrators.
Server routingCreate a file in routes/ to add an endpoint, and export a handler for each HTTP method you want to support. The SDK uses Hono for routing and middleware.
Pages routingPut UI components in pages/ to make them routes.
Layouts and shared dataUse layouts for navigation, headers, and other UI shared by several pages. Layouts nest with your directories and keep their component state as you navigate.
Loaders and propsA loader fetches the data a page needs. Define it in a companion .server.ts file using the same defineHandler API as server routes.
Actions and formsUse an action to change server data from a form or button.
View transitionsAdd animated page transitions with the browser’s View Transition API. Pages cross-fade by default; use CSS to customize the animation.
Head managementSet page titles and metadata with head(), middleware, or site-wide defaults. Page values take precedence over middleware and config.
IslandsIslands let you add interactive components to an otherwise static page.
MarkdownAdd .md files to pages/ for Markdown routes. Pages inherit layouts and render as HTML, with JavaScript only for islands, client scripts, and code-copy buttons.
Static asset cachingThe SDK caches static assets on Cloudflare's edge network. Hashed build files can be reused across deploys, while other files use cache keys tied to the deployment.
Revalidation (ISR)Revalidation caches rendered pages and refreshes them in the background. When a cached page becomes stale, visitors can keep reading it while the Worker renders an updated version.
Edge prerenderingPrerender pages at deploy time so the first visitor receives cached HTML.
Custom headersDefine custom response headers in void.config.ts using the routing.headers field. Keys are URL patterns, values are arrays of 'Name: value' strings.
RedirectsDefine URL redirects in void.config.ts using the routing.redirects field. Keys are source URL patterns, values are destination strings or objects with an explicit status.
RewritesA rewrite serves a route at a different URL without changing the browser's address.
Custom SSRUse custom SSR to choose your own router, data loading, HTML shell, and hydration code. If you want the SDK to handle these for you, use Pages Routing.
Static site generation (SSG)Prerender every page to static HTML at build time with output: 'static', and deploy the result anywhere.
Type SafetyThe SDK infers types from your database schema, route handlers, and page loaders. When you change a field, TypeScript shows which queries, requests, and components need to change.
DatabaseDefine your tables in TypeScript, then query them with db from void/db.
D1 (SQLite)Cloudflare D1 is the SDK's default SQLite database. Start with a schema; the SDK manages the database locally and when you deploy.
PostgreSQLConnect your PostgreSQL database through Cloudflare Hyperdrive, then use the same Drizzle schema and query workflow as D1.
MySQLConnect your MySQL database through Cloudflare Hyperdrive, then define tables and query them with Drizzle.
Typed FetchImport fetch from void/client for route autocomplete, checked request bodies, and inferred response types.
Key-value storageRead and write data in Cloudflare Workers KV with kv from void/kv. Values are stored as JSON, and kv.map() gives a collection its own key prefix and value type.
Object storageStore files in Cloudflare R2 with storage from void/storage. It gives you the typed R2 API for uploads, downloads, and metadata.
Durable stateUse a Durable Object when requests need to share state under one name, such as a shopping cart, room, or rate limiter.
Environment variablesDeclare your environment variables in env.ts, then read them through env from void/env. Use .env for local values and void secret put for production server values.
AuthenticationThe SDK configures Better Auth for your app, including its database connection, API routes, and client. Start with email and password, or add a social login provider.
AIRun Workers AI models and provider APIs from server code with ai from void/ai. Provider requests use Cloudflare's AI Gateway.
EmailUse the SDK to send transactional email, receive messages in route handlers, and test outgoing mail in a local inbox.
Sending EmailUse sendEmail to send transactional email. During development, the SDK captures messages in a local inbox.
Receiving EmailReceive mail with handlers in the top-level email/ directory. Inbound handlers require a native SDK app; framework and Node.js, Bun, or Deno builds do not support them.
Email Domains and SetupChoose the setup for your deployment: register a domain on an SDK platform, or configure email in your own Cloudflare account.
SandboxesUse a Cloudflare Sandbox to run commands, work with files, and connect to servers from server code. Each Sandbox ID selects an isolated container.
Cron jobsPut scheduled jobs in crons/. Each file declares a cron expression and a handler, and the SDK configures the schedule when you deploy.
QueuesUse queues to process work asynchronously, such as sending emails or handling uploads. Define a consumer in queues/, then send it typed messages from your app.
WebSocketsCreate a .ws.ts route to send typed messages between your server and connected clients.
Server-sent eventsUse void/sse to stream events from a route handler to the browser. The SDK formats messages, sends keepalives, and closes the stream when the request ends.
Live event streamsvoid/live lets a browser subscribe to several topics over one SSE connection.
How tools are builtWhere each on-site tool lives in the repo, and the checklist for adding a new one.
Cursor and agentsHow this repo uses Cursor cloud agents and Bugbot, and how secrets are handled.
Related sitesimplemented.stream and devstack.bid are separate products with separate repos and deploys.

Next steps ​

implemented.stream AI