Modern chat platform featuring text channels, community building tools, fine-grained permissions, and complete privacy protection. Open-source and ad-free.

At a Glance:

Stoat Backend is the open-source server-side infrastructure powering the Revolt chat platform, implemented in Rust as a modular collection of services including a REST API, WebSocket events, file storage, proxy servers, and background daemons.

Overview:

Stoat Backend provides the core backend services and libraries for the Stoat service, a chat platform backend. The project is structured as a Rust workspace containing multiple specialized crates that handle API serving, real-time WebSocket events, file storage and encryption, proxying, push notifications, and scheduled maintenance tasks. Its modular architecture separates concerns into distinct services such as a REST API server, a WebSocket events server, a file server with S3-compatible storage and encryption, a proxy server, and background daemon processes for timed cleanup and push notifications. The backend is designed to be run alongside supporting infrastructure including MongoDB, Redis, an S3-compatible object store, and a message broker.

Key Decision Points:

  • Modular Rust architecture: The backend is split into separate crates for REST API, WebSocket events, file handling, proxying, and daemon processes, allowing independent operation and maintenance of each service layer.

  • Infrastructure dependencies: Requires MongoDB, Redis, an S3-compatible object store (such as MinIO for development), and RabbitMQ, which operators need to provision and manage separately.

  • Development environment: Provides a pre-configured development setup with Docker-based supporting services, a default configuration file, and support for optional build tools like mold for faster compilation.

  • Target deployment: Designed as the production backend for a chat service, with documented procedures for releasing crate packages and binary releases via GitHub.

Core Features:

  • REST API server: Provides the main HTTP API for client interaction through the delta crate.

  • WebSocket events server: Handles real-time event delivery to connected clients through the bonfire crate.

  • File storage with encryption: Manages file uploads and storage using S3-compatible backends with encryption support through the files core crate and the autumn file server.

  • Proxy server: Routes and proxies requests through the january proxy service, with a specialized gifbox proxy for Tenor GIF integration.

  • Push notification daemon: Runs as a background service for delivering push notifications to client devices.

  • Scheduled maintenance daemon: Performs timed data cleanup tasks through the crond daemon service.

Use Cases:

  • Chat platform operators: Teams building or operating a self-hosted Revolt chat instance can deploy Stoat Backend as the server-side infrastructure.

  • Backend developers: Developers familiar with Rust and distributed systems can study or contribute to a modular backend architecture for real-time communication services.

Open-Source Alternative Value:

Stoat Backend provides a transparent, source-available server implementation for the Revolt chat platform. Its modular crate-based design allows operators to understand and modify individual service components, such as the API layer, event delivery, file storage, and background processing. Operators can inspect how the backend handles configuration, database interactions, file encryption, and real-time WebSocket communication, and can customize or extend these components independently without depending on a closed-source server implementation.

CondividiXLinkedInReddit

Strumenti correlati

Statistiche progetto

Stelle

3,100

Fork

361

Licenza

Other

Metadati

Alternativa a
Discord