Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions apps/admin/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Backpack } from 'lucide-react';
import Link from 'next/link';

export default function NotFound() {
return (
<div className="min-h-screen flex items-center justify-center bg-background">
<div className="text-center px-4">
<div className="flex justify-center mb-6">
<div className="bg-primary/10 rounded-full p-6 inline-flex">
<Backpack className="w-12 h-12 text-primary" />
</div>
</div>
<h1 className="text-8xl font-extrabold text-foreground mb-2 leading-none">404</h1>
<p className="text-xl font-semibold text-foreground mb-2">Page not found</p>
<p className="text-muted-foreground max-w-xs mx-auto mb-8">
This admin page doesn&apos;t exist. Head back to the dashboard.
</p>
<Link
href="/dashboard"
className="inline-flex items-center justify-center rounded-lg bg-primary px-6 py-2.5 text-sm font-semibold text-primary-foreground hover:bg-primary/90 transition-colors"
>
Back to dashboard
</Link>
</div>
</div>
);
}
62 changes: 62 additions & 0 deletions apps/admin/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { Backpack } from 'lucide-react';

export default function Custom404() {
return (
<div
Comment on lines +1 to +5
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
style={{
minHeight: '100vh',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
background: '#0f172a',
fontFamily: 'system-ui, sans-serif',
}}
>
<div style={{ textAlign: 'center', padding: '0 1rem' }}>
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '1.5rem' }}>
<div
style={{
background: 'rgba(15,118,110,0.15)',
borderRadius: '9999px',
padding: '1.5rem',
display: 'inline-flex',
}}
>
<Backpack size={48} color="#14b8a6" />
</div>
</div>
<h1
style={{
fontSize: '5rem',
fontWeight: 800,
color: '#f8fafc',
margin: '0 0 0.5rem',
lineHeight: 1,
}}
>
404
</h1>
<p style={{ fontSize: '1.25rem', fontWeight: 600, color: '#f8fafc', margin: '0 0 0.5rem' }}>
Page not found
</p>
<p style={{ color: '#94a3b8', maxWidth: '22rem', margin: '0 auto 2rem' }}>
This admin page doesn&apos;t exist. Head back to the dashboard.
</p>
<a
href="/dashboard"
style={{
background: '#0f766e',
color: '#fff',
padding: '0.625rem 1.5rem',
borderRadius: '0.5rem',
fontWeight: 600,
textDecoration: 'none',
fontSize: '1rem',
}}
>
Back to dashboard
</a>
</div>
</div>
);
}
80 changes: 80 additions & 0 deletions apps/admin/pages/500.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { AlertTriangle } from 'lucide-react';

export default function Custom500() {
return (
<div
style={{
Comment on lines +1 to +6
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
minHeight: '100vh',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
background: '#0f172a',
fontFamily: 'system-ui, sans-serif',
}}
>
<div style={{ textAlign: 'center', padding: '0 1rem' }}>
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '1.5rem' }}>
<div
style={{
background: 'rgba(239,68,68,0.15)',
borderRadius: '9999px',
padding: '1.5rem',
display: 'inline-flex',
}}
>
<AlertTriangle size={48} color="#ef4444" />
</div>
</div>
<h1
style={{
fontSize: '5rem',
fontWeight: 800,
color: '#f8fafc',
margin: '0 0 0.5rem',
lineHeight: 1,
}}
>
500
</h1>
<p style={{ fontSize: '1.25rem', fontWeight: 600, color: '#f8fafc', margin: '0 0 0.5rem' }}>
Something went wrong
</p>
<p style={{ color: '#94a3b8', maxWidth: '22rem', margin: '0 auto 2rem' }}>
An unexpected error occurred. Try again or contact support if the problem persists.
</p>
<div
style={{ display: 'flex', flexWrap: 'wrap', gap: '0.75rem', justifyContent: 'center' }}
>
<a
href="/dashboard"
style={{
background: '#0f766e',
color: '#fff',
padding: '0.625rem 1.5rem',
borderRadius: '0.5rem',
fontWeight: 600,
textDecoration: 'none',
fontSize: '1rem',
}}
>
Back to dashboard
</a>
<a
href="mailto:hello@packratai.com"
style={{
border: '1px solid #334155',
color: '#f8fafc',
padding: '0.625rem 1.5rem',
borderRadius: '0.5rem',
fontWeight: 600,
textDecoration: 'none',
fontSize: '1rem',
}}
>
Contact support
</a>
</div>
</div>
</div>
);
}
5 changes: 5 additions & 0 deletions apps/admin/public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
9 changes: 9 additions & 0 deletions apps/admin/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://developers.cloudflare.com/schemas/wrangler.json",
"name": "packrat-admin",
"compatibility_date": "2024-09-23",
"assets": {
"directory": "./out",
"not_found_handling": "404-page"
}
}
2 changes: 1 addition & 1 deletion apps/guides/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "bun run build-content && next build",
"build-content": "bun run scripts/build-content.ts",
"clean": "bunx rimraf .next node_modules out .vercel",
"clean": "bunx rimraf .next node_modules out",
"demo-enhancement": "bun run scripts/demo-enhancement.ts",
"dev": "next dev",
"enhance-content": "bun run scripts/enhance-content.ts",
Expand Down
5 changes: 5 additions & 0 deletions apps/guides/public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
9 changes: 9 additions & 0 deletions apps/guides/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://developers.cloudflare.com/schemas/wrangler.json",
"name": "packrat-guides",
"compatibility_date": "2024-09-23",
"assets": {
"directory": "./out",
"not_found_handling": "404-page"
}
}
2 changes: 1 addition & 1 deletion apps/landing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build": "next build",
"clean": "bunx rimraf node_modules .next out .vercel",
"clean": "bunx rimraf node_modules .next out",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
Expand Down
5 changes: 5 additions & 0 deletions apps/landing/public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
Comment on lines +1 to +5
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
13 changes: 0 additions & 13 deletions apps/landing/vercel.json

This file was deleted.

9 changes: 9 additions & 0 deletions apps/landing/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://developers.cloudflare.com/schemas/wrangler.json",
"name": "packrat-landing",
"compatibility_date": "2024-09-23",
"assets": {
"directory": "./out",
"not_found_handling": "404-page"
}
}
Loading