No description
  • Rust 99.5%
  • HTML 0.5%
Find a file
2026-02-19 21:08:02 -06:00
migrations feat(users): add custom status + custom status expiration 2026-02-15 00:39:22 +00:00
src did a bit of phase 4, websocket, heartbeats, typing indicators and such... 2026-02-19 21:08:02 -06:00
templates/email email verification with templates 2026-01-22 14:34:40 -05:00
.env.example implement local and s3 storage backends; add base URL configuration and update avatar handling (patch /me/avatar) 2026-02-05 22:13:56 +03:00
.gitignore Initial commit 2026-01-17 15:05:57 -05:00
.gitlab-ci.yml Initial commit 2026-01-17 15:05:57 -05:00
Cargo.lock impl server middleware to check wheather the user is actually in the server before performing any actions like creating an invite 2026-02-06 17:24:26 +03:00
Cargo.toml impl server middleware to check wheather the user is actually in the server before performing any actions like creating an invite 2026-02-06 17:24:26 +03:00
LICENSE Update LICENSE 2026-02-14 18:06:03 -05:00
README.md did a bit of phase 4, websocket, heartbeats, typing indicators and such... 2026-02-19 21:08:02 -06:00
routes.md did a bit of phase 4, websocket, heartbeats, typing indicators and such... 2026-02-19 21:08:02 -06: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