claude/setup-admin-app-structure-eOiWV#2189
Conversation
Add missing scaffolding to bring the admin app to parity with the landing and guides apps: - vercel.json — security response headers (X-Frame-Options, nosniff, etc.) - pages/404.tsx + pages/500.tsx — static custom error pages (works with output: export) - app/not-found.tsx — App Router 404 handler with Tailwind/themed styles https://claude.ai/code/session_01LqN8nDxX8KMs8s53J4DGVD
Drop vercel.json from landing and admin (not deployed to Vercel) and strip .vercel from the clean scripts in landing and guides. https://claude.ai/code/session_01LqN8nDxX8KMs8s53J4DGVD
- wrangler.jsonc: configures packrat-admin as a Workers static assets project, serving from ./out with 404-page handling - public/_headers: security response headers for admin, landing, and guides (replaces the now-deleted vercel.json files) https://claude.ai/code/session_01LqN8nDxX8KMs8s53J4DGVD
Same wrangler.jsonc pattern as admin — serves ./out with 404-page handling. _headers already in place from the previous commit. https://claude.ai/code/session_01LqN8nDxX8KMs8s53J4DGVD
Deploying packrat-guides with
|
| Latest commit: |
b3ba7fa
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cc7bbb45.packrat-guides-6gq.pages.dev |
| Branch Preview URL: | https://claude-setup-admin-app-struc.packrat-guides-6gq.pages.dev |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
packrat-admin | b3ba7fa | Apr 16 2026, 03:43 AM |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
Adds Cloudflare-oriented deployment scaffolding and static error handling so the admin app (and related static apps) work cleanly with next.config output: 'export' and security headers.
Changes:
- Add
wrangler.jsoncconfigs forlanding,guides, andadminto serve./outwith 404-page handling. - Replace Vercel header configuration with Cloudflare Pages-style
public/_headersacross apps. - Add admin 404/500 pages plus an App Router
app/not-found.tsx; updatecleanscripts to stop deleting.vercel.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/landing/wrangler.jsonc | Cloudflare Wrangler config pointing static assets to ./out. |
| apps/landing/vercel.json | Removed Vercel-specific response header configuration. |
| apps/landing/public/_headers | Adds security headers via Cloudflare Pages _headers. |
| apps/landing/package.json | Updates clean script to stop deleting .vercel. |
| apps/guides/wrangler.jsonc | Cloudflare Wrangler config for exported output. |
| apps/guides/public/_headers | Adds security headers via _headers. |
| apps/guides/package.json | Updates clean script to stop deleting .vercel. |
| apps/admin/wrangler.jsonc | Cloudflare Wrangler config for exported output. |
| apps/admin/public/_headers | Adds security headers via _headers. |
| apps/admin/pages/404.tsx | Adds a static custom 404 page (Pages Router). |
| apps/admin/pages/500.tsx | Adds a static custom 500 page (Pages Router). |
| apps/admin/app/not-found.tsx | Adds an App Router 404 handler with themed/Tailwind styles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { Backpack } from 'lucide-react'; | ||
|
|
||
| export default function Custom404() { | ||
| return ( | ||
| <div |
There was a problem hiding this comment.
The admin 404 is now implemented in two places (pages/404.tsx and app/not-found.tsx) with different styling/markup. With output: 'export' and Cloudflare not_found_handling: "404-page", only one of these will become the deployed 404.html, so this duplication can lead to inconsistent UX and future drift. Consider consolidating to a single source of truth (e.g., share a common component, or keep only the one that is actually used for the exported 404).
| import { AlertTriangle } from 'lucide-react'; | ||
|
|
||
| export default function Custom500() { | ||
| return ( | ||
| <div | ||
| style={{ |
There was a problem hiding this comment.
pages/500.tsx provides a /500 route for the Pages Router, but the admin app is primarily using the App Router (apps/admin/app/*). Runtime render errors in App Router routes won’t use this page; they require app/error.tsx (and optionally app/global-error.tsx) to show a custom 500-style experience. Consider adding an App Router error boundary so production errors don’t fall back to Next’s default error UI.
| /* | ||
| X-Frame-Options: DENY | ||
| X-Content-Type-Options: nosniff | ||
| Referrer-Policy: strict-origin-when-cross-origin | ||
| Permissions-Policy: camera=(), microphone=(), geolocation=() |
There was a problem hiding this comment.
PR description mentions adding vercel.json security headers, but this change removes apps/landing/vercel.json and replaces the behavior with Cloudflare Pages-style public/_headers. Please update the PR description (and/or deployment docs) to reflect the actual approach so reviewers/operators don’t assume Vercel headers are still in effect.
…ture-eOiWV claude/setup-admin-app-structure-eOiWV
Add missing scaffolding to bring the admin app to parity with the
landing and guides apps:
https://claude.ai/code/session_01LqN8nDxX8KMs8s53J4DGVD