Your whole backend, in one language.
Rell: data, writes and queries in one typed file.
module;
object my_name {
mutable name = "World";
}
operation set_name(name) {
my_name.name = name;
}
query hello_world() = "Hello %s!".format(my_name.name);// 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 };
}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!Quickstart
Run it locally.
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-dappOpen it, start a node
terminal
# VS Code / Cursor: “Reopen in Container”
code my-rell-dapp
# then, in its terminal
chr node startQuery, 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/chrPostgres · 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.20Create & start
terminal
chr create-rell-dapp
cd my-rell-dapp
chr node start # localhost:7740Query, 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.
Key + free test CHR
Make a key. Get tCHR from the faucet ↗.
terminal
chr keygen --key-id testnet_container_keyLease a container
In the Testnet Vault ↗, 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 ↗
terminal
chr deployment create \
--network testnet \
--key-id testnet_container_keyCommands 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
LocalFree
Your laptop.
TestnetFree
Faucet tCHR covers it.
Mainnet≈ 90 USD / week
Standard container, default 7-node cluster. Priced in USD, paid weekly in CHR.
Source: docs · Hosting · target price. Extra storage costs extra.
Rell
Three keywords. One operator.
Type-safe. Compiles to SQL.
- entity
- On-chain table
- operation
- Signed write
- query
- Free read
- @ @? @* @+
- Select one · zero or one · many · one or more
Free courses
SKILLRell skillClaude Code · Cursor
MCPChromia MCP serveragents ↔ chain
VECVector DB extensionsearch by meaning
Help