Blert is a PvM tracking and analytics platform for Old School RuneScape, supporting Theatre of Blood, Colosseum, Inferno, and more.
This repository contains the codebase for the Blert website and backend services.
blert/
├── common/ # Shared utilities and modules
├── proto/ # Shared .proto files (git submodule)
├── web/ # Frontend web app
├── socket-server/ # WebSocket event server
├── challenge-harder/ # Challenge lifecycle and processing (Rust)
├── live-server/ # Live challenge streaming server (Rust)
├── effect-runner/ # Post-challenge side effects (e.g. webhooks)
├── blertbank/ # Blertcoin accounts and ledger
└── compose.yaml # Local development stack
Follow these steps to get a full Blert development environment running.
docker compose upThis runs the websocket server, the challenge server, the effect runner, Blertbank, the database, and Redis.
You can either import sample data or initialize a fresh schema.
If you have a sample dump (e.g. blert-sample-data.zip):
-
Place the
.datadirectory into the root of your Blert repository. -
Import the SQL dump:
psql 'postgres://blert:blert@localhost:5433/blert' -f blert-dump.sql
This loads a prebuilt dataset containing recorded ToB raid entries and a test user.
If you don’t have a dump, you can create a new empty schema with:
export BLERT_DATABASE_URI='postgres://blert:blert@localhost:5433/blert'
npm run -w common migration:runInstall Node v26.5.0 using nvm:
nvm install 26.5.0
nvm useThe Rust services (challenge-harder and live-server) build on stable Rust.
Their build scripts compile the shared .proto files, so protoc must be on
your path as well.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# e.g. on Debian/Ubuntu
sudo apt-get install protobuf-compilernpm install
npm run -w common build
npm run -w socket-server buildA default environment file, web/.env.development, is included in the
repository for local Docker-based development.
BLERT_DATABASE_URI=postgres://blert:blert@localhost:5433/blert
BLERT_REDIS_URI=redis://localhost:6379
AUTH_SECRET=blertThere are two extra environment variables needed by the web app, pointing to directories in your filesystem.
If you imported a data dump, these directories should already exist. Otherwise,
create .data/challenges and .data/web in the root of your Blert repository.
Create web/.env.local and specify:
BLERT_DATA_REPOSITORY=file:///path/to/blert/web/.data/challenges
BLERT_WEB_REPOSITORY=file:///path/to/blert/web/.data/webIn a separate terminal, run:
nvm use
npm run -w web devVisit http://localhost:3000 to verify the frontend is running.
Once the site is running, open it in your browser and register a new account. This creates a user in your local database.
If you want to record and submit your own data using a local Blert plugin:
-
Generate an API key
Visit http://localhost:3000/settings/api-keys while logged in and create a new API key.
-
Connect your Blert plugin
Point your local Blert plugin to
ws://localhost:3003, then paste your API key into its settings and start recording. Your data will stream into your local instance.
The root of this repository includes a Docker compose file for running the backend services required by Blert.
docker compose upThis starts the following services:
- Websocket server —
ws://localhost:3003 - Challenge processing server —
http://localhost:3019 - Blertbank —
http://localhost:3013 - Effect runner — single metrics endpoint at
http://localhost:3071/metrics - Postgres —
localhost:5433 - Redis —
localhost:6379
The web frontend is run separately.
Some services are behind compose profiles and are not started by default:
# Live challenge streaming on http://localhost:3010
docker compose --profile live up
# Prometheus (9090), Grafana (3001), and Loki (3100)
docker compose --profile observability up
# Umami analytics on http://localhost:3011
docker compose --profile analytics upYou can run each Node service's tests from the root via the test command in
the service's workspace, or Rust services via cargo:
npm run -w socket-server test
cargo test -p challenge-harderThis project is licensed under the MIT License.