Self-hosted team collaboration platform with a Rust backend and a Vue web client.
rustchat targets two audiences:
- Contributing developers who want to build a Mattermost-compatible server in Rust.
- Self-hosting operators who want to run their own collaboration stack.
This README is intentionally explicit about:
- what is implemented,
- what is partial,
- what is not implemented,
- what was actually verified in this workspace.
If a capability is uncertain, it is marked as partial or unverified.
Project maturity:
- Active development / pre-release.
- No production-ready claim is made here.
Verification snapshot executed in this workspace:
cd backend && cargo check-> PASScd frontend && npm run build-> PASScd backend && cargo test --no-fail-fast -- --nocapture-> PARTIAL/FAIL (unit tests passed; many integration tests failed due missing DB bootstrap/test env)BASE=http://127.0.0.1:3000 ./scripts/mm_compat_smoke.sh-> FAIL (target not running)BASE=http://127.0.0.1:3000 ./scripts/mm_mobile_smoke.sh-> FAIL (target not running / no compatibility preflight)
- Rust backend (
Axum + Tokio + SQLx) underbackend/. - Web app (
Vue 3 + TypeScript + Pinia) underfrontend/. - Push notification proxy service under
push-proxy/. - PostgreSQL + Redis + S3-compatible object storage integration.
- Native API surface under
/api/v1for first-party web features. - Mattermost compatibility surface under
/api/v4with broad route coverage. - v4 compatibility behavior includes:
X-MM-COMPAT: 1response header on v4 routes.- Explicit
501 Not Implementedfallback for unsupported v4 routes.
Evidence:
- WebSocket endpoint for Mattermost-style clients at
/api/v4/websocket. - Separate legacy/first-party websocket surface exists (
/api/v1/ws). - Calls plugin route surface under
/api/v4/plugins/com.mattermost.calls/*. - Calls state backends:
memory(single-node)redis(shared control-plane state)auto(Redis-first with fallback)
Evidence:
backend/src/api/v4/websocket.rsbackend/src/api/ws.rsbackend/src/api/v4/calls_plugin/mod.rsdocs/calls_deployment_modes.md
- Production-mode validation enforces stricter security constraints (JWT issuer/audience, HTTPS requirements, restricted legacy token transport).
- Environment-based CORS behavior (development vs production).
Evidence:
- Some v4 modules intentionally return
501for selected endpoints (examples: parts of plugins, dialogs, custom profile, selected system/calls plugin-management paths). - Several v4 domains expose placeholder-style responses for now (notably parts of OAuth app/outgoing connection management and some command/bot mutation paths).
Evidence:
backend/src/api/v4/plugins.rsbackend/src/api/v4/dialogs.rsbackend/src/api/v4/custom_profile.rsbackend/src/api/v4/oauth.rsbackend/src/api/v4/commands.rsbackend/src/api/v4/bots.rs
- Multi-node control-plane call state is available in Redis mode.
- SFU media plane is still instance-local (no fully distributed media fabric claim).
Evidence:
- Full integration test confidence requires a correctly bootstrapped test DB/Redis/S3 test environment.
- Compatibility smoke checks require a live running backend exposing
/api/v4.
Compared with typical Mattermost-compatible deployments, rustchat explicitly differs in these areas:
- Rust-first server implementation
- The backend is implemented in Rust rather than Go.
- Dual API strategy
- Maintains native
/api/v1plus compatibility/api/v4in the same server.
- Compatibility signaling discipline
- v4 explicitly advertises compatibility with
X-MM-COMPAT: 1and uses explicit501fallback for unsupported routes.
- Command invocation policy in product UX
- Primary command invocation is keyboard-first (
Ctrl/Cmd+Kon desktop,^ktoken in composer/mobile-typed input). - Slash-command-first UX is intentionally not the primary entry path.
Evidence:
Use rustchat if you want:
- self-hosted collaboration infrastructure,
- Rust backend stack,
- gradual Mattermost client compatibility.
Do not treat this repository as production-ready by default unless your own deployment gates are green (tests, smoke checks, security hardening, operational monitoring).
You will work on:
- strict API contract behavior for compatibility-sensitive endpoints,
- websocket and calls parity details,
- incremental replacement of partial/stubbed routes,
- CI/test hardening for confidence.
- Docker + Docker Compose
.envfile with required secrets
cp .env.example .envSet at minimum:
RUSTCHAT_JWT_SECRETRUSTCHAT_JWT_ISSUERRUSTCHAT_JWT_AUDIENCERUSTCHAT_ENCRYPTION_KEYRUSTCHAT_S3_ACCESS_KEYRUSTCHAT_S3_SECRET_KEYRUSTFS_ACCESS_KEYRUSTFS_SECRET_KEY
docker compose up -d --buildDefault endpoints:
- Web UI:
http://localhost:8080 - Backend:
http://localhost:3000 - Postgres:
localhost:5432 - Redis:
localhost:6379 - S3 API (RustFS):
localhost:9000
BASE=http://127.0.0.1:3000 ./scripts/mm_compat_smoke.sh
BASE=http://127.0.0.1:3000 ./scripts/mm_mobile_smoke.shcd backend
cargo fmt
cargo clippy --all-targets --all-features -- -D warnings
cargo check
cargo test --no-fail-fast -- --nocaptureIf integration tests need dependencies:
docker compose up -d postgres redis rustfsOr deterministic integration profile:
docker compose -f docker-compose.integration.yml up -d
export RUSTCHAT_TEST_DATABASE_URL=postgres://rustchat:rustchat@127.0.0.1:55432/rustchat
export RUSTCHAT_TEST_REDIS_URL=redis://127.0.0.1:56379/
export RUSTCHAT_TEST_S3_ENDPOINT=http://127.0.0.1:59000
export RUSTCHAT_TEST_S3_ACCESS_KEY=minioadmin
export RUSTCHAT_TEST_S3_SECRET_KEY=minioadmincd frontend
npm ci
npm run buildOptional E2E:
npm run test:e2erustchat/
├── backend/ Rust API server (v1 + v4 + websocket + calls)
├── frontend/ Vue web client
├── push-proxy/ Push notification proxy
├── scripts/ Compatibility and operational smoke scripts
├── tools/mm-compat/ Compatibility extraction/report tooling
├── docs/ Operator/developer architecture and runbooks
└── previous-analyses/ Historical compatibility analysis artifacts
- Architecture
- WebSocket Architecture
- Calls Deployment Modes
- Running Environment
- Operations Runbook
- Security Deployment Guide
- Admin Guide
- User Guide
- Contributing
- Security Policy
MIT - see LICENSE.