Creating a Next.js Application
The standard way to start a modern project is with the Next.js project generator. During setup you can choose TypeScript, ESLint, Tailwind CSS, a source directory, and the App Router.
For modern applications, the App Router should generally be preferred because it provides Server Components, nested layouts, loading states, error boundaries, streaming, and modern data-fetching patterns.
A good production project should establish conventions early. Decide where reusable UI lives, where server-only modules live, how environment variables are named, how API clients are organized, and how domain-specific code is separated.
Create a Next.js Project
npx create-next-app@latest my-next-app
cd my-next-app
npm run dev💡 The generator creates the project structure and development tooling. The development server normally becomes available locally after running the dev script.
Key Takeaways
- Use the official project generator instead of manually assembling framework configuration.
- Prefer the App Router for new applications.
- Establish architectural conventions before the project becomes large.