Blog>
Snippets

Setting Up the Basic Next.js Project Structure

Show how to create a new Next.js 14 project using create-next-app and explain the initial file and directory structure created, including the pages and public directories.
npx create-next-app@latest my-next-project
This command uses NPX to run create-next-app with the latest version to scaffold a new Next.js project named my-next-project.
cd my-next-project
Navigate into the newly created project directory.
npm run dev
Starts the Next.js development server, allowing you to view your new project in the browser.