A fully local, offline-friendly, multi-user chat system built with Rust, Warp, and WebSockets.
Featuring multiple themes, a classic/modern hybrid UI, and robust admin tools.
- Real-time Messaging: Instant delivery via WebSockets.
- Rooms: Multiple channels with active member counts.
- Auth: User accounts (Register/Login) and Guest mode.
- Privacy: Secure private messaging (stored separately) and file sharing.
- Persistence: Chat history saved asynchronously (JSON).
- Link Previews: Automatic Open Graph metadata extraction (Title, Description, Image).
- Interactive UI:
- Emoji Picker: Categorized emojis with skin tone support.
- Reactions: React to messages (👍 ❤️ 😂 😮 😢 🎉).
- Mentions:
@usersupport with profile modals. - Typing Indicators: Real-time "User is typing..." status.
- Engagement:
- Nudge:
/nudgecommand to shake the room and play a sound. - Pinned Messages: Pin important messages for easy access.
- Online Status: Auto-away/idle detection.
- Nudge:
- Ease of Use:
- QR Code LAN Connect: Scan terminal QR code to join from mobile.
- PWA: Installable on mobile and desktop devices.
- Shortcuts: extensive keyboard control.
- Safety:
- Profanity Filter: Auto-censoring of banned words.
- Moderation:
/kickcommand for admins.
Switch themes instantly in static/index.html:
| Theme | Description |
|---|---|
| Classic | Newspaper/XP hybrid, serif fonts, blue gradients. (Default) |
| Midnight | Modern dark mode, cyan/purple accents, glow effects. |
<!-- Example: Enable Midnight Theme -->
<link rel="stylesheet" href="css/midnight.css">cargo run --release- Localhost: Visit
http://localhost:8080 - LAN (Mobile): Scan the QR code printed in your terminal.
| Command | Usage | Description |
|---|---|---|
| Identity | /name <name> |
Set your display name. |
| Auth | /register <u> <p> |
Create a new account. |
/login <u> <p> |
Log in to your account. | |
| Chat | /msg <user> <text> |
Send a private message. |
/join <room> |
Switch rooms (e.g., /join tech). |
|
/nudge |
Shake screen & play sound. | |
/pin <msg_id> |
Pin a message to the top. | |
| Info | /who |
List users in current room. |
/stats |
Show server memory & connections. | |
| Admin | /kick <user> |
Kick a user (Admin only). |
| Shortcut | Action |
|---|---|
/ |
Focus text input. |
Esc |
Close modals or sidebar. |
↑ / ↓ |
Navigate command suggestions. |
Tab |
Autocomplete command from suggestion. |
Enter |
Send message. |
The server exposes endpoints for monitoring and health checks:
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Basic status (uptime, client count). |
GET |
/metrics |
Detailed stats (memory usage, total messages, rooms). |
- Backend: Rust (Warp, Tokio)
- State Management:
DashMapfor high-concurrency capability. - Discovery:
mdns-sdfor zero-config LAN discovery.
- State Management:
- Frontend: Vanilla JavaScript (ES6+), Modular CSS.
- No Frameworks: Lightweight and fast.
- Storage: JSON-based flat files with non-blocking async I/O (
tokio::fs).
- Nudge: Added retro shake effect.
- LAN Discovery: Integrated QR code generation.
- Observability: Added
/healthand/metricsAPIs. - Visuals: Polished UI with smooth animations and hover effects.
MIT Read the License