Quick Start

Generate your first project

After installing the SDK, the strat Command Line Interface makes it easy to generate Indigo projects. Launch a terminal, then navigate to a directory where you want to save your projects (e.g. cd projects).

Next we’ll use the strat generate {directory} command to create a new project. It launches a wizard that generates the needed files in the given directory (e.g. my-pop).

strat generate my-pop

Choose option 1 (type 1 then press enter) to generate a Javascript project.

What would you like to generate?
1: A basic Javascript agent
2: A Stratumn configuration
? 1

It will prompt you for project settings such as your name. For the development store, choose the default option (Stratumn Indigo Node With File Store). For the development fossilizer, choose the default option (None). The rest of the settings are up to you.

A store is a component that is responsible for saving our process’ data. In our case we use an Indigo blockchain node that will save the steps of our process as JSON files. During development, it will launch a single node.

A fossilizer is an optional component that timestamps fingerprints (i.e. cryptographic hashes) of the steps of the process on a common timeline such as the Bitcoin blockchain. Since we are already using a blockchain to store data (which already implies a timeline), a fossilizer isn’t mandatory.

Run your first project

After the wizard is done generating our project, you can launch it locally by running strat up within the project’s directory.

cd my-pop
strat up

It will take a bit of time when you run this command to build the project and download the required dependencies.

Note: if you don’t have babel and a few other development tools installed globally, you’ll also need to go in the agent folder and run yarn before doing strat up.

Once the project is running, you’ll see log output from the running services in your terminal. You can stop the project at any time by pressing Ctrl^C, and start it again with strat up.

While the project is running, open a browser and navigate to http://localhost:4000. It will display a web interface to visualize and try your process. Next navigate to http://localhost:8000. It will display a dashboard and block explorer for your local Tendermint node.

Next steps

You are now ready to build your first Indigo-based application!

Here are some useful resources to help you in this journey: