Sloga is a fork of Stoat (itself a fork of Revolt). It remains licensed under the GNU Affero General Public License v3.0. Internal crate names, the
Revolt.tomlconfig files and the database name keep thei upstream spelling on purpose — renaming them breaks running deployments. Only the product branding is Sloga.
Minimum Supported Rust Version
Rust 1.86.0 or higher.
Development Guide
Before contributing, read the crate layout above and the setup steps below.
Before getting started, you'll want to install:
- mise
- Docker
- Git
- mold (optional, faster compilation)
A default.nix is available for Nix users! Run
nix-shellto activate mise.
As a heads-up, the development environment uses the following ports:
Now you can clone and build the project:
git clone https://github.com/sloga-mcp/sloga-backend sloga-backend
cd sloga-backend
mise install
mise build
[!TIP] You can override
BUILDERin your.envfile to run cargo with mold if you installed it:# .env BUILDER = "mold --run cargo"
A default configuration Revolt.toml is present in this project that is suited for development.
If you'd like to change anything, create a Revolt.overrides.toml file and specify relevant variables.
[!TIP] Use Sentry to catch unexpected service errors:
# Revolt.overrides.toml [sentry] api = "https://[email protected]/1" events = "https://[email protected]/1" files = "https://[email protected]/1" proxy = "https://[email protected]/1"
[!TIP] If you have port conflicts on common services, you can try the following:
# compose.override.yml services: redis: ports: !override - "14079:6379" database: ports: !override - "14017:27017" rabbit: ports: !override - "14072:5672" - "14672:15672"With the corresponding Revolt configuration:
# Revolt.overrides.toml # and Revolt.test-overrides.toml [database] mongodb = "mongodb://127.0.0.1:14017" redis = "redis://127.0.0.1:14079/" [rabbit] port = 14072And mise configuration
#.env DATABASE_PORT = "14017" RABBIT_PORT = "14072" REDIS_PORT = "14079"
Then continue:
cp livekit.example.yml livekit.yml
mise start
You can start a web client by doing the following in another terminal:
# if you do not have yarn yet and have a modern Node.js:
corepack enable
# clone the web client and run it:
git clone --recursive https://github.com/sloga-mcp/sloga-frontend sloga-web
cd sloga-web
# refer to sloga-web/README.md for startup, creating an account and logging in
When signing up, go to http://localhost:14080 to find confirmation/password reset emails.
To stop all services, hit (CTRL + c) in the terminal you ran mise start and run mise docker:stop
Deployment Guide
Cutting new crate releases
Begin by bumping crate versions:
just patch # 0.0.X
just minor # 0.X.0
just major # X.0.0
Then commit the changes to package files.
Proceed to publish all the new crates:
just publish
Cutting new binary releases
Tag and push a new release by running:
just release
If you have bumped the crate versions, proceed to GitHub releases to create a changelog.
Testing
First, start the required services:
docker compose up -d
Now run tests for whichever database:
TEST_DB=REFERENCE cargo nextest run
TEST_DB=MONGODB cargo nextest run
Leftover test databases
With TEST_DB=MONGODB every harness creates a throwaway database — a
revolt_test_<n> per TestHarness::new(), and a crates_<path>:<line> per
database_test!. Both delete their own database when they finish, whether the
test passed or panicked.
Two cases still leave databases behind:
- A test that nextest SIGKILLs for overrunning
terminate-after(.config/nextest.toml) runs no destructors. database_test!names its database after its own line number, so moving an invocation orphans the old database — no later run regenerates that name, so nothing will ever collect it.
Sweep both with:
scripts/drop-test-databases.sh
Worth doing if the suite starts failing broadly for no apparent reason: at 1191
leftover databases mongod was slow enough that harness startup alone exceeded
the 50s kill threshold, and a full delta run failed across unrelated modules in
a way that looked like a mass code regression. scripts/drop-test-databases.sh --dry-run lists what is there without touching anything. The sweep only ever
matches the two harness naming patterns, so the production revolt database is
never a candidate.
License
The Sloga backend is generally licensed under the GNU Affero General Public License v3.0.
Individual crates may supply their own licenses!