Course map
Stage 1: App Router Foundations
Stage 2: The Rendering Model
Stage 3: Data, Caching and Mutations
Stage 4: Full-Stack Next.js
Stage 5: Production and Specialization

Part 04 / Topic 8 of 8

Putting it together: a route the generated types don't know about

Part 2 and Part 3 both ended by reading AppRoutes. This part's build adds a new entry to the route table that doesn't show up there at all:

$ npm run build
...
Route (app)
┌ ○ /
├ ○ /_not-found
├ ○ /store
├ ○ /store/about
├ ○ /store/contact
├   /store/go/[id]
│ ├ ◐ /store/go/[id]
│ ├ ○ /store/go/p1
│ ├ ○ /store/go/p2
│ └ ○ /store/go/p3
├ ○ /store/opengraph-image
├ ○ /store/products
├   /store/products/[id]
│ ├ ◐ /store/products/[id]
│ ├ ○ /store/products/p1
│ ├ ○ /store/products/p2
│ └ ○ /store/products/p3
└   /store/search/[...terms]
  ├ ◐ /store/search/[...terms]
  ├ ○ /store/search/silk
  └ ○ /store/search/pottery

$ grep "^type AppRoutes" harness/.next/types/routes.d.ts
type AppRoutes = "/" | "/store" | "/store/about" | "/store/contact" | "/store/go/[id]" | "/store/products" | "/store/products/[id]" | "/store/search/[...terms]"

/store/opengraph-image is real — section 7 already fetched a genuine PNG from it — and it shows up in the build's own route table, ○ /store/opengraph-image, same as any page. It never appears in AppRoutes. File-based metadata routes (opengraph-image.tsx, and by the same logic sitemap.ts, robots.ts, icon.tsx — none built in this harness) are routes the server will answer, but they are not page.tsx/route.ts files a visitor navigates to with <Link>, which is exactly what AppRoutes — generated for typed navigation — tracks.

Done here? The practice set for Part 4 — including the solutions — is on the part page.

Search the guide