No description
  • Rust 99.5%
  • HTML 0.5%
Find a file
2026-03-01 18:22:48 -05:00
.cargo add CONTRIBUTING.md 2026-02-22 19:15:34 -05:00
migrations administrator bit, update readme 2026-03-01 18:14:45 -05:00
src broadcast profile changes from update_me, update_avatar, delete_avatar 2026-03-01 18:22:48 -05:00
templates/email email verification with templates 2026-01-22 14:34:40 -05:00
.env.example redis stuff 2026-02-26 21:33:50 +03:00
.envrc add dev env flake 2026-02-26 15:32:08 +03:00
.gitignore redis stuff 2026-02-26 21:33:50 +03:00
.gitlab-ci.yml add CONTRIBUTING.md 2026-02-22 19:15:34 -05:00
Cargo.lock update deps 2026-02-28 17:49:24 +03:00
Cargo.toml redis stuff 2026-02-26 21:33:50 +03:00
CONTRIBUTING.md add CONTRIBUTING.md 2026-02-22 19:15:34 -05:00
flake.lock add dev env flake 2026-02-26 15:32:08 +03:00
LICENSE Update LICENSE 2026-02-14 18:06:03 -05:00
README.md update todo 2026-02-28 21:06:50 +03:00
routes.md broadcast profile changes from update_me, update_avatar, delete_avatar 2026-03-01 18:22:48 -05:00
rustfmt.toml Initial commit 2026-01-17 15:05:57 -05:00

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