After this lesson, you will be able to: Scaffold a fresh Next.js app with TypeScript and Tailwind using `create-next-app`, navigate the folder structure, start the dev server, and make your first edit with hot reload.
Every Next.js project starts with one command: `npx create-next-app`. The scaffolder asks you a handful of questions, then drops you into a working app with TypeScript, Tailwind, ESLint, the App Router, and Fast Refresh all preconfigured. This lesson walks you through the setup, the folder layout, and your first edit. By the end you'll have a real Next.js project running locally that you can build on for the rest of the subtrack.
You could install Next.js, React, Tailwind, ESLint, and TypeScript by hand and wire them together yourself. Nobody does this for new projects. `create-next-app` is maintained by Vercel, ships sensible defaults the framework team itself uses, and gets you to a working app in under a minute. The scaffolded code is the same scaffolded code every Next.js tutorial, every new hire onboarding doc, and every Vercel example starts from. Use it.
One command, a few questions, a working app. Use the answers below for this subtrack — TypeScript, ESLint, Tailwind, App Router. The defaults are the right answers in 2025.
# In your projects foldernpx create-next-app@latest my-first-next-app# Answers (just press Enter for each — these are the defaults)✔ Would you like to use TypeScript? … Yes✔ Would you like to use ESLint? … Yes✔ Would you like to use Tailwind CSS? … Yes✔ Would you like your code inside a `src/` directory? … No✔ Would you like to use App Router? (recommended) … Yes✔ Would you like to use Turbopack for `next dev`? … Yes✔ Would you like to customize the import alias (@/*)? … No# Open it in your editorcd my-first-next-appcode .# Start the dev servernpm run dev# → http://localhost:3000
What you got. Spend 60 seconds looking at each: `app/` — the App Router lives here. `page.tsx` is the homepage. `layout.tsx` wraps every page. `globals.css` holds Tailwind directives. `public/` — static files served at the root (favicons, images, robots.txt). `package.json` — your dependencies and `scripts` (the `dev`, `build`, `start`, `lint` commands). `next.config.ts` — Next.js configuration (image domains, experimental flags). Mostly empty for new projects. `tsconfig.json` — TypeScript settings. `strict: true` is on by default. Don't turn it off. `tailwind.config.ts` — Tailwind configuration. The `content` paths tell Tailwind which files to scan for class names; if you add `src/` later, add it here too.
Open `app/page.tsx` and replace its contents with the snippet below. Save the file. Watch the browser tab at `localhost:3000` refresh instantly. Fast Refresh is Next.js applying your change without a full reload.
export default function Home() {return (<main className="min-h-screen flex items-center justify-center bg-slate-50"><div className="text-center"><h1 className="text-4xl font-bold text-slate-900">Hello, Next.js!</h1><p className="mt-2 text-slate-600">Your first Next.js page is running.</p></div></main>);}
Five things working out of the box that would cost you a weekend to wire up yourself: **Fast Refresh** — edit a component, see the change without losing state. **TypeScript** — `strict: true` from the first line of code. **Tailwind v4** — utility classes work in any file under `app/`. **ESLint with Next.js rules** — catches accessibility issues (`<img>` missing `alt`), bad Next.js patterns (using `<a>` instead of `<Link>`), and common React mistakes. **Font optimization** — `next/font` lets you self-host Google fonts with zero layout shift. All of this is invisible until you need it. That's the point.
Edit `app/page.tsx` to replace the placeholder with your own personal landing page. Required patterns below check that you've used a Tailwind layout class (`flex` or `grid`), at least one Tailwind color utility, a heading, and a paragraph. The page should look intentionally styled, not generic.
Sign in and purchase access to unlock this lesson.