Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Monorepo for Revolt backend services.

License

NotificationsYou must be signed in to change notification settings

revoltchat/backend

Repository files navigation

The services and libraries that power the Revolt service.

CratePathDescription
core/configcrates/core/configCore: ConfigurationCrates.io VersionCrates.io VersionCrates.io VersionCrates.io License
core/databasecrates/core/databaseCore: Database ImplementationCrates.io VersionCrates.io VersionCrates.io VersionCrates.io License
core/filescrates/core/filesCore: S3 and encryption subroutinesCrates.io VersionCrates.io VersionCrates.io VersionCrates.io License
core/modelscrates/core/modelsCore: API ModelsCrates.io VersionCrates.io VersionCrates.io VersionCrates.io License
core/permissionscrates/core/permissionsCore: Permission LogicCrates.io VersionCrates.io VersionCrates.io VersionCrates.io License
core/presencecrates/core/presenceCore: User PresenceCrates.io VersionCrates.io VersionCrates.io VersionCrates.io License
core/resultcrates/core/resultCore: Result and Error typesCrates.io VersionCrates.io VersionCrates.io VersionCrates.io License
deltacrates/deltaREST API serverLicense
bonfirecrates/bonfireWebSocket events serverLicense
services/januarycrates/services/januaryProxy serverLicense
services/autumncrates/services/autumnFile serverLicense
daemons/crondcrates/daemons/crondTimed data clean up daemon serverLicense
daemons/pushdcrates/daemons/pushdPush notification daemon serverLicense

Minimum Supported Rust Version

Rust 1.86.0 or higher.

Caution

The events server has a significant performance regression between Rust 1.77.2 and 1.78.0 onwards, seeissue #341. This is currently solved by build time options but we are looking for a proper fix.

Development Guide

Before contributing, make yourself familiar withour contribution guidelines and thetechnical documentation for this project.

Before getting started, you'll want to install:

  • Rust toolchain (rustup recommended)
  • Docker
  • Git
  • mold (optional, faster compilation)

Adefault.nix is available for Nix users!Just runnix-shell and continue.

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

ServicePort
MongoDB27017
Redis6379
MinIO14009
Maildev14025
14080
Revolt Web App14701
RabbitMQ5672
15672
crates/delta14702
crates/bonfire14703
crates/services/autumn14704
crates/services/january14705

Now you can clone and build the project:

git clone https://github.com/revoltchat/backend revolt-backendcd revolt-backendcargo build

A default configurationRevolt.toml is present in this project that is suited for development.

If you'd like to change anything, create aRevolt.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.ymlservices:redis:ports:!override      -"14079:6379"database:ports:!override      -"14017:27017"rabbit:ports:!override      -"14072:5672"      -"14672:15672"

And 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

Then continue:

# start other necessary servicesdocker compose up -d# run everything together./scripts/start.sh# .. or individually# run the API servercargo run --bin revolt-delta# run the events servercargo run --bin revolt-bonfire# run the file servercargo run --bin revolt-autumn# run the proxy servercargo run --bin revolt-january# run the push daemon (not usually needed in regular development)cargo run --bin revolt-pushd# hint:# mold -run <cargo build, cargo run, etc...># mold -run ./scripts/start.sh

You can start a web client by doing the following:

# if you do not have yarn yet and have a modern Node.js:corepackenable# clone the web client and run it:git clone --recursive https://github.com/revoltchat/revitecd reviteyarnyarn build:depsecho"VITE_API_URL=http://local.revolt.chat:14702"> .env.localyarn dev --port 14701

Then go tohttp://local.revolt.chat:14701 to create an account/login.

When signing up, go tohttp://localhost:14080 to find confirmation/password reset emails.

Deployment Guide

Cutting new crate releases

Begin by bumping crate versions:

just patch# 0.0.Xjust minor# 0.X.0just 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 toGitHub releases to create a changelog.

Testing

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 runTEST_DB=MONGODB cargo nextest run

License

The Revolt backend is generally licensed under theGNU Affero General Public License v3.0.

Individual crates may supply their own licenses!

About

Monorepo for Revolt backend services.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

[8]ページ先頭

©2009-2025 Movatter.jp