Revised text: A Vite React WebApp powers Keiko, an open-source development tool tailored for Dojo. Keiko integrates Katana—an RPC controller, Torii—an automatic indexer, and a runtime auto-contract deployment runner. This unified approach eliminates the need for developers to separately run Katana, Torii, and contract deployments, consolidating all processes into a single Docker container for streamlined development.
There are three ways to set up Keiko:
Copy the following Yaml file into your project's root directory.
services:
keiko:
image: ghcr.io/oostvoort/keiko:latest
container_name: keiko
ports:
- "5050:5050"
- "3000:3000"
- "8080:8080"
- "50051"
restart: unless-stopped
volumes:
- ./contracts:/keiko/contracts
networks:
- pixelaw
networks:
pixelaw:
driver: bridge
Mounting the contracts volume makes it so that it uses your dojo contracts instead of the default ones. Take note that the dojo contracts have to be compiled before starting up the container. To compile the contracts:
# assuming that the contracts directory is in your root
cd contracts
sozo build
- SERVER_PORT - Port number to listen on. [default: 3000]
- CONTRACT_PATH - Path to the contracts directory [default: contracts]
- STATIC_PATH - Path to the static directory [default: static]
- SLOT_KATANA - the url to the deployed slot katana
- SLOT_TORII - the url to the deployed slot torii
- WORLD_ADDRESS - the world address [required if SLOT_KATANA was provided to run local Torii]
- WORLD_NAMD - the world salt
- PUBLIC_NODE_URL - the rpc url the Dashboard will use [default: http://localhost:5050]
docker compose up -d
Create the docker network
docker network create --driver bridge pixelaw
Run the container
docker run -d --name=keiko \
-p 5050:5050 \
-p 3000:3000 \
-p 8080:8080 \
-p 50051:50051 \
--restart unless-stopped \
-v $(pwd)/contracts:/keiko/contracts \
--network=pixelaw \
oostvoort/keiko:latest
3. Running the repository locally
cd server
cargo run
cd dashboard
yarn
cd dashboard
npx import-meta-env-prepare -x .env.example
cd dashboard
yarn dev