# Prerequisites · Your first Rell app on Chromia · Learn Chromia

> This tutorial takes you step by step from preparing your development environment to understanding the code.

Source: https://chromia.com/learn/book-review/build-client/prerequisites/

Your first Rell app on ChromiaLesson 22 of 26

1. [01Your first Rell app on Chromia](https://chromia.com/learn/book-review/introduction/)
2. [02Set up your project](https://chromia.com/learn/book-review/setup/)
3. [03Rell project structure](https://chromia.com/learn/book-review/rell-structure/)

Part 1: Define your first entity

1. [04Overview](https://chromia.com/learn/book-review/book-entity/)
2. [05Create your first entity](https://chromia.com/learn/book-review/book-entity/tables/)
3. [06Add your first operation](https://chromia.com/learn/book-review/book-entity/basic-operations/)
4. [07Query every book](https://chromia.com/learn/book-review/book-entity/write-queries/)

Part 2: Add a related entity

1. [08Overview](https://chromia.com/learn/book-review/book-review-entity/)
2. [09Define the book review entity](https://chromia.com/learn/book-review/book-review-entity/tables/)
3. [10Add an operation for creating book reviews](https://chromia.com/learn/book-review/book-review-entity/basic-operations/)
4. [11Query all reviews for a book](https://chromia.com/learn/book-review/book-review-entity/write-queries/)

Part 3: Checking and validating inputs

1. [12Overview](https://chromia.com/learn/book-review/input-verification/)
2. [13Verify inputs](https://chromia.com/learn/book-review/input-verification/input-verification/)
3. [14Return structured results from queries](https://chromia.com/learn/book-review/input-verification/structure/)

Part 4: Signing transactions and filtering queries

1. [15Overview](https://chromia.com/learn/book-review/sign-transaction/)
2. [16Sign a transaction](https://chromia.com/learn/book-review/sign-transaction/sign-transaction/)
3. [17Filter and sort query results](https://chromia.com/learn/book-review/sign-transaction/structure/)

Part 5: Blockchain state and transactions explained

1. [18Overview](https://chromia.com/learn/book-review/blockchain-transactions/)
2. [19How blockchain state and transactions work](https://chromia.com/learn/book-review/blockchain-transactions/query-transaction/)
3. [20Walking through an example](https://chromia.com/learn/book-review/blockchain-transactions/example/)

Part 6: Create the client

1. [21Overview](https://chromia.com/learn/book-review/build-client/)
2. [22Prerequisites](https://chromia.com/learn/book-review/build-client/prerequisites/)
3. [23Establishing a connection to Chromia](https://chromia.com/learn/book-review/build-client/sign-transaction/)
4. [24Query the blockchain using postchain-client](https://chromia.com/learn/book-review/build-client/query-blockchain/)
5. [25Complete the example](https://chromia.com/learn/book-review/build-client/complete-example/)

1. [26What’s next?](https://chromia.com/learn/book-review/what-next/)

[Learn](https://chromia.com/learn/)[Your first Rell app on Chromia](https://chromia.com/learn/book-review/)

22 / 26Part 6: Create the clientBeginner

# Prerequisites

This tutorial takes you step by step from preparing your development environment to understanding the code.

First, confirm that your development environment is configured correctly.

## Step 1: Install Node.js and set up the project

1. **Install Node.js**: Node.js runs JavaScript on the server side. If it isn't on your machine yet, get it from the [Node.js website](https://nodejs.org/) and install it.
2. **Create a project directory**: In your terminal, go to the location where your project should live and run these commands:

   shell

   ```nolines
   mkdir chromia-book-review-demo
   cd chromia-book-review-demo
   ```
3. **Initialize a Node.js project**: Generate a `package.json` file with this command:

   shell

   ```nolines
   npm init -y
   ```

## Step 2: Install required packages

With the project in place, install the packages it depends on:

shell

```nolines
npm install typescript postchain-client readline @types/node
```

* `typescript`: adds TypeScript support.
* `postchain-client`: provides the tools you use to communicate with the Chromia blockchain.
* `readline`: a core Node.js module for reading user input from the command line.

## Step 3: Configure TypeScript

TypeScript reads its settings from a file called `tsconfig.json`. Generate it by running:

shell

```nolines
npx tsc --init
```

You get a `tsconfig.json` file with default settings, which you can adjust to fit your project.

## Step 4: Integrate the code

With the packages installed, you can add the code to your project:

1. In your project directory, create a TypeScript file called `book_review.ts`. Leave it empty for now; you will fill it in over the following sections.
2. Node.js can't run TypeScript directly, so transpile it to JavaScript first:

   shell

   ```nolines
   npx tsc
   ```

   The compiled JavaScript is written to a `book_review.js` file.
3. Run the result with Node.js:

   shell

   ```nolines
   node book_review.js
   ```

   This runs your code, which interacts with the Chromia blockchain according to what you have written.

Your development environment is now ready: the required packages are installed and TypeScript is integrated into the project. The next section walks through an example client.

Written for this site from Chromia’s public course. Code samples are the course’s own.

[← Previous**Part 6: Create the client**](https://chromia.com/learn/book-review/build-client/)[Next →**Establishing a connection to Chromia**](https://chromia.com/learn/book-review/build-client/sign-transaction/)

On this page

* [Step 1: Install Node.js and set up the project](#step-1-install-nodejs-and-set-up-the-project)
* [Step 2: Install required packages](#step-2-install-required-packages)
* [Step 3: Configure TypeScript](#step-3-configure-typescript)
* [Step 4: Integrate the code](#step-4-integrate-the-code)
