# Quickstart Guide

Once blockflow package is installed.  Use this command to initialise project.

> ```sh
> blockflow init
> ```

{% hint style="info" %}
Ensure you're in an empty directory before running 'blockflow init'
{% endhint %}

This will open a command prompt where you can configure your project interactively.

***

## Using Our Predefined Templates

During the `blockflow init` process, you’ll be prompted to choose whether you want to use a predefined template. If you choose **Yes**, the CLI will present you with a list of available templates.

* **Select a template**: Choose the one that best suits your needs, and Blockflow will initialise the project based on that template.
* Once initialised, you’ll have a project structure ready to go. **Happy coding!**

If you prefer to start from scratch, select **No**, and follow the steps below.

***

## Setting up project from scratch

When you run the CLI, it will guide you through a series of prompts to gather essential information about your project. You'll be asked to provide details such as the project name, the blockchain network you want to target (chain), your Blockflow user ID, and the project ID. Once you've entered all the required information, the CLI will automatically generate and populate your project directory with the necessary files for indexing your project.

The process should look something like the image below:

<figure><img src="https://content.gitbook.com/content/WKI4iN0gfSv8mfprvkZT/blobs/uzbcSTwtqYpaiHEI6ogh/Screenshot%202024-05-26%20at%2011.57.07%20AM.png" alt=""><figcaption><p>Setting up project</p></figcaption></figure>

{% hint style="info" %}
To get your User ID and Project ID, you'll need an account on [blockflow console](https://app.blockflow.network/). Refer to this [documentation](https://docs.blockflow.network/cli/advanced/console-account) for help.

If you prefer, you can skip providing these details during the initial CLI setup. The CLI allows you to configure your User ID and Project ID at a later stage as well.
{% endhint %}

***

### Selecting Trigger Type

A trigger specifies the conditions or events that will initiate the indexing process. CLI will prompt you to select the type of trigger you want to use for indexing the blockchain data. To read more about different triggers we support check [this](https://docs.blockflow.network/cli/building-blocks/configuring-yaml#type) out.

<figure><img src="https://content.gitbook.com/content/WKI4iN0gfSv8mfprvkZT/blobs/RdlR7wOIjRxUYix3GYBt/Screenshot%202024-05-26%20at%2012.08.37%20PM.png" alt=""><figcaption><p>Selecting Trigger Type</p></figcaption></figure>

For this quickstart tutorial, we will work with event based trigger type.

***

### Indexing Contract

After selecting the trigger type, you'll be prompted to enter the contract address and name of the smart contract you wish to index.&#x20;

<figure><img src="https://content.gitbook.com/content/WKI4iN0gfSv8mfprvkZT/blobs/q9BVtDnnW8mCtVN2lQJt/Screenshot%202024-05-26%20at%201.08.38%20PM.png" alt=""><figcaption><p>Indexing Contract</p></figcaption></figure>

Once you've completed the configuration process for the desired triggers, the CLI will automatically generate and populate the project folder with the necessary boilerplate code. Open this folder in VSCode.

See the project structure docs for an overview of all the possible files and folders in your application.
