docs(compute): Deploy Button page and generator (repository-url) - #8116
docs(compute): Deploy Button page and generator (repository-url)#8116ankur-arch wants to merge 3 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: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
🍈 Lychee Link Check Report12 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
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 rootprisma.compute.json, apackage.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+ optionalproject-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 inmdx-components.tsx.public/img/deploy-button.svg— the hosted "Deploy with Prisma" badge, served athttps://www.prisma.io/docs/img/deploy-button.svgso 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 optionalproject-nameandutm_*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
/new/cloneroute and deep-link change are deployed, so button links resolve and signed-out clicks return to the clone page after sign-in.prisma/compute-deploy-example) exists publicly with a working button in its README.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, andpnpm lint:linksall pass.pnpm --filter docs dev, then openhttp://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 GitHubowner/reposhapes only), and the copy buttons work; the badge preview links to the Console.Risks, limitations, and rollback steps
public/img/deploy-button.svgif any external embeds already reference it).Follow-up work
env*/redirect-urlparameters or private-repository support ship later.🤖 Generated with Claude Code