The serverside code powering Rapture.
  • Rust 93.3%
  • HTML 5.6%
  • Shell 0.5%
  • Dockerfile 0.3%
  • Python 0.2%
Find a file
Misofist 9d1ab757db
Some checks failed
Docker Publish / Publish Docker images (push) Successful in 44m48s
Documentation / Build Docusaurus (push) Successful in 3m30s
Rust build, test, and generate specification / Rust project (push) Failing after 5m22s
Merge remote-tracking branch 'stoatchat/main'
2026-04-03 01:29:43 +11:00
.config Increase timeout window for database creation 2026-03-17 21:55:24 +11:00
.github Merge remote-tracking branch 'stoatchat/main' 2026-03-28 15:01:17 +11:00
.mise Merge remote-tracking branch 'stoatchat/main' 2026-04-03 01:29:43 +11:00
.vscode refactor(pushd): add non-panic error handling to all queue consumers 2025-05-13 10:41:03 +01:00
crates Merge remote-tracking branch 'stoatchat/main' 2026-04-03 01:29:43 +11:00
docs Rename repo from Stoat to Rapture 2026-03-26 22:58:31 +11:00
scripts Improve build performance 2026-03-20 02:59:59 +11:00
.dockerignore feat: new CI pipeline [skip ci] 2022-06-02 12:17:30 +01:00
.gitignore feat: voice chats v2 (#414) 2025-11-12 21:27:04 +00:00
.release-please-manifest.json chore(main): release 0.12.0 (#602) 2026-03-28 22:22:37 -07:00
Cargo.lock Fix/release please fix 4 (#703) 2026-03-28 23:05:01 -07:00
Cargo.toml Still more fixes for Forgejo Compatibility 2026-03-19 22:12:22 +11:00
CHANGELOG.md chore(main): release 0.12.0 (#602) 2026-03-28 22:22:37 -07:00
clippy.toml refactor: tests for more group routes 2023-09-22 19:04:17 +01:00
compose.yml feat: update livekit (#698) 2026-03-27 21:14:22 -07:00
default.nix chore: switch to mise for tooling & update crates for publishing (#494) 2026-01-21 23:41:58 +00:00
deny.toml chore: clarify cargo deny / tomls 2025-02-18 11:53:21 +00:00
Dockerfile fix: use Rust 1.92.0 for Docker build (#503) 2026-01-25 21:03:34 +00:00
Dockerfile.useCurrentArch fix: use Rust 1.92.0 for Docker build (#503) 2026-01-25 21:03:34 +00:00
git-town.toml feat: appeal to the almighty Spamhaus (#524) 2026-02-10 20:46:49 +00:00
LICENSE chore: relicense some core crates to MIT 2024-06-09 13:47:22 +01:00
livekit.example.yml feat: voice chats v2 (#414) 2025-11-12 21:27:04 +00:00
README.md Merge remote-tracking branch 'stoatchat/main' 2026-04-03 01:29:43 +11:00
release-please-config.json Fix: release please bs 2 electric boogaloo (#701) 2026-03-28 22:42:13 -07:00
Revolt.toml Remove reliance on local.revolt.chat hostname 2026-03-17 21:54:16 +11:00
rust-toolchain.toml feat: repository architecture for files crate w. added tests (#498) 2026-01-25 20:32:22 +00:00
version.txt chore(main): release 0.12.0 (#602) 2026-03-28 22:22:37 -07:00

Stoat Backend

Stars Forks Pull Requests Issues Contributors License

The services and libraries that power the Stoat service.

Crate Path Description
core/config crates/core/config Core: Configuration Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/database crates/core/database Core: Database Implementation Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/files crates/core/files Core: S3 and encryption subroutines Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/models crates/core/models Core: API Models Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/permissions crates/core/permissions Core: Permission Logic Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/presence crates/core/presence Core: User Presence Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/result crates/core/result Core: Result and Error types Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/coalesced crates/core/coalesced Core: Coalescion service Crates.io Version Crates.io Version Crates.io Version Crates.io License
delta crates/delta REST API server License
bonfire crates/bonfire WebSocket events server License
services/january crates/services/january Proxy server License
services/gifbox crates/services/gifbox Tenor proxy server License
services/autumn crates/services/autumn File server License
daemons/crond crates/daemons/crond Timed data clean up daemon server License
daemons/pushd crates/daemons/pushd Push notification daemon server License

Minimum Supported Rust Version

Rust 1.86.0 or higher.

Development Guide

Before contributing, make yourself familiar with our contribution guidelines and the technical documentation for this project.

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-shell to activate mise.

As a heads-up, the development environment uses the following ports:

Service Port
MongoDB 27017
Redis 6379
MinIO 14009
Maildev 14025
14080
Revolt Web App 14701
RabbitMQ 5672
15672
crates/delta 14702
crates/bonfire 14703
crates/services/autumn 14704
crates/services/january 14705
crates/services/gifbox 14706

Now you can clone and build the project:

git clone https://babel.heavendivided.net/HeavenDivided/rapture-backend.git rapture-backend
cd rapture-backend
mise install
mise build

Tip

You can override BUILDER in your .env file 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://abc@your.sentry/1"
events = "https://abc@your.sentry/1"
files = "https://abc@your.sentry/1"
proxy = "https://abc@your.sentry/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 = 14072

And 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://babel.heavendivided.net/HeavenDivided/rapture-web.git rapture-web
cd rapture-web
# refer to rapture-web/README.md for startup, creating an account and loging 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

License

The Rapture backend is generally licensed under the GNU Affero General Public License v3.0.

Individual crates may supply their own licenses!