Skip to content

Comments

feat: deployment installer#6

Merged
butttons merged 18 commits intomainfrom
feat/installer
Feb 22, 2026
Merged

feat: deployment installer#6
butttons merged 18 commits intomainfrom
feat/installer

Conversation

@butttons
Copy link
Owner

Summary

Add an installer worker at install.residue.dev that automates the full deployment flow: D1 database, R2 bucket, S3 API credentials, AI Search instance, secrets, and worker deploy. Includes an update page for existing deployments.

Changes

Installer

  • Provisioning logic: Create D1 database, R2 bucket, S3 API token, AI Search instance, set secrets, deploy worker
  • Install page: Step-by-step UI with progress indicators, copy buttons, and error handling
  • Update page: Re-deploy existing workers to latest version
  • AI Search provisioning: Auto-create and configure AI Search instance with path filters
  • Build: Vite-built client JS, Tailwind CSS, git SHA injected at deploy time
  • Asset handling: Static assets served via worker, custom domain support

Docs

  • Landing page: Simplify quick start to 3 steps (API token, installer, CLI setup)
  • Getting started: Add installer as Option A (recommended) with amber-bordered callout, shift Deploy to CF to Option B, Manual to Option C
  • Skip callouts: Steps 1 and 3 note that installer users can skip them
  • README: Add installer to architecture section, Option A in step 2, update mention after step 5

Tests

No test changes. Installer is a new package, docs are content-only.

- package.json, tsconfig, wrangler config
- types for provisioning flow
- cloudflare API client library
- cloudflare API client (cfFetch, cfFetchRaw)
- 8-step provision: verify, D1, migrate, R2, R2 token, deploy, secrets, route
- update flow: lookup existing bindings, re-migrate, redeploy
- embedded.ts placeholders for build-time injection
- POST /api/provision, POST /api/update, GET /api/status
- SSR JSX page with install/update mode toggle
- form: token, account ID, worker name, admin creds
- progress indicator and result display with copy-to-clipboard
- inline CSS (dark mode, monospace, zinc palette)
- inline JS for form handling, no framework
- Load worker bundle, migrations, and static assets from public/ via ASSETS binding at runtime
- Add deploy.ts with Cloudflare asset upload session flow for deploying workers with static assets
- Make D1/R2 creation idempotent, run migrations statement-by-statement
- R2 S3 API expects SHA-256 hash of the API token value as the secret
  key, not the raw token value
- Was causing SignatureDoesNotMatch on presigned URL PUT requests
- Non-sensitive vars as plain_text bindings, secrets for sensitive only
- Add install.residue.dev custom domain
- Open-source transparency line in header
- Per-row copy buttons for credentials and login command
- Spin animation on circle-notch progress icons
- Footer commit hash links to GitHub commit
- Create service token, register with AI Search, create instance with path filters
- Non-fatal: skips gracefully if permissions missing or instance exists
- Add AI Search Edit permission to required token permissions
- Add install.residue.dev as Option A in README and docs getting started
- Simplify landing page quick start to 3 steps (token, installer, CLI)
- Add skip callouts for steps 1 and 3 when using the installer
@butttons butttons changed the title v0.0.9: deployment installer feat: deployment installer Feb 22, 2026
@butttons butttons merged commit 99f6e4b into main Feb 22, 2026
2 checks passed
@butttons butttons deleted the feat/installer branch February 22, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant