---
name: legal-pages-scaffold
description: "Scaffold or audit the legal-page surface a real app needs: Privacy, Terms, Disclaimer, Refunds, and Data Deletion, as proper indexable Next.js App Router routes wired to one site-config source of truth. Use when starting a new project with no legal pages yet, when adding paid subscriptions (Refunds is the page most checklists forget), or when the product sits next to a regulated or official-sounding domain (tax, medical, legal, government forms) and needs a no-affiliation disclaimer in both the page and the global footer. Complements the handbook's legal-pages gating rules with the actual build pattern: one shared layout component, one config module driving every brand string, and a scan that treats page and footer wiring as checkable facts."
---

# Legal Pages Scaffold

The four pages people forget until Google, AdSense, or a payment processor blocks them: Privacy, Terms, Disclaimer, Refunds, and Data Deletion, built from one shared layout and one config module instead of five hand-copied pages.

## Phases

Work through these in order.

### 1. Scan

Run the scan script over the project to find which of the five legal routes exist, whether they share one layout component, whether the footer links to them, and whether payment or billing evidence exists without a matching Refunds page.

Read: [legal-pages](https://selwynuy.dev/d/legal-pages.md), [payments-billing](https://selwynuy.dev/d/payments-billing.md)

### 2. Scaffold

Build the missing pages from one shared layout component and one site-config module, so the brand name, legal entity, canonical URL, and contact email are never hardcoded into a page body.

Read: [legal-pages](https://selwynuy.dev/d/legal-pages.md)

### 3. Wire and disclose

Link all five pages from the global footer, not just from each other, and if the product sits next to a regulated or official-sounding name, state the no-affiliation line in the footer itself, since organic traffic lands on content pages, not /legal.

Read: [legal-pages](https://selwynuy.dev/d/legal-pages.md)

## Bundled files

- `scripts/scan-legal.mjs` (script): Scans the project for the five legal routes, a shared layout component, footer wiring, payment evidence without a Refunds page, and per-page metadata and update dates, flagging gaps for review.
- `references/legal-pages-checklist.md` (reference): Which of the five pages applies and when, the shared-layout and site-config pattern, the no-affiliation placement, and the trust note on keeping claims true as the product changes.

---

Part of Legal Pages Scaffold from Selwyn Uy's Next.js Handbook. Full page: https://selwynuy.dev/skills/legal-pages-scaffold
