0

create-next-app & project anatomy

Setupused in ~100% of apps

Before you write a single line of UI you have to make a project exist — and the way you scaffold it (and what each folder is for) is the first thing a senior dev glances at to gauge whether you actually know Next.js 16 or just copied a 2022 tutorial.

Core idea. `npx create-next-app@latest` scaffolds an App Router project that builds with Turbopack by default in v16. The folders aren't decoration: `app/` is the router, `public/` is served as-is, and config files (next.config.ts, tsconfig.json, package.json) decide how everything runs.
Playground, this isn't a screenshot
app size48 modules

Drag to grow the app, then press npm run dev in each mode and compare the startup time.

/src (48 modules)served on demand: 0/48
server idle0 ms
Hot Module Replacement
Start the dev server first.0 ms

Vite serves your source as native ES modules. Startup is ~constant (120 ms) no matter how big the app grows — the browser asks for a module, Vite transforms that one file with esbuild and returns it. Only the 6 modules the first screen needs load up front; the rest stream in on demand. HMR swaps the single edited module, so it stays near-instant.

↑ play a little first, then dig in