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

Step-by-step tutorial with tools needed, learning outcomes, and tips per step. Perfect for DIY projects and hands-on guides.

PRO

post45

Multi-Chapter Guide

Documentation-style guide with chapter navigation, table of contents, and previous/next navigation. Perfect for comprehensive tutorials.

PRO

post20

Documentation Getting Started

Documentation-focused layout with version badge, info/warning/tip boxes, and previous/next navigation. Best for technical documentation.

PRO

post40

Recipe Card Layout

Recipe article with ingredients list, step-by-step instructions, prep/cook times, and serving info. Perfect for food blogs and cooking content.

PRO

post44

Online Course Lesson

Course lesson layout with module navigation, progress tracking, and downloadable resources. Perfect for e-learning platforms.

PRO

post43

Multi-Part Series Article

Series article with part navigation, progress bar, and previous/next links. Perfect for tutorials and multi-chapter content.