# Getting Started

## Option 1: Use `create-next-app`

You can use [create-next-app](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) to quickly create a new project with this Starter, by running the following command:

```bash
yarn create next-app [project-name] -e https://github.com/nextjs-starter/nextjs-webapp-starter
# or
npx create-next-app [project-name] -e https://github.com/nextjs-starter/nextjs-webapp-starter
```

Check out the [development guides](/nextjs-webapp-starter/development/typescript-integration.md) to familiarize yourself with the project's code structure.

## Option 2: GitHub's `Use this template` feature

From this project's [GitHub repository homepage](https://github.com/nextjs-starter/nextjs-webapp-starter) click the **Use this template** button to [create your own GitHub repository from it](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template).

![](/files/-MGz27WbqSdY7BPTh_18)

There are two branches. The default branch, named `release`, contains the code for the latest stable release. The other branch, named `canary`, is the development branch and holds code for the next release. By default you will only get the release branch. If you want your repository to be created with the canary branch as well, make sure to select the **Include all branches** checkbox in the repository creation form.

Depending on your workflow either clone, or fork and then clone your repository to your local environment and then do the following:

1. Make sure you have [Node.js](https://nodejs.org/) (>= 10.21.0) installed.
2. Install the dependencies:

   ```
   cd path/to/app
   yarn  # or npm i
   ```
3. Run the Next.js development server:

   ```
   yarn dev
   # or
   npm run dev
   ```

   Open [http://localhost:3000](http://localhost:3000/) with your browser to run the web app. To specify a port other than 3000 use the `-p` flag:

   ```
   yarn dev -p <some other port>   # e.g. yarn dev -p 3001
   ```
4. Go forth and code your awesome project! We recommend that you read the [development guides](/nextjs-webapp-starter/development/typescript-integration.md).

## Before you start coding

We ship an opinionated feature set on top of the default app that `create-next-app` gives you. Check out the [development guides](/nextjs-webapp-starter/development/typescript-integration.md) to familiarize yourself with the code structure of Next.js WebApp Starter.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nextjs-starter.gitbook.io/nextjs-webapp-starter/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
