docs(compute): Deploy Button page and generator (repository-url) - #8116
docs(compute): Deploy Button page and generator (repository-url)#8116ankur-arch wants to merge 5 commits into
Conversation
Adds a Deploy Button reference page under Compute integrations: what the button does, supported templates, URL format with attribution parameters, troubleshooting, and copy-paste Markdown/HTML snippets. Includes an interactive generator component and a hosted "Deploy with Prisma" SVG badge for third-party READMEs to hot-link. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🍈 Lychee Link Check Report15 links: ✅ All links are working!Full Statistics Table
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
|
Closing this. The Deploy Button contract changed to repository-url (Vercel parity) instead of template IDs, so the docs page and generator need a different shape. See the revised spec in pdp-control-plane projects/templates-deploy-button/spec.md. |
The button's contract is now a repository URL: any public GitHub repository with a root prisma.compute.json, a package.json, and a lockfile is deployable — no registration or catalog entry. The page documents the minimal repository contract and the /new/clone?repository-url=… format, and the generator takes a repository URL plus optional project-name and attribution. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- prisma.compute.json example uses the real schema (app.httpPort, not top-level name/port — the old example failed validation verbatim). - Document the validation limits (file count/size caps, no workflows, no symlinks/submodules, single-app, region key rejected). - Match the Console's actual copy for the name-conflict error, the 15-minute authorization window, commit display and pinning behavior, the workspace picker, and the private-by-default visibility. - Qualify push-to-recover advice by whether the project was created. - Generator: project-name field shows its own validation hint, copy buttons get distinct accessible names, HTML snippet escapes ampersands in the href. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
574175e to
8619b8b
Compare
- Fix the main button: a literal anchor + img instead of the markdown image, which the docs pipeline wrapped in ImageZoom and made unclickable - Remove the early-access note - Document the env / env-example-<NAME> URL parameters and add an Environment variables section (names in the URL, values prompted in Console, DATABASE_URL provisioned automatically) - Generator: rows for required env-var names + safe example values, emitted on the URL, Markdown, and HTML outputs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What this PR enables
A Deploy Button reference page for Prisma Compute (
/docs/compute/deploy-button), matching Vercel's Deploy Button experience: developers generate a "Deploy with Prisma" button for their own public GitHub repository and embed it in READMEs, blog posts, or websites. One click takes a user through the Console flow that copies the repository into their own GitHub account, provisions a Prisma Postgres database, collects any required environment variables, and starts the first deployment.The documented contract (matches Console PR #4770 exactly)
A deployable repository needs: a root
package.json, a supported lockfile (bun.lock,package-lock.json,pnpm-lock.yaml,yarn.lock), a rootprisma.compute.jsondescribing a single app with no pinned region, and a runnable TypeScript application listening on the declaredhttpPort. The page states all of this under "Make your repository deployable".What changed (latest revision)
ImageZoom— clicking it opened a zoom lightbox instead of navigating. It is now a literal anchor +img, verified clickable in a rendered page (href resolves to the Console clone URL, badge served from/docs/img/deploy-button.svg).env/env-example-<NAME>on all three outputs (URL, Markdown, HTML). Names are validated client-side with the same rules as the Console ([A-Z_][A-Z0-9_]*, ≤10).DATABASE_URL/DATABASE_URL_POOLEDare provisioned automatically (shown as "Added automatically", never prompted).How to test it
pnpm --filter docs types:check,pnpm --filter docs lint:links,pnpm --filter docs lint:spellcheckall pass; changed files are Prettier-clean.pnpm --filter docs dev, openhttp://localhost:3001/docs/compute/deploy-button: the hero button is a plain link (no zoom), the generator validates the repository URL and env-var names, and the copy buttons produce URL/Markdown/HTML snippets carrying the env parameters. Verified with Playwright against the rendered page.ankur-arch/deploy-button-e2eis a throwaway public repository built to this page's contract (requiredWELCOME_MESSAGEvariable, README with all three button formats generated by this page's rules).What must happen before merging
/new/clone, the env-var handling, and the sign-in deep link).ankur-arch/deploy-button-e2ebutton on a venus-flagged account reaches a successful Compute deployment (the push → webhook → build-runner leg has no automated gate).prisma/compute-deploy-example) README carries a working button.Risks, limitations, and rollback
/docs/img/deploy-button.svg) becomes a long-lived contract once third parties embed it — the path must not move after launch.redirect-url.🤖 Generated with Claude Code