> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/zhcndoc/bun/llms.txt
> Use this file to discover all available pages before exploring further.

# Build an app with Next.js

> Use Next.js with Bun

Next.js works with Bun as the JavaScript runtime and package manager.

## Quick Start

```bash theme={null}
bun create next-app my-app
cd my-app
bun dev
```

## Manual Setup

<Steps>
  <Step title="Install dependencies">
    ```bash theme={null}
    bun add next react react-dom
    ```
  </Step>

  <Step title="Add scripts to package.json">
    ```json package.json theme={null}
    {
      "scripts": {
        "dev": "next dev",
        "build": "next build",
        "start": "next start"
      }
    }
    ```
  </Step>

  <Step title="Create pages/index.tsx">
    ```tsx pages/index.tsx theme={null}
    export default function Home() {
      return <h1>Hello Next.js + Bun</h1>;
    }
    ```
  </Step>

  <Step title="Run development server">
    ```bash theme={null}
    bun dev
    ```
  </Step>
</Steps>

<Note>
  Next.js is fully compatible with Bun's package manager and runtime.
</Note>
