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.

Відкрити в Lab
nextjs react typescript tailwindcss
Цілі: HTML

Код

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
  • ESLinteslint-config-next with Core Web Vitals rules
  • Font Optimizationnext/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