Skip to content

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

Merged
AmanVarshney01 merged 20 commits into
mainfrom
feat/compute-deploy-button-docs
Aug 24, 2026
Merged

docs(compute): Deploy Button page and generator (repository-url)#8116
AmanVarshney01 merged 20 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: merge only after prisma/pdp-control-plane#4770 is deployed and GA'd. The docs link to console.prisma.io/new/clone, which is a 404 until then. Review now, merge later.

What this is

The public Deploy Button docs page (/docs/compute/deploy-button) plus an interactive generator. Authors paste a repo URL, optionally declare env vars, and copy a ready-to-paste badge.

flowchart LR
    A["Author opens\ndocs generator"] --> B["Enter repo URL\n+ env vars"]
    B --> C["Client-side validation\n(same rules as Console)"]
    C --> D["Copy URL /\nMarkdown / HTML"]
    D --> E["Badge in README"]
    E --> F["Visitor clicks,\nConsole takes over"]
Loading

Review in 3 checks

  1. Contract parity. Generated URLs use repository-url plus optional project-name, env, env-example-<NAME>, utm_*. Validation matches the Console: uppercase names, 10 max, 100-char examples, no control characters.
  2. Both env-var sources documented. Link parameters and app.env.vars in prisma.compute.json (with a copy-paste example).
  3. Troubleshooting matches reality. The error-message reference mirrors the Console's actual banners.

Where to look

Area File
Generator component apps/docs/src/components/deploy-button-generator.tsx
Docs page apps/docs/content/docs/compute/deploy-button.mdx
Badge asset apps/docs/public/img/deploy-button.svg

Testing

  1. Docs CI green: Playwright, link check, spellcheck, CodeQL, Argos.
  2. Generator lint and typecheck clean.
  3. URL output manually cross-checked against the Console implementation, including the control-character rule for example values (a pasted tab fails for the author, not their users).

Merge order

flowchart LR
    A["#4770\nConsole"] --> B["smoke test\n+ GA"] --> C["this PR"] --> D["example repo\nbadge swap"]
Loading

Nothing depends on this PR except the final badge swap in the example repo.

Summary by CodeRabbit

  • New Features

    • Added an interactive Deploy Button generator for GitHub repositories.
    • Generate deployment URLs, Markdown snippets, and HTML snippets with copy controls.
    • Supports optional project, tracking, and environment-variable settings with validation.
  • Documentation

    • Added a comprehensive Deploy Button guide covering setup, configuration, usage, and troubleshooting.

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 Aug 24, 2026 3:49pm
docs Ready Ready Preview Aug 24, 2026 3:49pm
eclipse Ready Ready Preview Aug 24, 2026 3:49pm
site Ready Ready Preview Aug 24, 2026 3:49pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6a5bb0c4-ab80-4bd7-8d1e-2865e6631b83

📥 Commits

Reviewing files that changed from the base of the PR and between 6701bb4 and 888e010.

📒 Files selected for processing (1)
  • apps/docs/content/docs/compute/deploy-button.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/docs/content/docs/compute/deploy-button.mdx

Walkthrough

The PR adds a client-side Deploy Button generator to the Compute documentation. It validates repository and environment-variable inputs, generates deploy URLs and embedding snippets, registers the component in MDX, and documents setup and troubleshooting.

Changes

Deploy Button

Layer / File(s) Summary
Validation and URL generation
apps/docs/src/components/deploy-button-generator.tsx
Validates repository, project, UTM, and environment-variable inputs. It serializes valid values and builds the Console clone URL.
Generator form and snippets
apps/docs/src/components/deploy-button-generator.tsx
Adds accessible form controls, environment-variable management, validation messages, previews, and Markdown and escaped HTML outputs.
MDX integration and documentation
apps/docs/src/mdx-components.tsx, apps/docs/content/docs/compute/meta.json, apps/docs/content/docs/compute/deploy-button.mdx
Registers the generator in MDX, adds the page to Compute navigation, and documents repository requirements, deployment flow, URL parameters, environment variables, embedding, and troubleshooting.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 888e0

This PR adds the Deploy Button documentation, generator, and badge assets; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant DeployButtonDocs
  participant DeployButtonGenerator
  participant Console
  User->>DeployButtonDocs: Open Deploy Button documentation
  DeployButtonDocs->>DeployButtonGenerator: Render generator
  User->>DeployButtonGenerator: Enter repository and optional parameters
  DeployButtonGenerator->>DeployButtonGenerator: Validate inputs and generate snippets
  DeployButtonGenerator->>Console: Provide deploy-button URL
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the documentation page and interactive Deploy Button generator added by the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/compute-deploy-button-docs

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

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

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 0
🔀 Redirected 0
👻 Excluded 2
🚫 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 ↗︎

Awaiting the start of a new Argos build…

@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>
- 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>
…utton-docs

# Conflicts:
#	apps/docs/src/mdx-components.tsx
@AmanVarshney01

Copy link
Copy Markdown
Member

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved and changes approved.

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.

3 participants