Step-by-Step Tutorial

Setting Up a Next.js Project with TypeScript

A beginner-friendly tutorial to get your Next.js project running with TypeScript in under 10 minutes.

November 5, 2025
6 min read
Next.js setup illustration

Prerequisites

  • Node.js 18 or later installed
  • Basic familiarity with React
  • A code editor (VS Code recommended)
1

Create a new Next.js project

Open your terminal and run the create-next-app command. The CLI will ask you a few questions about your project setup.

$npx create-next-app@latest my-app --typescript
2

Navigate to your project

Change into the newly created project directory. This is where all your project files live.

$cd my-app
3

Start the development server

Run the development server to see your app in action. Next.js will start on port 3000 by default.

$npm run dev
4

Open in your browser

Navigate to http://localhost:3000 in your browser. You should see the Next.js welcome page. Congratulations, your app is running!

5

Explore the project structure

Take a look at the app directory. This is where your routes live. Each folder represents a route segment, and page.tsx files define the UI.

6

Create your first page

Create a new file at app/hello/page.tsx. Add a simple React component that exports default. Visit /hello to see your new page.

You've successfully set up a Next.js project with TypeScript! From here, you can start building your application by adding more pages, components, and features.

About this block

Step-by-Step TutorialPRO

Tutorial layout with numbered steps, prerequisites box, terminal commands, and completion message. Perfect for hands-on guides.

More Post blocks

View all Post
PRO

post46

DIY How-To Tutorial

PRO

post45

Multi-Chapter Guide

PRO

post20

Documentation Getting Started

Get Pro access