Getting started

Install Next.js

Create a new App Router project and run it locally. This guide keeps to the basics.

On This Page

Create an app

Run the create-next-app command. The recommended setup includes the App Router, TypeScript, Tailwind CSS, and the default @/* import alias.

npx create-next-app@latest my-app --yes

The App Router uses the app directory for pages and shared layouts:

Project structure

app/
  layout.js  // shared HTML and page shell
  page.js    // the home page

Run it locally

Open the new project folder, then start the development server:

Terminal

cd my-app
npm run dev

Open localhost:3000 in your browser to see the starter page.

For additional options, see the official Next.js installation guide.