Installing and Bootstrapping a Next.js Project – Quick Start with TypeScript, Tailwind, and App Router

This article walks you through creating a modern Next.js project using the official create-next-app CLI. With a single command, you can scaffold a project preconfigured with TypeScript, Tailwind CSS, App Router, and Turbopack. We’ll also cover folder structure, TypeScript and ESLint setup, and configuring absolute import aliases for cleaner code.

Next.jscreate-next-appTypeScriptTurbopack

~2 min read · Updated Oct 25, 2025

Introduction


Next.js is one of the most popular React frameworks for building modern web applications. In this article, we’ll walk through the steps to install and bootstrap a new project using the official create-next-app CLI tool.


Quick Start with create-next-app


To create a new project with default settings, run the following commands in your terminal:


pnpm create next-app@latest my-app --yes
cd my-app
pnpm dev

This sets up a project with TypeScript, Tailwind CSS, App Router, and Turbopack enabled by default.


Initial Folder and File Structure


Next.js uses file-based routing. Start by creating an app directory and adding the following files:


// app/layout.tsx
export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  );
}

// app/page.tsx
export default function Page() {
  return <h1>Hello, Next.js!</h1>;
}

Using the public Folder


To store static assets like images, create a public folder at the root of your project. You can reference files using root-relative paths:


import Image from 'next/image';

export default function Page() {
  return <Image src="/profile.png" alt="Profile" width={100} height={100} />;
}

TypeScript and ESLint Setup


Next.js has built-in TypeScript support. Rename any file to .ts or .tsx and run next dev to auto-generate a tsconfig.json.


For linting, you can use ESLint or Biome:


// ESLint
"scripts": {
  "lint": "eslint",
  "lint:fix": "eslint --fix"
}

// Biome
"scripts": {
  "lint": "biome check",
  "format": "biome format --write"
}

Using Import Aliases


To simplify import paths, configure @/ as an alias in your tsconfig.json or jsconfig.json:


{
  "compilerOptions": {
    "baseUrl": "src/",
    "paths": {
      "@/components/*": ["components/*"],
      "@/styles/*": ["styles/*"]
    }
  }
}

Conclusion


With create-next-app and the default setup, you can quickly launch a modern Next.js project. It comes preconfigured with powerful tools like TypeScript, Tailwind, App Router, and Turbopack — making development faster and more structured from the start.


Written & researched by Dr. Shahin Siami

Related Articles

Advanced Client-Side Routing and Performance Hooks in Next.js

Next.js provides a rich set of client-side hooks and caching utilities that empower developers to build dynamic, responsive, and secure applications. From reading route parameters to tracking navigation state and reporting performance metrics, this guide walks you through the most important tools available in the App Router.

Continue

Handling Authorization and Caching in Next.js: A Developer’s Guide

Next.js introduces powerful experimental features for access control and smart caching. This guide covers the unauthorized() function for custom 401 handling, unstable_cache for persistent memoization, updateTag for instant cache invalidation, and useLinkStatus for inline navigation feedback. Learn how to use these tools to build secure, performant, and responsive applications.

Continue

redirect and refresh in Next.js — Smart Redirects and Client Refreshing via Server Actions

The redirect function in Next.js allows you to navigate users to a new route, returning either a 307 or 303 HTTP response depending on context. It works in Server Components, Client Components, Route Handlers, and Server Actions. The refresh function is used exclusively within Server Actions to refresh the client router. This article explains how both functions work, with practical examples and key considerations.

Continue

NextRequest and NextResponse in Next.js — Managing Cookies, Headers, Redirects, and Rewrites

Next.js extends the native Web Request and Response APIs with NextRequest and NextResponse, offering powerful tools for managing cookies, headers, redirects, rewrites, and JSON responses. These utilities simplify server-side logic and improve control over routing, personalization, and security. This guide walks through their capabilities with practical examples and best practices.

Continue

headers, ImageResponse, notFound, and permanentRedirect in Next.js — Request Handling, Dynamic Images, Errors, and Redirects

Next.js offers powerful tools for handling HTTP requests and responses in Server Components. The headers function lets you read incoming request headers. ImageResponse allows you to generate dynamic images using JSX and CSS. The notFound function renders a custom 404 page, and permanentRedirect enables permanent redirection to another route. This article explains how to use each feature with practical examples.

Continue

A Complete Guide to Using metadata and generateMetadata in Next.js

In modern versions of Next.js, managing page metadata is more powerful and intuitive than ever. Metadata is automatically injected into the <head> of your pages and plays a vital role in SEO, social sharing, and user experience. This guide explains the two main ways to define metadata: using the static metadata object and the dynamic generateMetadata function.

Continue