docs(compute): Deploy Button page and generator (repository-url) - #8116
docs(compute): Deploy Button page and generator (repository-url)#8116ankur-arch wants to merge 12 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>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe 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. ChangesDeploy Button
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to 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
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🍈 Lychee Link Check Report16 links: ✅ All links are working!Full Statistics Table
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎ Awaiting the start of a new Argos build… |
|
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>
… and simplify it Restructure the page pyramid-style: the generator now sits directly under the intro, with the repository contract, URL reference, and background sections following in order of reader need. Requirements fold into How it works and the static snippets fold into URL format. Generator hardening: utm fields are validated (100-char cap, no control characters), example values reject bidi and zero-width characters that could visually spoof a README, and the HTML snippet escaper also covers < > and single quotes. Simplification: snippets render through eclipse's CodeBlock (native docs styling plus its copy button), the four labeled inputs collapse into one Field component with aria-invalid styling, and the URL is built in plain code instead of a useMemo with derived deps. The env-var rules comment now points at the canonical implementation in pdp-control-plane. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…form Connected repositories accept prisma.compute.ts, but the /new/clone validation only accepts a root prisma.compute.json. Say so explicitly so authors who used the typed config know why validation rejects their repository. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Status update from today's Prisma 8 end-to-end audit: click-to-deploy templates went GA in Console (the venus gate was removed), so the hold-until-GA constraint on this page is lifted. I re-verified every documented validation rule and troubleshooting string against pdp-control-plane main today — all still accurate — and pushed one precision fix: the Deploy Button accepts only the JSON config form ( |
…utton-docs # Conflicts: # apps/docs/content/docs/compute/meta.json
- Say plainly that links carry names and public example values, never secrets (the env-example paragraph contradicted the earlier rule). - Reject duplicate variable names in the generator instead of silently keeping the first example. - Make the repository contract actionable: show framework and entry in the minimal config, define the project requirement as JavaScript or TypeScript, point at prisma-cli init for generating the file, and mark the env.vars snippet as a fragment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Console regex (/^[A-Z_][A-Z0-9_]*$/) rejects a leading digit; the prose said only "uppercase letters, numbers, and underscores". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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"]Review in 3 checks
repository-urlplus optionalproject-name,env,env-example-<NAME>,utm_*. Validation matches the Console: uppercase names, 10 max, 100-char examples, no control characters.app.env.varsinprisma.compute.json(with a copy-paste example).Where to look
apps/docs/src/components/deploy-button-generator.tsxapps/docs/content/docs/compute/deploy-button.mdxapps/docs/public/img/deploy-button.svgTesting
Merge order
flowchart LR A["#4770\nConsole"] --> B["smoke test\n+ GA"] --> C["this PR"] --> D["example repo\nbadge swap"]Nothing depends on this PR except the final badge swap in the example repo.
Summary by CodeRabbit
New Features
Documentation