Project Scaffolder — v15.1.11

Zero to
Deployed.

Toggle your stack. Watch the command build itself. Ship your first production Next.js app in under 60 minutes.

// configure your stack

// estimated output

107 kB

Build Size

177 ms

Cold Start

8

Packages

bash — ~/projects
❯~/projects·main
npx create-next-app@latest my-app \
--typescript \
--app \
--tailwind \
--eslint \
--src-dir
✓Scaffolding project structure...
✓Installing 8 dependencies (TypeScript enabled)...
✓App Router configured — src/app/
✓Tailwind CSS v3 — tailwind.config.ts
Success! Created my-app — estimated build: 107 kB · cold start: 177ms

Scroll to see how file-system routing works — no react-router needed.

// 01 — file-system routing

Every file is a
route.

No router configuration. No <Route path=...> components. Drop a page.tsx in a folder — it becomes a URL.

app/ — file-system routing spec
0/11 routes
File Path
URL Pattern
Type
Notes
01app/page.tsx
/
Page
Root — rendered on server by default
02app/about/page.tsx
/about
Page
Static segment
03app/blog/[slug]/page.tsx
/blog/:slug
Dynamic
Dynamic segment — params.slug
04app/blog/[slug]/loading.tsx
/blog/:slug
Loading
Streaming UI — instant Suspense boundary
05app/blog/[slug]/error.tsx
/blog/:slug
Error
Error boundary — "use client" required
06app/dashboard/layout.tsx
/dashboard/*
Layout
Nested layout — shared across children
07app/dashboard/page.tsx
/dashboard
Page
Protected route — add middleware.ts
08app/api/users/route.ts
GET /api/users
Route
API handler — export GET, POST, PATCH...
09app/[...catchAll]/page.tsx
/*
Catch
Catch-all — matches any unmatched path
10app/not-found.tsx
404
Special
Custom 404 — auto-rendered on notFound()
11middleware.ts
Every request
Edge
Runs on Edge Runtime — auth, redirects
mkdir app/dashboard && touch app/dashboard/page.tsx → /dashboard is live
⚡

No config

Zero router setup. The folder structure is the config.

🔀

Parallel routes

Render multiple pages in the same layout simultaneously.

🛡️

Middleware

Run code before any route — auth, A/B tests, redirects.

// 02 — server vs client components

The boundary that
changes everything.

The default is Server. Add 'use client' only when you need interactivity. Wrong choice = slow app or broken DB query.

added / available
removed / unavailable
UserProfile.tsx — Server ComponentSERVER
1·// Server Component (default)
2·
3·// ✓ Runs on server — zero JS to client
4·// ✓ Direct DB/API access — no useEffect
5·// ✓ Automatic code splitting
6·
7·async function UserProfile({ id }) {
8+ const user = await db.user.findUnique(
9+ { where: { id } }
10+ );
11·
12· return (
13· <div className="profile">
14+ <h1>{user.name}</h1>
15· </div>
16· );
17·}
Counter.tsx — Client ComponentCLIENT
1+'use client';
2·
3·// ✓ useState, useEffect, event handlers
4·// ✓ Browser APIs (localStorage, etc.)
5−// ✗ No direct DB access
6−// ✗ Larger bundle — ships JS to client
7·
8·function Counter() {
9+ const [count, setCount] = useState(0);
10·
11· return (
12· <button
13+ onClick={() => setCount(c => c+1)}
14· >
15· Count: {count}
16· </button>
17· );
18·}

// decision tree — which one do I use?

Need useState or useEffect?

→ 'use client'

Fetching from DB or external API?

→ Server (default)

onClick, onChange, onSubmit?

→ 'use client'

Reading env vars or file system?

→ Server (default)

The full starter kit includes 12 pre-wired component patterns.

Auth-gated Server Components, optimistic UI, streaming Suspense — all wired up.

Send Me the Full Starter Kit →

// 03 — data fetching strategies

SSG. ISR. SSR.
Pick one.

The wrong choice costs 10× in TTFB or stale data. Here's the benchmark that ends the debate — with the exact fetch option for each.

// latency benchmark (p50, US East)

Measured with Vercel Edge Network · Next.js 15.1 · Node.js 20
PropertySSGISRSSR
CDN Cacheable✓✓✗
Per-request fresh✗✗✓
Auth/personalized✗✗✓
Zero cold-start✓✓✗
SSGStatic Site Generation

HTML generated at build time, served from CDN edge

~12ms

Best for

Content that rarely changes

Trade-off

Stale until next deploy

Use Case

Marketing pages, blog posts, docs

Revalidation

Never (until rebuild)

ssg-example.ts
// No fetch options = static by default
const data = await fetch('/api/posts');

// Or explicit:
const data = await fetch('/api/posts',
  { cache: 'force-cache' }
);

// 04 — starter kit

Send Me the
Full Starter Kit.

Pre-wired Next.js 15 template: App Router, TypeScript, Tailwind, auth middleware, Server Components, streaming Suspense. Every pattern from this guide, production-ready.

›

Just want the command? Copy it from the scaffolder ↑ — no email required.