# Build on Chromia: Rell, chr CLI, SDKs and courses

> Start building on Chromia: hello world in four commands, Rell by example, the chr CLI, SDKs, a docs map, free courses, AI tools and grants.

Source: https://chromia.com/developers/

# Your whole backend, *in one language.*

Rell: data, writes and queries in one typed file.

[Start building](#start)[Docs ↗](https://docs.chromia.com/)

```
module;

object my_name {
  mutable name = "World";
}

operation set_name(name) {
  my_name.name = name;
}

query hello_world() = "Hello %s!".format(my_name.name);
```

What the quickstart creates · tested on chr 0.34.3

```
// A table, a write and a read.
// That is the whole backend.
entity user {
  key name;
  email: text;
  created_at: timestamp;
}

operation create_user(
  name: text,
  email: text
) {
  create user(
    name, email,
    created_at =
      op_context.last_block_time
  );
}

query get_user(name: text) {
  return user @? { .name == name };
}
```

A table, a signed write, a free read · from the docs

```
import { createClient } from "postchain-client";

const client = await createClient({
  nodeUrlPool: ["http://localhost:7740/"],
  // local node = chain 0; networks use blockchainRid
  blockchainIid: 0,
});

// Queries are free and read-only
const greeting = await client.query("hello_world");
console.log(greeting); // Hello World!
```

Local node · tested with postchain-client 2.1.5

Quickstart

## Run it locally.

[Install guide →](https://docs.chromia.com/get-started/installation/)

### Create the project

terminal · only Docker needed

```
docker run --rm -u $(id -u):$(id -g) \
  -v "$(pwd):$(pwd)" -w "$(pwd)" \
  registry.gitlab.com/chromaway/core-tools/chromia-cli/chr:latest \
  chr create-rell-dapp --devcontainer my-rell-dapp
```

### Open it, start a node

terminal

```
# VS Code / Cursor: “Reopen in Container”
code my-rell-dapp
# then, in its terminal
chr node start
```

### Query, write, query

terminal

```
# in a second terminal
chr query hello_world  # "Hello World!"
chr keygen --key-id=chromia_key
chr tx --await set_name "Developer"
chr query hello_world  # "Hello Developer!"
```

### Install chr + Postgres

terminal

```
brew tap chromia/core \
  https://gitlab.com/chromaway/core-tools/homebrew-chromia.git
brew install chromia/core/chr
```

Postgres · or your own, see install guide

```
docker run --name postgres -p 5432:5432 \
  -e POSTGRES_USER=postchain \
  -e POSTGRES_PASSWORD=postchain \
  -d postgres:16.3-alpine3.20
```

### Create & start

terminal

```
chr create-rell-dapp
cd my-rell-dapp
chr node start  # localhost:7740
```

### Query, write, query

terminal

```
# in a second terminal
chr query hello_world  # "Hello World!"
chr keygen --key-id=chromia_key
chr tx --await set_name "Developer"
chr query hello_world  # "Hello Developer!"
```

Homebrew also installs Java 21+.

Ship

## Deploy to testnet.

[Deploy guide →](https://docs.chromia.com/get-started/create-dapp/deploy-to-testnet/)

### Key + free test CHR

Make a key. Get tCHR from the [faucet ↗](https://faucet.testnet.chromia.com/).

terminal

```
chr keygen --key-id testnet_container_key
```

### Lease a container

In the [Testnet Vault ↗](https://vault.testnet.chromia.com/containers/), lease one for your key’s pubkey. Add its ID:

chromia.yml

```
# chromia.yml: add this block
deployments:
  testnet:
    brid: x"6F1B061C633A992BF195850BF5AA1B6F887AEE01BB3F51251C230930FB792A92"
    url: https://node0.testnet.chromia.com:7740
    container: <your-container-id>
```

### Deploy

Check both values in the [explorer ↗](https://explorer.chromia.com/testnet)

terminal

```
chr deployment create \
  --network testnet \
  --key-id testnet_container_key
```

Commands from the docs, checked against chr 0.34.3 help.

Cost

## Free to build and test. Pay hosting when you launch.

Users pay no gas. You lease capacity.

**After launch:** Updates ship new code. New columns need a default. Past blocks never change.

Source: [docs · CLI](https://docs.chromia.com/build/cli/introduction/)

Local**Free**

Your laptop.

Testnet**Free**

Faucet tCHR covers it.

Mainnet**≈ 90 USD / week**

Standard container, default 7-node cluster. Priced in USD, paid weekly in CHR.

Source: [docs · Hosting](https://docs.chromia.com/get-started/about/hosting/) · target price. Extra storage costs extra.

Rell

## Three keywords. One operator.

Type-safe. Compiles to SQL.

[Rell in 10 minutes ↗](https://docs.chromia.com/rell/rell-intro/)[All docs and courses →](https://chromia.com/learn/#paths)

entity
:   On-chain table

operation
:   Signed write

query
:   Free read

@ @? @\* @+
:   Select one · zero or one · many · one or more

Free courses

[All courses →](https://chromia.com/learn/)

[Beginner · 26 lessons

### Your first Rell app on Chromia

Start →](https://chromia.com/learn/book-review/introduction/)[Beginner · 27 lessons

### A simple Chromia app with Rell and React

Start →](https://chromia.com/learn/my-news-feed/introduction/)[Guide · 8 lessons

### Chromia for EVM developers

Start →](https://chromia.com/learn/chromia-for-evm-developers/introduction/)

AI tools

## Let your AI write Rell.

Rell skill and MCP (agent tool connector).

[Set up MCP ↗](https://docs.chromia.com/build/clients/mcp-server/)

SKILL**Rell skill**Claude Code · Cursor

MCP**Chromia MCP server**agents ↔ chain

VEC**Vector DB extension**search by meaning

Grant

## Six months of mainnet hosting.

Container Grant Program for approved teams.

[About the program ↗](https://blog.chromia.com/chromia-container-grant-program/)

Help

### Stuck? Ask the builders.

[CHAT**Discord**discord.gg/chromia ↗](https://discord.gg/chromia)[CODE**GitLab**gitlab.com/chromaway ↗](https://gitlab.com/chromaway)[SCAN**Explorer**explorer.chromia.com ↗](https://explorer.chromia.com/mainnet)
