No description
- Rust 99.5%
- HTML 0.5%
| .cargo | ||
| migrations | ||
| src | ||
| templates/email | ||
| .env.example | ||
| .envrc | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| LICENSE | ||
| README.md | ||
| routes.md | ||
| rustfmt.toml | ||
hu backend
minimal chat application backend with dms, servers, channels, and voice chat.
stack
- framework: actix-web
- database: postgresql + sqlx
- auth: hybrid (jwt + refresh tokens)
- ids: ulids
- password hashing: argon2
- storage: s3 or local filesystem
- api: versioned rest (
/v1/...)
setup
cp .env.example .env
# edit .env with your values
cargo run
todo
phase 1 - foundation
- health endpoints
- project structure
- database connection pool
- sqlx migrations setup
- configuration system (env vars)
- error handling
- api versioning (
/v1/) - rate limiting middleware
- per-endpoint rate limits
- rate limit headers
- basic api scaffolding
- general 404
phase 2 - user system
- user model and migrations
- registration endpoint (with auto-login)
- login endpoint
- jwt access tokens (short-lived)
- refresh tokens (stored in db, max 10 per user)
- logout / token revocation
- basic user profile (
/users/me,/users/{id}) - input validation and trimming
- auth event logging
- email verification (optional, configurable)
- user settings (theme, allow_dms, typing indicators, public_email, language, timezone, allow_friend_requests)
- validate timezone/language values
- profile picture upload (s3/local)
- friend system (requests, unfriend, privacy setting)
phase 3 - servers & channels
- server model and migrations
- create server
- join/leave server
- server invites (create, expiry, max uses)
- server settings (name, icon, description)
- server roles (owner, admin, member)
- channel model and migrations
- create/delete/rename channels
- channel permissions
phase 4 - messaging
- message model and migrations
- dm conversations
- channel messages
- websocket connection handling
- websocket rate limiting
- real-time message delivery
- message editing
- message deleting
- message history / pagination
- message edit history (snapshots)
- file attachments (multipart upload, s3/local)
- typing indicators
phase 5 - presence
- user online/offline status
- custom status messages
- presence broadcasting via websocket
- last seen tracking
phase 6 - voice
- voice channel model
- voice state tracking
- webrtc signaling endpoints
- voice channel join/leave
phase 7 - federation (future)
- add more permissions
- instance identity and keys
- user identity format (@user@instance)
- instance-to-instance protocol
- cross-instance message delivery
- instance discovery and trust