Skip to content

feat(site): add public Compute template directory - #8128

Open
AmanVarshney01 wants to merge 5 commits into
mainfrom
codex/dr-8815-template-directory
Open

feat(site): add public Compute template directory#8128
AmanVarshney01 wants to merge 5 commits into
mainfrom
codex/dr-8815-template-directory

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Aug 5, 2026

Copy link
Copy Markdown
Member

Purpose of change

Publish a public Prisma Compute template directory at /templates so developers can inspect working starters and begin a guided deployment from prisma.io.

Closes DR-8815

What's changed and why

  • Add a public, server-rendered /templates page backed by the shared Compute template manifest, refreshed every five minutes.
  • Link each starter to its exact source and to its Console template flow with website/template attribution parameters.
  • Keep the page focused on choosing a template, reviewing its source, and deploying it.
  • Add Templates to the Resources navigation.
  • Keep author wording neutral so the directory can add external contributors later. Author attribution is tracked in DR-8785.
  • Show a useful unavailable state if the public manifest cannot be loaded or validated.

Testing notes / Before-after

Before: prisma.io had no public template directory. Developers had to reach the signed-in Console catalog first.

After: /templates presents the live catalog publicly, gives developers the source up front, and preserves the selected template through the Console link.

Verified with:

  • Targeted Oxfmt and Oxlint on both changed files
  • Site link lint
  • Site type check
  • Production site build; /templates is statically generated with a five-minute refresh
  • Desktop browser review at 1280px
  • Mobile browser review at 390px with no horizontal overflow
  • All three source links and Console deep links checked in the rendered DOM

Screenshots

Public Prisma Compute template directory

Mobile

Mobile Prisma Compute template directory

Summary by CodeRabbit

  • New Features
    • Added a Templates page showcasing Prisma Compute templates.
    • Templates include feature highlights, deployment links, and source-code links.
    • Added a Templates option to the Resources navigation menu.
    • Template information is refreshed periodically to keep listings current.
  • Bug Fixes
    • Added an unavailable-state message when template information cannot be loaded.

@vercel

vercel Bot commented Aug 5, 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 5, 2026 2:47pm
docs Ready Ready Preview Aug 5, 2026 2:47pm
eclipse Ready Ready Preview Aug 5, 2026 2:47pm
site Ready Ready Preview Aug 5, 2026 2:47pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 5, 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

Walkthrough

The site adds a /templates page for Prisma Compute templates. The page validates remote manifest data, renders deployment and source links, shows an unavailable state when loading fails, and adds the page to the Resources navigation.

Changes

Compute Templates Directory

Layer / File(s) Summary
Template loading and page rendering
apps/site/src/app/templates/page.tsx
The page fetches and validates template metadata with five-minute revalidation and a ten-second timeout. It renders Compute setup content, template cards, deployment links, GitHub source links, and an unavailable state.
Templates navigation entry
apps/site/src/app/layout.tsx
The Resources menu links to /templates. The unused Footer import is removed.

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

Sequence Diagram(s)

sequenceDiagram
  participant TemplatesPage
  participant RemoteManifest
  participant Visitor
  TemplatesPage->>RemoteManifest: Fetch and validate template metadata
  RemoteManifest-->>TemplatesPage: Return templates or unavailable data
  TemplatesPage-->>Visitor: Render cards or empty state
  Visitor->>TemplatesPage: Select deployment or source link
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a public Compute template directory to the site.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/dr-8815-template-directory

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

@argos-ci

argos-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown

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

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 changed Aug 5, 2026, 2:54 PM

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/site/src/app/templates/page.tsx`:
- Around line 29-30: Add an AbortController-based timeout around the manifest
fetch in the page component, passing its signal to fetch and cancelling the
request after a bounded interval shorter than the page deadline. Ensure timeout
cancellations reject into the existing catch handling and clean up the timer
after the request completes.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 62bf64f3-4dec-4ce7-87aa-00148a29a320

📥 Commits

Reviewing files that changed from the base of the PR and between 03efddd and 1054200.

📒 Files selected for processing (2)
  • apps/site/src/app/layout.tsx
  • apps/site/src/app/templates/page.tsx

Comment thread apps/site/src/app/templates/page.tsx
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 5, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 5, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 5, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/site/src/app/templates/page.tsx (1)

8-18: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Enforce unique template.id values in templateManifestSchema. The current manifest has unique IDs, but the schema accepts duplicate valid items. Duplicate IDs create duplicate React keys and identical Console URLs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/site/src/app/templates/page.tsx` around lines 8 - 18, Update
templateManifestSchema to validate that all template.id values are unique within
the templates array. Preserve the existing per-template validation and reject
manifests containing duplicate IDs before rendering or generating URLs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@apps/site/src/app/templates/page.tsx`:
- Around line 8-18: Update templateManifestSchema to validate that all
template.id values are unique within the templates array. Preserve the existing
per-template validation and reject manifests containing duplicate IDs before
rendering or generating URLs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 68fa8e6c-bc20-4613-8d88-6e0e405f8646

📥 Commits

Reviewing files that changed from the base of the PR and between e7825e8 and e07f5d3.

📒 Files selected for processing (1)
  • apps/site/src/app/templates/page.tsx

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.

1 participant