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 02 / Topic 1 of 9

Folders become URLs — and there is no routes file

Open the prerequisite React course's mental model for a moment: a client-side router like React Router keeps one list — a <Routes> tree, or an array of route objects — and every URL in your app exists because a line in that list registers it. Add a page, add a line. The list is the single source of truth, and it lives in one file you can open and read top to bottom.

The App Router has no such list. A route exists because a folder exists inside app/ and that folder contains a page.tsx. There is nothing to import, nothing to register, no array to keep in sync with the folders on disk — the folder structure is the configuration. This is the single biggest mental shift this part teaches: stop looking for the routing file, because reading the app/ folder tree already is reading the routes.

Part 1 built exactly one route this way, without calling it "routing" yet: app/page.tsx is /. This part finally gives that convention its name and extends it: app/store/page.tsx is /store, app/store/products/page.tsx is /store/products, and so on, one folder level at a time. Everything below is built as a small storefront, Apna Bazaar, added to this course's shared harness/ app alongside Part 1's homepage, which is left untouched.

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

Search the guide