VNOX-Server/docs/06-roadmap.md
loki5512344 c18ccadf99
chore(server): checkpoint deployed services and unfinished forums
User requested a checkpoint and stopped all agents. Deployed artifacts remain the last verified releases; unfinished settings/categories/forums are preserved as WIP. See TODO/roadmap for verification and remaining release/updater work.
2026-11-01 15:31:20 +01:00

355 lines
17 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Roadmap
## Active request 2026-11-01: account presence and profiles
- [ ] Correct multi-session account presence: one visible member per account,
preserve membership/presence until its last relevant session leaves, and test
two sessions closing in either order.
- [ ] Define profile/avatar propagation to desktop before protocol additions;
browser login must not leave the desktop showing a disconnected local profile.
- [ ] Client remembers successful server selection and reconnects after account
restoration; visual QA must run only on an isolated virtual display/profile.
## Active request 2026-11-01: image/GIF attachments
- [ ] Specify durable image/GIF upload, download, ownership, access checks,
storage quotas and bounded decoding before implementation/protocol changes.
- [ ] Implement authenticated attachment persistence and client clipboard image
uploads with preview/cancel; receivers must actually obtain the uploaded media.
- [ ] Add bounded direct-HTTPS image/GIF display in chat, with animation and
failures handled without blocking the UI.
- [ ] Deferred: voice messages, explicitly excluded from the current request.
## Active request 2026-11-01: desktop account enforcement
- [ ] Specify desktop authorization/device enrollment, proof binding to the
client's Ed25519 identity, gateway issuer trust, expiry/revocation and outage
behavior before implementation.
- [ ] Require an authenticated Central account in both the desktop connection
flow and gateway admission; a client-only gate is insufficient.
- [ ] Bump LNEx version for breaking admission/handshake changes and update tests.
- [ ] Preserve browser sessions and show own/generated VNOX avatars in the site
header; uploads remain bounded, re-encoded and served from Hub storage.
- [ ] Validate deployment and new desktop installation before declaring complete.
Updated: 2026-10-25. Historical phase checklists below are not release acceptance
criteria. For actual behavior and limitations, see [current status](00-status.md).
## Audit 2026-11-01: ownership and client administration
See [ownership/admin audit](design/ownership-and-admin-audit.md) for verified code
paths and missing flows. Guild creators already become owners; a VPS operator
does not automatically receive account-level node administration. Ownership
transfer is not implemented. The Slint management UI is incomplete despite the
historical feature checklists below.
- [ ] Specify node-admin enrollment and ownership transfer before LNEx changes.
- [ ] Replace the misleading full-permission `@everyone` owner role with a safe,
explicitly migrated default-role model; do not auto-assign the existing role.
- [ ] Preserve `owner_id` and server-confirmed role/member data in the client and
implement guild, invite, channel and role management screens.
- [ ] Correct `/version` reporting `lnex_version: "1"` for the LNEx v3 gateway.
## Delivered 2026-11-01: public community directory
- [x] Public website `/servers` with RU/EN browsing, search of loaded entries,
address copying and pagination.
- [x] Durable Hub HTTP directory with authenticated submissions and owner-only
removal, bounded fields, unique normalized addresses and independent rate limits.
- [x] Published and checked at `https://central.loki-code.dev/servers`.
Listings are unverified announcements. This does not implement cryptographic
node registration, mandatory Hub login at gateways, ownership transfer or
federation. See [HTTP contract](05-features/hub-server-directory.md).
## Next server milestones
1. Hub account/profile foundation: email and GitHub browser sign-in, own avatar API,
and unique handle selection API are implemented. Add browser onboarding and a
separately specified desktop authorization/device-enrollment flow next.
2. Define how community gateways verify Hub account/device proofs, including
revocation, migration from local identities and Hub outages. Mandatory Hub login
is not enforced today. Document the LNEx contract before implementation.
3. Define profile/avatar distribution to other clients, cache invalidation and
visibility policy. Current Hub own-avatar API does not synchronize desktop avatars.
4. Implement authenticated separate-process gateway/voice-node signaling. The
combined `serverd` already has an in-process credential bridge.
5. Implement and verify off-host paired issuer/database backups and 30-day rotation
for deleted account/avatar data. Current deployment notes describe a foundation
snapshot, not ongoing backup assurance.
### Completed in this server batch
- [x] Authenticated `PUT /v1/account/profile` with Origin/CSRF checks and bounded body.
- [x] Case-insensitive unique permanent handle selection and editable display name.
- [x] Registration-completion flag in session/login responses and migration for existing accounts.
- [x] Validation, rate limits and tests for concurrent claims and stale sessions.
---
## Phase 1 — MVP
Goal: a working voice + chat system you can actually use.
### Server
- [x] LNEx v1 protocol spec
- [x] Gateway: auth, sessions, channels, text chat
- [x] Voice node: authenticated encrypted UDP relay with per-sender jitter buffers
- [x] SQLite storage: message history, user records
- [x] Docker + systemd deployment ([Dockerfile](../Dockerfile), [docker-compose.yml](../docker-compose.yml))
- [x] config.toml reference ([configuration.md](../03-server/configuration.md), [dev/README.md](../../dev/README.md))
### Client
- [x] Identity: keypair generation, Ed25519 auth
- [x] Node switcher — bookmarks with save/remove
- [x] Channel list: text + voice
- [x] Text chat
- [x] Voice chat: push-to-talk, VAD, always-on modes
- [x] Noise suppression (RNNoise, feature-gated)
- [x] Settings: voice, audio, network, identity, keybinds
- [x] Latency indicator
### Protocol
- [x] Packet format finalized (JSON framing in Phase 1)
- [x] Error codes documented
---
## Phase 1.1 — Hardening & Core Features
Goal: production-safe for small private communities.
### Encryption (Priority 1) ✅ DONE
- [x] Replace plaintext with ChaCha20-Poly1305 on all packets
- [x] X25519 ECDH key exchange during HELLO handshake (UDP/E2EE only; TCP moved to TLS 1.3 in LNEx v3)
- [x] HKDF-SHA256 key derivation (client→server / server→client keys)
- [x] Encrypted TCP (control) + UDP (voice) paths
- [x] Forward secrecy via ephemeral session keys
- [x] Session nonce management for replay protection
All traffic is now encrypted. See [features/encryption.md](05-features/encryption.md).
### Direct Messages ✅ DONE
- [x] New packet type: `DM_MESSAGE` (separate from `CHAT_MESSAGE`)
- [x] Gateway routing: create private DM channel on first message
- [x] DB schema: `direct_messages` + `dm_messages` tables
- [x] UI: DM list in sidebar (like Discord)
- [x] Unread count tracking
- [x] Message sync to both participants
- [x] DM history search bar
See [features/direct-messages.md](05-features/direct-messages.md). **Backend and UI complete.**
### Private Mode ✅ DONE
- [x] Config flag: `[federation] enabled = false` / `[server] mode = "private"`
- [x] Server cannot see or reach other servers when private
- [x] No federation packets sent
- [x] Makes VNOX safe for single-server deployment (OwnCord-style)
### UI Refresh
- [x] Evaluate Slint vs egui: migrated to Slint
- [x] Custom dark theme with accent color support (#E67E22 orange)
- [x] Redesigned channel list and user bar
- [x] Consistency pass across all settings panels
- [x] Slint migration done (client UI is native Slint)
### Client Polish
- [x] Audio device labels in settings (live cpal enumeration)
- [x] Opus bitrate slider (8–128 kbps)
- [x] Jitter buffer size and adaptive mode
- [x] Per-user volume control (client-side mix)
- [x] Keybind recording UI (capture keystroke, not type string)
---
## Phase 1.2 — Community Foundation
Goal: guilds, roles, permissions, presence layer.
### Community Model (Priority 1) ✅ DONE
- [x] Guild system: create, list, delete, settings
- [x] Role system with permission bits (u64)
- [x] Permission resolution (owner → admin → roles → channel overrides)
- [x] Invite system: permanent and temporary
- [x] Guild member management: join, leave, kick
- [x] Audit log for admin actions
- [x] Invite accept popup dialog
- [x] Guild header with member count and Leave button
### Direct Messages UI ✅ DONE
- [x] DM list in sidebar (per-user, not per-guild)
- [x] DM conversation panel (similar to channel chat)
- [x] Unread badges and notification dots
- [x] Search DM history
- [x] Per-conversation volume controls
### Presence System ✅ DONE
- [x] Status types: ONLINE, IDLE, DO_NOT_DISTURB, OFFLINE, INVISIBLE
- [ ] Activity status: playing, listening, watching, streaming — **deferred**
- [ ] Custom status text — **deferred**
- [x] Broadcast on login/logout
- [x] Clickable status cycler in user bar
### Friends System ✅ DONE
- [x] Friend requests
- [x] Friends list with Online / All / Pending / Blocked tabs
- [x] Pending count badge on Friends tab
- [x] Block list (placeholder UI)
- [x] Friend notifications (incoming request badge)
- [x] Add Friend popup with user-id input
- [x] Per-friend DM shortcut and remove button
### UI Refresh ✅ DONE
- [x] Sidebar restructure for guilds + DMs
- [x] Guild switcher (vertical icons on left)
- [x] Role color display in user mentions
- [x] Category collapsing
- [x] Right-hand member list panel (online/offline per channel)
---
## Phase 1.3 — Advanced Features
Goal: typing indicators, read receipts, typing states.
### Typing & Read Status ✅ DONE
- [x] Typing indicators in text channels
- [x] Read receipts per message
- [x] Last read pointer storage
- [x] Multi-user typing indicator ("Alice and Bob are typing...")
### Voice Improvements ✅ DONE
- [x] Speaking indicators with volume levels
- [x] Voice activity detection (local visualization — green dot/border on speaking)
- [x] Adaptive bitrate negotiation
- [x] Voice activity banner ("you are talking" / "someone is talking")
### Client Polish ✅ DONE
- [x] Message reactions (emoji)
- [x] Message editing (with "(edited)" marker)
- [x] Message deletion with confirmation
- [x] Per-user volume control (client-side mix)
---
## Phase 2
Goal: scalability, federation preparation, advanced security.
### Server
- [x] TLS 1.3 on TCP control plane (LNEx v3, see 02-protocol/tls.md)
- [ ] Permission system enforcement in gateway
- [ ] Rate limiting refinement
- [ ] PostgreSQL backend (sqlx support ready, config not exposed yet)
- [ ] Prometheus metrics on gateway and voice-node
- [x] Gateway HTTP health/version/metrics foundation (full management API remains separate work)
- [x] Identity keypair encryption at rest (Argon2id passphrase)
### Protocol
- [x] Protobuf schemas (replacing JSON)
- [ ] E2EE for direct messages (optional)
- [ ] E2EE for private channels (opt-in)
- [ ] Voice regions: Warsaw, Frankfurt, Amsterdam, London, New York, Singapore
### Client
- [ ] Seed phrase backup UI
- [ ] Keyfile export / import
- [ ] Per-user volume control (client-side mix)
- [ ] Overlay: Windows, Linux X11, speaking indicators, mute/deafen state
### Federation Foundation
- [ ] LNEx federation protocol spec
- [ ] Node-to-node handshake and mutual auth
- [ ] Federation discovery (DNS SRV)
### Plugins Foundation
- [ ] Plugin runtime (Deno or QuickJS — decision required)
- [ ] WebSocket RPC API v1
- [ ] Plugin manifest and permissions
- [ ] Example plugins: moderation bot, music bot
---
## Phase 3
Goal: federation ecosystem and mobile clients.
### Federation
- [ ] Text chat bridging between nodes
- [ ] Voice relay across nodes
- [ ] Channel bridging
- [ ] Federation admin controls (trust levels, denylist)
- [ ] Shared user directory
### Plugins Ecosystem
- [ ] Plugin installer in client
- [ ] Community plugin registry (basic)
- [ ] Advanced plugins: relay-switcher, analytics, moderation suite
### Mobile
- [ ] Stack decision (Flutter / React Native / Native)
- [ ] MVP: connect, text, voice, push-to-talk
- [ ] Identity import from desktop (QR / keyfile)
---
## Future ideas (unscheduled)
Spatial audio for games, adaptive bitrate relay, distributed mesh,
VNOX SDK (Rust → TypeScript → Python), offline message queue.
## Account presence and Central member profiles (2026-11-01)
- [ ] Keep authenticated Central account IDs separate from Ed25519 device IDs. Channel subscriptions and voice routes remain session/device scoped; account member rows aggregate devices. Closing either of two sessions must retain the other session, member and online presence.
- [ ] Distribute Central-signed display names and same-origin avatar paths in additive member metadata; fetch bounded PNGs without forwarding credentials, cache successful results, and retain initials on errors. Preserve guild ownership and historical device IDs.
- [ ] Verify two-device and repeated-device lifecycle, profile propagation and rejected avatar origins with regression tests.
## Desktop Central avatar correction (2026-11-01)
- [x] Refresh and persist the Central summary at admission and bounded background/profile-view refresh; deliver updates to UI without reading credentials every tick. Drop late results after logout or enrollment replacement.
- [x] Restore desktop photo choose/crop/upload/delete against Central enrollment-authenticated endpoints. Reuse normalized PNG storage/default avatar and account/IP budgets; no browser cookie or profile migration 6.
- [x] Verify website-avatar refresh, authenticated PNG upload/delete, device binding, expired/revoked secrets, invalid image limits, and summary/UI propagation.
- [x] Add desktop editable Central display_name with signed enrollment-authorized profile mutation, existing 64-character/control validation, persisted summary/watch update and name-adjacent Save/status controls. Unique handle and ownership IDs remain unchanged.
Desktop name/photo mutations update the own account UI and persisted enrollment immediately. Live signed profile propagation below supersedes the original admission-only peer refresh limitation; no forced reconnect is used.
## Live signed Central profile propagation (2026-11-01)
- [x] Implement additive ProfileUpdate/ProfileUpdated after the documented contract: verify issuer/device/account/lifetime, guard monotonic issued_at, update only profile metadata and target currently authorized shared-channel peers.
- [x] Verify chat/voice refresh with two clients and no disconnect or membership changes; preserve ownership, device IDs, roles and UDP routes.
## Explicit node administrator capability (2026-11-01)
- [x] Validate gateway.admin_account_ids UUID allowlist at startup; Session.node_admin advertises only global channel CRUD. Match verified account_id, preserve guild permissions and bootstrap channel IDs.
- [x] Regression checks authorized account/second device, nonadmin and cross-guild denial; metadata fanout and persistent global channel reload.
- [x] Negotiate Session.live_profiles (field 5): legacy v4 gateways receive no ProfileUpdate packets and no profile-based activity delay; capable gateways retain proof-before-action ordering.
## Node settings, categories and real forums (2026-11-01)
- [ ] Follow [node feature contract](02-protocol/node-features.md) before implementation: negotiated capabilities/client feature report, persisted name/description and same-scope one-level layout.
- [ ] Add category grouping and real topics/replies with correlated errors, idempotent stable mutation IDs, bounded reads and preserved guild permissions.
- [ ] Reject category joins/unsupported forum chat mutations; dissolve category grouping and refuse destructive nonempty forum/guild deletion.
- [ ] Verify authenticated admin controls, persistence/restart, cross-scope denial, legacy visibility, no voice capture, topic/post isolation and concurrent/idempotent requests.
## Контрольная точка: остановлено по просьбе пользователя — 2026-11-01
Все три агента остановлены. Работающие версии оставлены установленными:
- Client: `20261101-f16a49f9c678` (218 тестов, 2 ignored, Clippy проходил).
- Gateway VPS: `20261101-live-capability-219376accf98`.
- Central: `20261101-live-admin-91595d45652a`; Web: `20261101-names-monsters-ff473f423565`.
- Аккаунт `loki` имеет права управления глобальными каналами узла.
В коммитах сохранён НЕЗАВЕРШЁННЫЙ следующий этап, не опубликованный в production:
- меню заголовка/ПКМ, настройки имени/описания узла, категории и форумы;
- серверное хранилище уже имеет 6 проходивших focused-регрессий, но общий
финальный client/server build и интеграционная проверка ещё не завершены.
- версии/автообновление/релиз Linux+Windows пока только запланированы.
Продолжение: сначала завершить сборку и общие тесты текущего черновика, затем
проверить voice relay/чат/форумы в изолированной среде, собрать и развернуть;
после этого реализовать updater с подписанным manifest и выпустить бинарники
в https://git.wihuk.pro/boba/VNOX-Client.git. Cargo.repository уже исправлен.
Не запускать тестовые приложения на рабочем столе пользователя.