โœฆ StealThis .dev

Next.js + TypeScript Starter

Official Next.js starter with App Router, TypeScript, Tailwind CSS, ESLint, and Turbopack. Production-ready with server components out of the box.

Open in Lab
nextjs react typescript tailwindcss
Targets: HTML

Code

Next.js + TypeScript Starter

The official Next.js scaffolding tool sets up a full-stack React framework with the App Router, TypeScript, Tailwind CSS, and Turbopack for instant dev builds.

Quick Start

npx create-next-app@latest my-app --ts
cd my-app
npm run dev

The interactive CLI prompts you for Tailwind CSS, ESLint, src/ directory, App Router, and Turbopack preferences. All are recommended defaults.

What You Get

  • App Router โ€” File-based routing with layouts, loading states, and error boundaries
  • React Server Components โ€” Server-first rendering with zero client JS by default
  • TypeScript โ€” Strict mode, automatic type generation for routes
  • Tailwind CSS โ€” Pre-configured with PostCSS and the Next.js plugin
  • Turbopack โ€” Rust-based bundler for near-instant HMR in development
  • ESLint โ€” eslint-config-next with Core Web Vitals rules
  • Font Optimization โ€” next/font for self-hosted fonts with zero layout shift

Generated Project Structure

my-app/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ fonts/
โ”‚   โ”œโ”€โ”€ favicon.ico
โ”‚   โ”œโ”€โ”€ globals.css
โ”‚   โ”œโ”€โ”€ layout.tsx
โ”‚   โ””โ”€โ”€ page.tsx
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ file.svg
โ”‚   โ”œโ”€โ”€ globe.svg
โ”‚   โ”œโ”€โ”€ next.svg
โ”‚   โ”œโ”€โ”€ vercel.svg
โ”‚   โ””โ”€โ”€ window.svg
โ”œโ”€โ”€ next.config.ts
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ postcss.config.mjs
โ”œโ”€โ”€ tailwind.config.ts
โ””โ”€โ”€ tsconfig.json

Key Files

  • next.config.ts โ€” Framework configuration: redirects, rewrites, image domains, experimental features.
  • app/layout.tsx โ€” Root layout wrapping all pages. Set global fonts, metadata, and providers here.
  • app/page.tsx โ€” Home route (/). A React Server Component by default.
  • tsconfig.json โ€” Pre-configured with @/* path alias mapping to the project root.

Extend With

ToolPurpose
PrismaType-safe ORM for database access
NextAuth.jsAuthentication with OAuth, credentials, and magic links
tRPCEnd-to-end type-safe APIs without code generation
MDXMarkdown with JSX for content-heavy pages
Vercel AI SDKStreaming AI responses with React Server Components

References