# Quickstart

## Installation

Install the package globally, and the tool will be accessible anywhere.

```
npm install -g @polygonlabs/dapp-launchpad
```

*Node >v16.14.x is supported, although Node v18.x.x is recommended. To easily manage different npm versions on your system, we recommend using* [*nvm*](https://github.com/nvm-sh/nvm)*.*

## Initialise a new project

To initialise a project, simply run:

```
dapp-launchpad init [YOUR PROJECT NAME]
```

This will create a new directory in your current directory, initialise a minimal DApp project inside it, then proceed to install all required packages.

By default, the scaffolded project is in javascript. To use typescript (or any other template), use [`--template NAME`](/dapp-launchpad/commands/init.md#options) option.

To get a list of available templates, run [`list scaffold-templates`](/dapp-launchpad/commands/list/scaffold-templates.md).

## Set up environment variables

Set up the mandatory environment variables in both the `frontend` and `smart-contracts` sub-folders, in a `.env` file. Example env files are provided for each, in `.env.example`.

### **WalletConnect Project ID**

To get a WalletConnect Project ID, Head over to [WalletConnect Cloud](https://cloud.walletconnect.com/) and create a new project. This will generate a project ID which you can then use.

## Starting development

To start a development environment, use:

```
dapp-launchpad dev
```

<figure><img src="/files/q1ckWSQr6hZYercC3sf6" alt=""><figcaption><p>The frontend dev server running, with your deployed app</p></figcaption></figure>

<figure><img src="/files/9oiCQidPSKFYGVodX3kT" alt=""><figcaption><p>The local test blockchain running, with your deployed contracts</p></figcaption></figure>

**And this will start a fully integrated dev environment - a local dev blockchain and a local Frontend dev server! Any change in the code automatically updates both the frontend and the smart contracts; no manual reload is necessary!**

The project is divided into two parts - [Frontend](/dapp-launchpad/workflow/frontend.md) (inside `frontend`) and [Smart contracts](/dapp-launchpad/workflow/smart-contracts.md) (inside `smart-contracts`).

This will also generate some funded test wallets for you in this test chain, which you can use to develop your DApp.

### Fork existing chain locally

You may also start this local chain by forking any existing EVM-compatible chain. Just run:

```
dapp-launchpad dev -n NETWORK_NAME
```

To see all available options, run:

```
dapp-launchpad dev -h
```

## Deploying to production

To deploy your project to production, run:

```
dapp-launchpad deploy -n CHAIN_NAME
```

This will do 2 things:

* Deploy all your smart contracts to the selected chain, and log the deployment results.
* Deploy your frontend to Vercel, and log the deployment URL.

To deploy only the smart contracts, run:

```
dapp-launchpad deploy -n CHAIN_NAME --only-smart-contracts
```

And to deploy only the frontend, run:

```
dapp-launchpad deploy -n CHAIN_NAME --only-frontend
```

**The frontend deployment requires that smart contracts to have been deployed before.** So if you are only deploying the frontend, make sure that you either:

1. Did run the smart contracts deploy command successfully before this.
2. OR, run [`generate smart-contracts-config -e production -n NETWORK_NAME`](/dapp-launchpad/commands/generate/smart-contracts-config.md#options) wizard.


---

# 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://0xpolygon.gitbook.io/dapp-launchpad/introduction/quickstart.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.
