@@ -11,17 +11,20 @@ Small, private chat + voice for 4–6 people on one VPS. No data gathering, full
1111 **In:**
1212 - Server-side accounts, invite-only.
1313 - Text channels and 1-on-1 DMs with persisted history (IRC-like), GFM markdown, multiline compose, mentions, message editing and deletion.
14+- Text and voice channels created and deleted from the sidebar; the seeded channels are permanent.
1415 - Image attachments (raster only), stored on disk.
1516 - Voice channels, ephemeral (not recorded), with mute, deafen, per-peer volume, mic processing, a level-based noise gate, and a join/leave tone.
1617 - Screen sharing into a voice channel, with tab/system audio, simulcast, and a 720p/1080p quality choice.
18+- 1-on-1 voice and video calls inside a DM, with a ring tone the callee can switch off.
1719 - Presence: online/offline, plus who is in each voice channel without joining.
1820 - Client themes, font size, per-user voice settings.
1921 - One server per deployment, seeded with one text and one voice channel.
2022
2123 **Out (now):**
2224 - Large scale, multi-node, clustering.
23-- Recording, video.
24-- Message search, channel CRUD.
25+- Recording, and video outside DM calls.
26+- Group calls; only 1-on-1 calls exist.
27+- Message search.
2528 - Email, OAuth, passkeys.
2629 - Backups.
2730 - Password reset via email (admin resets manually).
@@ -46,7 +49,7 @@ Split:
4649 - Revoke = delete the row.
4750 - Passwords hashed with argon2id.
4851 - Login → session cookie (`HttpOnly`, `Secure`, `SameSite=Lax`), 30-day TTL, server-side session row. Cookie value is HMAC-signed.
49-- Server mints a short-lived LiveKit token when a voice channel is joined.
52+- Server mints a short-lived LiveKit token when a voice channel or DM call is joined.
5053 - Rate limit login and invite-claim endpoints (per IP).
5154 - No email. Admin resets passwords by hand.
5255
@@ -58,28 +61,29 @@ WAL mode, `busy_timeout`. One file, the only state; uploaded media lives in the
5861 users (id, username, pass_hash, created_at)
5962 invites (token, created_by, expires_at, used_by, used_at)
6063 sessions (id, user_id, expires_at)
61-channels (id, type, name, position, created_at) -- type: text | voice | dm
64+channels (id, type, name, position, permanent, created_at) -- type: text | voice | dm
6265 messages (id, channel_id, user_id, body, created_at, edited_at)
6366 reactions (message_id, user_id, reaction)
6467 read_state (user_id, channel_id, last_read_message_id, updated_at)
6568 ```
6669
6770 - Messages are returned joined with their author's username.
68-- Seed: one text channel `#general`, one voice channel `general`.
71+- Seed: one text channel `#general` and one voice channel `general`, both marked permanent.
6972 - DMs: `type = 'dm'` channels with canonical name `u:<min_id>:<max_id>`, resolved to the peer's username for each participant.
7073 - Uploaded images: random names, raster only (no SVG/HTML), served with `nosniff`.
7174
7275 ## Behavior
7376
74-- **Channels:** seeded (`#general` text, `general` voice) plus on-demand 1-on-1 DMs opened by clicking a user. Ordered by `position`. Public channel CRUD is out of scope.
77+- **Channels:** seeded (`#general` text, `general` voice, both permanent) plus on-demand 1-on-1 DMs opened by clicking a user. Text and voice channels can be created and deleted from the sidebar; permanent channels cannot be deleted, and a voice channel cannot be deleted while someone is in it. Ordered by `position`.
7578 - **Text:** GFM markdown; single newlines are hard breaks. Messages persist; live append over WS. Rendered as timestamp, author, content.
7679 - **Mentions:** `@username` highlights the message for that user; typing `@` opens an autocomplete.
7780 - **Unread:** `read_state` stores each user's last-read message per channel; `/channels` returns the count of newer messages by others. Opening a channel marks it read, so the count survives reload and is shared across devices.
78-- **Commands:** `/me <action>` renders an emote as `* user action`; `/collapse` hides images in the current channel; `/gif [query]` opens a picker with the top Giphy results (trending when no query) to insert one.
81+- **Commands:** `/me <action>` renders an emote as `* user action`; `/collapse` hides images in the current channel; `/gif [query]` opens a picker with the top Giphy results (trending when no query) to insert one. The gif picker is disabled without `IRVC_GIPHY_API_KEY`.
7982 - **Images:** pasted or attached, uploaded, rendered inline with a click-to-zoom dialog. Collapsible per message or channel-wide. Gifs from Giphy can also be inserted with the gif picker.
8083 - **Voice:** joining a voice channel connects to its LiveKit room (`voice-<id>`). Not persisted, not recorded. Occupants are visible to everyone without joining.
84+- **Calls in DMs:** a DM holds a 1-on-1 voice or video call. It reuses the voice-token path — a DM call mints a token for the DM's own room — so a call is the same LiveKit machinery as a voice channel, attached to the DM instead. Starting one rings the peer with a slow repeating `beep()` (toggleable in settings) and signals them over the WS. Only one capture at a time, so starting a DM call leaves any voice channel first. The call pane is a horizontal split: peers' cameras fill the top, the …
8185 - **Screen share:** any participant may publish a screen share (with tab or system audio) into the room. It is not persisted and not recorded. Shares are visible only to participants, not to the rest of the server. Share audio plays through the normal audio path, so deafen and per-peer volume apply.
82-- **Voice controls:** mute, deafen, per-peer volume, mic/speaker device, quality preset, echo cancellation, noise suppression, auto gain, voice isolation, level-based noise gate, join/leave tone, start/stop screen share. Deafen still only silences incoming audio locally; its state is shared, nothing else.
86+- **Voice controls:** mute, deafen, camera on/off, per-peer volume, mic/speaker device, quality preset, echo cancellation, noise suppression, auto gain, voice isolation, level-based noise gate, join/leave tone, ring tone, start/stop screen share. Deafen still only silences incoming audio locally; its state is shared, nothing else.
8387 - **Presence:** a user is online while their WS connection is up; otherwise offline. Voice occupancy rides along with presence, and so does each occupant's mute/deafen state, so everyone sees who cannot hear or be heard without joining the call. A user with several connections counts as muted or deafened only when all of them are. No invisible mode.
8488 - **Settings:** colors, font size, and voice preferences are client-side (device-local). Voice occupancy is server-side only.
8589
@@ -103,12 +107,12 @@ read_state (user_id, channel_id, last_read_message_id, updated_at)
103107 - Layout:
104108 - Left sidebar: text channels, voice channels (with occupants), DMs, then users
105109 (online/offline). Fixed on desktop, a drawer with a scrim on mobile.
106- - Focus pane: chat for the selected text channel or DM, the settings pane, or a screen share.
110+ - Focus pane: chat for the selected text channel or DM, a DM call, the settings pane, or a screen share.
107111 - Header: sidebar toggle (mobile), current channel, channel actions.
108112 - Voice bar: whenever you are in a call — docked in the sidebar on desktop, at the bottom
109- of the screen on mobile — with mute, deafen, screen share, leave, participants and
110- per-peer volume (from the participant's own menu).
111-- Settings pane: mode, palette, per-role colours, text size, sounds, voice-activation
113+ of the screen on mobile — with mute, deafen, camera, screen share, leave, participants
114+ and per-peer volume (from the participant's own menu).
115+- Settings pane: mode, palette, per-role colours, text size, sounds (join/leave, ringing), voice-activation
112116 meter/threshold, devices, quality (audio and screen share), mic processing.
113117
114118 ## Config
@@ -124,11 +128,12 @@ IRVC_LIVEKIT_API_KEY
124128 IRVC_LIVEKIT_SECRET
125129 IRVC_MEDIA_DIR uploaded image storage
126130 IRVC_MAX_UPLOAD max upload bytes
131+IRVC_GIPHY_API_KEY Giphy API key; the gif picker is disabled without it
127132 ```
128133
129134 LiveKit key/secret must match the LiveKit server config and ours. Voice is disabled when the LiveKit vars are unset.
130135
131-Flags mirror these. `irvc invite` creates an invite and prints a `/join?token=...` link; `irvc --gen-secret` prints a random session secret. A Makefile wraps build/test/fmt for Go and npm.
136+Flags exist for the address, DB, media dir, upload size and LiveKit URL; secrets stay environment-only. `irvc invite` creates an invite and prints a `/join?token=...` link; `irvc --gen-secret` prints a random session secret. A Makefile wraps build/test/fmt for Go and npm.
132137
133138 ## Deployment