Crate | Path | Description | |
---|---|---|---|
core/config |
crates/core/config | Core: Configuration | |
core/database |
crates/core/database | Core: Database Implementation | |
core/files |
crates/core/files | Core: S3 and encryption subroutines | |
core/models |
crates/core/models | Core: API Models | |
core/permissions |
crates/core/permissions | Core: Permission Logic | |
core/presence |
crates/core/presence | Core: User Presence | |
core/result |
crates/core/result | Core: Result and Error types | |
delta |
crates/delta | REST API server | |
bonfire |
crates/bonfire | WebSocket events server | |
services/january |
crates/services/january | Proxy server | |
services/autumn |
crates/services/autumn | File server | |
bindings/node |
crates/bindings/node | Node.js bindings for the Revolt software |
Rust 1.76 or higher.
Caution
The events server has a significant performance regression between Rust 1.77.2 and 1.78.0 onwards, see issue #341.
Before contributing, make yourself familiar with our contribution guidelines and the technical documentation for this project.
Before getting started, you'll want to install:
- Rust toolchain (rustup recommended)
- Docker
- Git
- mold (optional, faster compilation)
A default.nix is available for Nix users! Just run
nix-shell
and continue.
As a heads-up, the development environment uses the following ports:
Service | Port |
---|---|
MongoDB | 14017 |
Redis | 14079 |
MinIO | 14009 |
Maildev | 14025 14080 |
Revolt Web App | 14701 |
crates/delta |
14702 |
crates/bonfire |
14703 |
crates/services/autumn |
14704 |
crates/services/january |
14705 |
Now you can clone and build the project:
git clone https://github.com/revoltchat/backend revolt-backend
cd revolt-backend
cargo build
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"
Then continue:
# start other necessary services
docker compose up -d
# run the API server
cargo run --bin revolt-delta
# run the events server
cargo run --bin revolt-bonfire
# run the file server
cargo run --bin revolt-autumn
# run th proxy server
cargo run --bin revolt-january
# hint:
# mold -run <cargo build, cargo run, etc...>
You can start a web client by doing the following:
# 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/revoltchat/revite
cd revite
yarn
yarn build:deps
echo "VITE_API_URL=http://local.revolt.chat:14702" > .env.local
yarn dev --port 14701
Then go to http://local.revolt.chat:14701 to create an account/login.
When signing up, go to http://localhost:14080 to find confirmation/password reset emails.
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
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.
First, start the required services:
docker compose -f docker-compose.db.yml up -d
Now run tests for whichever database:
TEST_DB=REFERENCE cargo nextest run
TEST_DB=MONGODB cargo nextest run
The Revolt backend is generally licensed under the GNU Affero General Public License v3.0.
Individual crates may supply their own licenses!