app directory
The folder, app/ or src/app/, whose subfolders and special files define every route in an App Router project.
In more detail
Folders become URL segments and special files such as page.tsx, layout.tsx and loading.tsx define what each segment renders. Other files can sit alongside them without becoming routes.
Related terms
- App Router — The Next.js routing system built on React Server Components, where folders inside app/ define the routes.
- file convention — A file name that Next.js gives a special meaning, such as page.tsx for a route's content or error.tsx for its error screen.
- route — The combination of HTTP method and URL path that a server maps to one handler, such as GET /orders/{id}.
Taught in
- Root & Nested Layouts: State Preservation Semantics — Next.js 15 & Modern App Router Architecture
- Route Groups & Private Folders: Modular Structures — Next.js 15 & Modern App Router Architecture
- Route Handlers: RESTful Endpoints with NextRequest — Next.js 15 & Modern App Router Architecture