{"id":13467453,"url":"https://github.com/revoltchat/backend","last_synced_at":"2025-05-14T04:07:27.441Z","repository":{"id":37100045,"uuid":"377167386","full_name":"revoltchat/backend","owner":"revoltchat","description":"Monorepo for Revolt backend services.","archived":false,"fork":false,"pushed_at":"2025-05-06T23:55:07.000Z","size":4053,"stargazers_count":1539,"open_issues_count":95,"forks_count":180,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-05-07T00:33:21.944Z","etag":null,"topics":["api","mongodb","redis","revolt","rust"],"latest_commit_sha":null,"homepage":"https://developers.revolt.chat/api/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/revoltchat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"ko_fi":"insertish","custom":"https://wiki.revolt.chat/notes/project/financial-support/"}},"created_at":"2021-06-15T13:11:41.000Z","updated_at":"2025-05-06T19:04:59.000Z","dependencies_parsed_at":"2023-02-16T00:00:43.462Z","dependency_job_id":"e3f0a31c-12cb-45c1-9ddc-7c68a1888e70","html_url":"https://github.com/revoltchat/backend","commit_stats":{"total_commits":1173,"total_committers":24,"mean_commits":48.875,"dds":"0.12361466325660697","last_synced_commit":"8bbb579d23be7bac4dab19e395c612e74d715231"},"previous_names":[],"tags_count":196,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revoltchat%2Fbackend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revoltchat%2Fbackend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revoltchat%2Fbackend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revoltchat%2Fbackend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/revoltchat","download_url":"https://codeload.github.com/revoltchat/backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254069043,"owners_count":22009476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","mongodb","redis","revolt","rust"],"created_at":"2024-07-31T15:00:56.710Z","updated_at":"2025-05-14T04:07:27.422Z","avatar_url":"https://github.com/revoltchat.png","language":"Rust","funding_links":["https://ko-fi.com/insertish","https://wiki.revolt.chat/notes/project/financial-support/"],"categories":["Rust","Applications","应用程序 Applications"],"sub_categories":["Web","网络 Web"],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003e\n  Revolt Backend\n  \n  [![Stars](https://img.shields.io/github/stars/revoltchat/backend?style=flat-square\u0026logoColor=white)](https://github.com/revoltchat/backend/stargazers)\n  [![Forks](https://img.shields.io/github/forks/revoltchat/backend?style=flat-square\u0026logoColor=white)](https://github.com/revoltchat/backend/network/members)\n  [![Pull Requests](https://img.shields.io/github/issues-pr/revoltchat/backend?style=flat-square\u0026logoColor=white)](https://github.com/revoltchat/backend/pulls)\n  [![Issues](https://img.shields.io/github/issues/revoltchat/backend?style=flat-square\u0026logoColor=white)](https://github.com/revoltchat/backend/issues)\n  [![Contributors](https://img.shields.io/github/contributors/revoltchat/backend?style=flat-square\u0026logoColor=white)](https://github.com/revoltchat/backend/graphs/contributors)\n  [![License](https://img.shields.io/github/license/revoltchat/backend?style=flat-square\u0026logoColor=white)](https://github.com/revoltchat/backend/blob/main/LICENSE)\n\u003c/h1\u003e\nThe services and libraries that power the Revolt service.\u003cbr/\u003e\n\u003cbr/\u003e\n\n| Crate              | Path                                               | Description                         |                                                                                                                                                                                                                                                                                                           |\n| ------------------ | -------------------------------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `core/config`      | [crates/core/config](crates/core/config)           | Core: Configuration                 | ![Crates.io Version](https://img.shields.io/crates/v/revolt-config) ![Crates.io Version](https://img.shields.io/crates/msrv/revolt-config) ![Crates.io Version](https://img.shields.io/crates/size/revolt-config) ![Crates.io License](https://img.shields.io/crates/l/revolt-config)                     |\n| `core/database`    | [crates/core/database](crates/core/database)       | Core: Database Implementation       | ![Crates.io Version](https://img.shields.io/crates/v/revolt-database) ![Crates.io Version](https://img.shields.io/crates/msrv/revolt-database) ![Crates.io Version](https://img.shields.io/crates/size/revolt-database) ![Crates.io License](https://img.shields.io/crates/l/revolt-database)             |\n| `core/files`       | [crates/core/files](crates/core/files)             | Core: S3 and encryption subroutines | ![Crates.io Version](https://img.shields.io/crates/v/revolt-files) ![Crates.io Version](https://img.shields.io/crates/msrv/revolt-files) ![Crates.io Version](https://img.shields.io/crates/size/revolt-files) ![Crates.io License](https://img.shields.io/crates/l/revolt-files)                         |\n| `core/models`      | [crates/core/models](crates/core/models)           | Core: API Models                    | ![Crates.io Version](https://img.shields.io/crates/v/revolt-models) ![Crates.io Version](https://img.shields.io/crates/msrv/revolt-models) ![Crates.io Version](https://img.shields.io/crates/size/revolt-models) ![Crates.io License](https://img.shields.io/crates/l/revolt-models)                     |\n| `core/permissions` | [crates/core/permissions](crates/core/permissions) | Core: Permission Logic              | ![Crates.io Version](https://img.shields.io/crates/v/revolt-permissions) ![Crates.io Version](https://img.shields.io/crates/msrv/revolt-permissions) ![Crates.io Version](https://img.shields.io/crates/size/revolt-permissions) ![Crates.io License](https://img.shields.io/crates/l/revolt-permissions) |\n| `core/presence`    | [crates/core/presence](crates/core/presence)       | Core: User Presence                 | ![Crates.io Version](https://img.shields.io/crates/v/revolt-presence) ![Crates.io Version](https://img.shields.io/crates/msrv/revolt-presence) ![Crates.io Version](https://img.shields.io/crates/size/revolt-presence) ![Crates.io License](https://img.shields.io/crates/l/revolt-presence)             |\n| `core/result`      | [crates/core/result](crates/core/result)           | Core: Result and Error types        | ![Crates.io Version](https://img.shields.io/crates/v/revolt-result) ![Crates.io Version](https://img.shields.io/crates/msrv/revolt-result) ![Crates.io Version](https://img.shields.io/crates/size/revolt-result) ![Crates.io License](https://img.shields.io/crates/l/revolt-result)                     |\n| `delta`            | [crates/delta](crates/delta)                       | REST API server                     | ![License](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue)                                                                                                                                                                                                                                |\n| `bonfire`          | [crates/bonfire](crates/bonfire)                   | WebSocket events server             | ![License](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue)                                                                                                                                                                                                                                |\n| `services/january` | [crates/services/january](crates/services/january) | Proxy server                        | ![License](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue)                                                                                                                                                                                                                                |\n| `services/autumn`  | [crates/services/autumn](crates/services/autumn)   | File server                         | ![License](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue)                                                                                                                                                                                                                                |\n| `daemons/crond`    | [crates/daemons/crond](crates/daemons/crond)       | Timed data clean up daemon server   | ![License](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue)                                                                                                                                                                                                                                |\n| `daemons/pushd`    | [crates/daemons/pushd](crates/daemons/pushd)       | Push notification daemon server     | ![License](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue)                                                                                                                                                                                                                                |\n\n\u003c/div\u003e\n\u003cbr/\u003e\n\n## Minimum Supported Rust Version\n\nRust 1.86.0 or higher.\n\n\u003e [!CAUTION]\n\u003e The events server has a significant performance regression between Rust 1.77.2 and 1.78.0 onwards, see [issue #341](https://github.com/revoltchat/backend/issues/341). This is currently solved by build time options but we are looking for a proper fix.\n\n## Development Guide\n\nBefore contributing, make yourself familiar with [our contribution guidelines](https://developers.revolt.chat/contrib.html) and the [technical documentation for this project](https://revoltchat.github.io/backend/).\n\nBefore getting started, you'll want to install:\n\n- Rust toolchain (rustup recommended)\n- Docker\n- Git\n- mold (optional, faster compilation)\n\n\u003e A **default.nix** is available for Nix users!\n\u003e Just run `nix-shell` and continue.\n\nAs a heads-up, the development environment uses the following ports:\n\n| Service                   |      Port      |\n| ------------------------- | :------------: |\n| MongoDB                   |     27017      |\n| Redis                     |      6379      |\n| MinIO                     |     14009      |\n| Maildev                   | 14025\u003cbr\u003e14080 |\n| Revolt Web App            |     14701      |\n| RabbitMQ                  | 5672\u003cbr\u003e15672  |\n| `crates/delta`            |     14702      |\n| `crates/bonfire`          |     14703      |\n| `crates/services/autumn`  |     14704      |\n| `crates/services/january` |     14705      |\n\nNow you can clone and build the project:\n\n```bash\ngit clone https://github.com/revoltchat/backend revolt-backend\ncd revolt-backend\ncargo build\n```\n\nA default configuration `Revolt.toml` is present in this project that is suited for development.\n\nIf you'd like to change anything, create a `Revolt.overrides.toml` file and specify relevant variables.\n\n\u003e [!TIP]\n\u003e Use Sentry to catch unexpected service errors:\n\u003e\n\u003e ```toml\n\u003e # Revolt.overrides.toml\n\u003e [sentry]\n\u003e api = \"https://abc@your.sentry/1\"\n\u003e events = \"https://abc@your.sentry/1\"\n\u003e files = \"https://abc@your.sentry/1\"\n\u003e proxy = \"https://abc@your.sentry/1\"\n\u003e ```\n\n\u003e [!TIP]\n\u003e If you have port conflicts on common services, you can try the following:\n\u003e\n\u003e ```yaml\n\u003e # compose.override.yml\n\u003e services:\n\u003e   redis:\n\u003e     ports: !override\n\u003e       - \"14079:6379\"\n\u003e\n\u003e   database:\n\u003e     ports: !override\n\u003e       - \"14017:27017\"\n\u003e\n\u003e   rabbit:\n\u003e     ports: !override\n\u003e       - \"14072:5672\"\n\u003e       - \"14672:15672\"\n\u003e ```\n\u003e\n\u003e And corresponding Revolt configuration:\n\u003e\n\u003e ```toml\n\u003e # Revolt.overrides.toml\n\u003e [database]\n\u003e mongodb = \"mongodb://127.0.0.1:14017\"\n\u003e redis = \"redis://127.0.0.1:14079/\"\n\u003e\n\u003e [rabbit]\n\u003e port = 14072\n\u003e ```\n\nThen continue:\n\n```bash\n# start other necessary services\ndocker compose up -d\n\n# run everything together\n./scripts/start.sh\n# .. or individually\n# run the API server\ncargo run --bin revolt-delta\n# run the events server\ncargo run --bin revolt-bonfire\n# run the file server\ncargo run --bin revolt-autumn\n# run the proxy server\ncargo run --bin revolt-january\n# run the push daemon (not usually needed in regular development)\ncargo run --bin revolt-pushd\n\n# hint:\n# mold -run \u003ccargo build, cargo run, etc...\u003e\n# mold -run ./scripts/start.sh\n```\n\nYou can start a web client by doing the following:\n\n```bash\n# if you do not have yarn yet and have a modern Node.js:\ncorepack enable\n\n# clone the web client and run it:\ngit clone --recursive https://github.com/revoltchat/revite\ncd revite\nyarn\nyarn build:deps\necho \"VITE_API_URL=http://local.revolt.chat:14702\" \u003e .env.local\nyarn dev --port 14701\n```\n\nThen go to http://local.revolt.chat:14701 to create an account/login.\n\nWhen signing up, go to http://localhost:14080 to find confirmation/password reset emails.\n\n## Deployment Guide\n\n### Cutting new crate releases\n\nBegin by bumping crate versions:\n\n```bash\njust patch # 0.0.X\njust minor # 0.X.0\njust major # X.0.0\n```\n\nThen commit the changes to package files.\n\nProceed to publish all the new crates:\n\n```bash\njust publish\n```\n\n### Cutting new binary releases\n\nTag and push a new release by running:\n\n```bash\njust release\n```\n\nIf you have bumped the crate versions, proceed to [GitHub releases](https://github.com/revoltchat/backend/releases/new) to create a changelog.\n\n## Testing\n\nFirst, start the required services:\n\n```sh\ndocker compose -f docker-compose.db.yml up -d\n```\n\nNow run tests for whichever database:\n\n```sh\nTEST_DB=REFERENCE cargo nextest run\nTEST_DB=MONGODB cargo nextest run\n```\n\n## License\n\nThe Revolt backend is generally licensed under the [GNU Affero General Public License v3.0](https://github.com/revoltchat/backend/blob/master/LICENSE).\n\n**Individual crates may supply their own licenses!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevoltchat%2Fbackend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevoltchat%2Fbackend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevoltchat%2Fbackend/lists"}