Part 02 / Topic 2 of 9
The special filenames — and which ones are this part's job
page.tsx is not the only filename the App Router treats specially. Reading straight from the installed package's own routing-files reference, this is the full list:
| File | Extensions | What it is |
|---|---|---|
layout |
.js .jsx .tsx |
Layout |
page |
.js .jsx .tsx |
Page |
loading |
.js .jsx .tsx |
Loading UI |
not-found |
.js .jsx .tsx |
Not found UI |
error |
.js .jsx .tsx |
Error UI |
global-error |
.js .jsx .tsx |
Global error UI |
route |
.js .ts |
API endpoint |
template |
.js .jsx .tsx |
Re-rendered layout |
default |
.js .jsx .tsx |
Parallel route fallback page |
This part is scoped to exactly one of these — page.tsx — plus the folder-naming conventions ([id], [...slug], (group)) that decide which URL a page.tsx ends up at. layout.tsx, loading.tsx, not-found.tsx, error.tsx and template.tsx are Part 3's job; route.ts (Route Handlers, real API endpoints) is Stage 4's. Every route built below is, for now, a single page.tsx file with nothing wrapping it — that is deliberate, not an oversight.
🔍 Going deeper: a route only becomes publicly reachable once a
page.tsxorroute.tsexists somewhere in its folder. A folder with nopage.tsxis just a folder — it groups other routes underneath it, but visiting its own path 404s. Section 7 proves this directly.
Done here? The practice set for Part 2 — including the solutions — is on the part page.