Skip to content

docs(compute): Deploy Button page and generator (repository-url) - #8116

Draft
ankur-arch wants to merge 3 commits into
mainfrom
feat/compute-deploy-button-docs
Draft

docs(compute): Deploy Button page and generator (repository-url)#8116
ankur-arch wants to merge 3 commits into
mainfrom
feat/compute-deploy-button-docs

Conversation

@ankur-arch

@ankur-arch ankur-arch commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

⚠️ Hold — do not merge yet. This page documents a Console capability that is not generally available. Merge during the launch window, once the templates flow is enabled for all accounts.

What this PR enables

A Deploy Button reference page for Prisma Compute (/docs/compute/deploy-button), inspired by Vercel's Deploy Button docs: developers can 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, and starts the first deployment. The contract mirrors Vercel's (…/new/clone?repository-url=…): any public TypeScript repository with a root prisma.compute.json, a package.json, and a lockfile is deployable — no registration or catalog entry.

Why it is needed

The Console templates flow has no public documentation or shareable embed. A documented button + generator is the standard way (cf. Vercel, Netlify, Railway) to let template authors and Prisma surfaces funnel developers into a one-click deployment.

What changed

  • content/docs/compute/deploy-button.mdx — the page: what the button does, the minimal repository contract ("make your repository deployable"), how it works, requirements, URL format (repository-url + optional project-name + utm_*), a generator, complete Markdown/HTML snippets, troubleshooting. Added to the Compute nav under Integrations, after GitHub.
  • src/components/deploy-button-generator.tsx — a client component (repository URL input with client-side validation mirroring the Console's parser, plus optional project-name and attribution → URL, Markdown, and HTML outputs with copy buttons and a live preview). Registered in mdx-components.tsx.
  • public/img/deploy-button.svg — the hosted "Deploy with Prisma" badge, served at https://www.prisma.io/docs/img/deploy-button.svg so third-party READMEs can hot-link it.

How it works

The button is a plain link to https://console.prisma.io/new/clone?repository-url=… with optional project-name and utm_* parameters; the generator only assembles and encodes that URL client-side. The badge is a static SVG. No new APIs, data collection, or configuration.

Dependencies on other work

The Console side (deep links surviving sign-in, deploy analytics) ships separately and must be deployed first. The page's target URLs already resolve for accounts with template access.

What must happen before merging

  1. The Console clone flow is enabled for all accounts (or the early-access note is still accurate at merge time — it is written to be safe either way).
  2. The Console /new/clone route and deep-link change are deployed, so button links resolve and signed-out clicks return to the clone page after sign-in.
  3. The referenced minimal example repository (prisma/compute-deploy-example) exists publicly with a working button in its README.
  4. Docs review for tone/IA.

When the PR should be merged or deployed

Held until the launch window for the templates feature. Merging earlier would document a flow most readers cannot complete; the page carries an early-access note as a safety net, but launch-window merge is the intent.

How to test it

  • pnpm check, pnpm --filter docs types:check, and pnpm lint:links all pass.
  • pnpm --filter docs dev, then open http://localhost:3001/docs/compute/deploy-button: the page renders with the nav entry under Integrations; the generator updates URL/Markdown/HTML live, validates the repository URL (public GitHub owner/repo shapes only), and the copy buttons work; the badge preview links to the Console.
  • Verified rendered locally (full-page render checked: nav entry, badge, generator inputs/outputs, copy buttons, troubleshooting sections).

Risks, limitations, and rollback steps

  • Content-only change; no runtime risk to other pages. The generator is self-contained and renders nothing from user input as HTML (text snippets only).
  • The badge URL becomes a long-lived contract once third parties embed it — the file path should not move after launch.
  • Rollback: revert the PR (and keep public/img/deploy-button.svg if any external embeds already reference it).

Follow-up work

  • Link the page from the Compute index/getting-started pages and template READMEs after launch.
  • Extend the URL format section if env*/redirect-url parameters or private-repository support ship later.

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview Jul 30, 2026 1:14pm
docs Ready Ready Preview Jul 30, 2026 1:14pm
eclipse Ready Ready Preview Jul 30, 2026 1:14pm
site Ready Ready Preview Jul 30, 2026 1:14pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c9000376-341d-492e-9564-ffa982d95b19

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread apps/docs/src/components/deploy-button-generator.tsx Fixed
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🍈 Lychee Link Check Report

12 links: ✅ 3 OK | 🚫 0 errors | 🔀 2 redirects | 👻 9 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 3
🔀 Redirected 2
👻 Excluded 9
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

@argos-ci

argos-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 30, 2026, 1:22 PM

@ankur-arch

Copy link
Copy Markdown
Contributor Author

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.

@ankur-arch ankur-arch closed this Jul 30, 2026
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>
@ankur-arch ankur-arch changed the title docs(compute): add Deploy Button page and generator docs(compute): Deploy Button page and generator (repository-url) Jul 30, 2026
@ankur-arch ankur-arch reopened this Jul 30, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 30, 2026
- 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>
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.

2 participants