This commit is contained in:
Meghdad committed 2026-11-01 19:43:03 +03:30
commit 22fe85bb92
247 files changed
+35538

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
# App icons
VoxHarbor's orange waveform mark is provided as local assets for browser tabs, bookmarks and home-screen shortcuts:
- `/favicon.svg`: scalable browser favicon.
- `/favicon.ico`: 16, 32 and 48 pixel fallback images.
- `/favicon-16x16.png` and `/favicon-32x32.png`: PNG favicon fallbacks.
- `/apple-touch-icon.png`: opaque 180 pixel Apple touch icon.
- `/icons/app-192.png` and `/icons/app-512.png`: standard app icons.
- `/icons/app-maskable-512.png`: opaque icon with extra padding for platform masks.
- `/icons/safari-pinned-tab.svg`: monochrome pinned-tab mark.
- `/site.webmanifest`: application name, launch location, colors and home-screen icons.
The assets are linked from the document head and explicitly served by the HTTP adapter. Both application and deployment content policies allow the same-origin manifest. They require no sign-in or external asset requests.
Regenerate the artwork with `npm run icons:build`. The generator uses Node built-ins and the same waveform geometry for its SVG, PNG and ICO outputs. Generated assets are checked into the source tree as project files, so deployment does not require an image-processing dependency.
The manifest supplies shortcut/standalone presentation metadata; it does not add offline support, a service worker or a guarantee of installability on every browser. Accounts, identities and connections retain their existing backend ownership and storage rules.
+25
View File
@@ -0,0 +1,25 @@
# Architecture
- `public/`: account workspace, session/recovery controller, AudioWorklets and Opus worker. No default destination, account, private key or server password is bundled.
- `src/http-adapter.mjs`: account-isolated HTTP/WebSocket boundary, origin/CSRF checks, limits and fail-closed session revalidation.
- `src/auth/`: atomic username registration, scrypt verification, account-bound expiring cookies, Redis account/session records and server-selected workspace scoping.
- `src/preferences.mjs`: encrypted backend connection/bookmark settings, metadata redaction and revision checks.
- `src/identity/`: authenticated encryption, create-if-absent identity persistence and explicit import/export/rewrap.
- `src/protocol/`: typed controls/events, per-account lease, server acknowledgements and audio gates.
- `src/transport/destination.mjs`: public-address validation and DNS pinning.
- `src/platform/`: bounded private stdio supervision. Native children receive no deployment-secret environment variables.
- `native/`: pinned Rust tsclientlib bridge. The native child signs/encrypts the actual full TS3 protocol; ServerQuery is not used as a voice substitute.
`api/server.mjs` exports the Node server for Vercel; `scripts/dev.mjs` binds locally. Production uses the owner's Redis REST integration and rejects volatile memory. Cookies are HttpOnly/SameSite=Strict, Secure and `__Host-` scoped on HTTPS. WebSocket upgrades require account auth and exact origin; controls require CSRF. Revocation/storage failures close active transports. Frames, rates, state, audio queues and pending commands are bounded.
Connection settings are encrypted before a connect command. A socket references an opaque settings ID; the backend retrieves credentials and pins the public destination. Settings changes from another session for the same account cannot redirect a stale reconnect silently. The native session rotates at 240 seconds within the configured 300-second Function boundary. A renewed Redis lease limits overlapping identity use; abandoned leases expire after 35 seconds. Recovering a socket does not preserve UDP state or audio capture.
## Protocol source
The selected adapter is ReSpeak/tsclientlib, pinned by source archive revision/digest in `native/vendor/provenance.json` with Cargo lockfiles. Source and declaration snapshots are retained with their licenses. TS3J was considered but would require an independently proven JVM runtime/package. No claim is made that selecting a library establishes full feature parity.
Recorded vendor patches expose encoded audio while retaining transport crypto/permission behavior, and use bounded 2048-ID command reordering with duplicate suppression. The original archive digests and patches distinguish this source from unmodified upstream. The codec stays in the browser; native libopus/OpenSSL codec defaults are disabled.
See [verification scope](FEASIBILITY.md), [audio constraints](AUDIO.md), [identity recovery](IDENTITY.md) and [feature matrix](FEATURE_MATRIX.md). Historic private transport/account evidence is intentionally outside the public repository.
User record prefixes and authenticated encryption associated data both bind records to an account. Legacy owner keys/envelopes remain unchanged. HTTP request bodies never select an account scope. See [multi-user storage and rollout](MULTIUSER.md).
+21
View File
@@ -0,0 +1,21 @@
# Experimental Opus audio
The browser uses 48 kHz AudioWorklets and the pinned `libopus-wasm` worker. Opus Voice (4) and Opus Music (5) with 20 ms frames are supported; outgoing capture is mono. Other codecs/frame durations are rejected. No media leaves until the owner explicitly enables listening, enables the microphone, and permits transmission with push-to-talk or voice activation.
Incoming speakers have independent decoders, 60 ms initial jitter buffering, at most 12 queued packets, FEC/PLC and bounded mixing. Three misses end a talk spurt. There are at most 32 active speakers; idle decoder state expires. Capture credits, worker queues, native stdin, WebSocket backlogs and playback queues are bounded; stale frames are dropped. These are implementation limits, not an end-to-end audio-quality guarantee. TCP/WebSocket head-of-line blocking remains a limitation.
Input/output start muted on new sessions. Disconnect, logout, hidden pages, input/device loss and suspended audio stop transmission. During automatic reconnection, listening resumes if it was enabled. The microphone resumes only when it was enabled and the user checked “Resume my enabled microphone after automatic reconnect.” These choices live only in the current signed-in page; reload/sign-out clears them. Hiding the page cancels pending recovery and mutes the microphone. Manual disconnect, successful channel changes, device errors and sign-out clear recovery. A denied channel join preserves current audio. Push-to-talk never restores a held press. Browser restrictions can still require a manual audio enable action. Pending permission/initialization work cannot resurrect a stopped instance. Concurrent startup shares codec initialization; participant volume chosen before startup is retained. Per-user gain is bounded from 0 to 2.
PTT works while the page has focus; it is not a global shortcut. Echo cancellation, noise suppression and gain control are requested from the browser. Output selection depends on `AudioContext.setSinkId`. A browser that cannot provide the required 48 kHz worklet is rejected; resampling is not implemented. Safari, Firefox, Bluetooth, mobile suspension, actual microphone hardware and audible browser playback need separate testing.
## Verification
`npm test` covers actual Opus encoding/decoding, independent speaker decoding/mixing, loss and sequence wrapping, malformed frames, bounded queues, PTT release and lifecycle races. Worklet processor tests do not simulate browser scheduling.
For a silent browser test, run `npm run audio:qa`, open the local address it prints and choose **Run silent pipeline test**. This uses generated audio, real worklets and the actual worker/codec with deliberate losses. It requests no microphone, emits silence to hardware and contacts no TeamSpeak server. Reports are synthetic diagnostics, not a real conversation pass.
Before cleanup, a private deployment passed generated two-way audio through a real authorized TS3 server and a second native client. Frame counts were bounded-window observations, not loss/latency benchmarks. Real microphone capture, browser speaker audibility, multiple live speakers and official-client conversational interoperability remain unverified. To test them, use an authorized test channel and consenting participants; never record voice contents or broadcast test tones into an unsuspecting channel.
## Connection diagnostics
Connection diagnostics → Download JSON (or account settings → Diagnostics) exports the last 1,000 bounded events for this signed-in page. It records native session status (including the current 240-second session cap), socket close codes, connection duration, time since the last message, heartbeat round-trip times, retry delays/attempts, protocol error codes and browser online/visibility changes. The log excludes server addresses, account identifiers, close-reason text, credentials, messages and media. It remains in memory, clears on sign-out/reload, and is never automatically uploaded. Download it after a problem and before reloading. A close code alone does not prove the underlying network or hosting cause.
+164
View File
@@ -0,0 +1,164 @@
# VoxHarbor — Capabilities and Requirements
## Product scope
VoxHarbor is a browser-based TeamSpeak 3 client. Users register on an independently operated instance and connect to existing TeamSpeak servers. Each user has a separate account, TeamSpeak identity, saved connections and nickname.
VoxHarbor accounts are separate from TeamSpeak identities and vendor accounts. Access to server functions depends on the connected server and the permissions assigned to the user's identity.
## Current capabilities and functional requirements
### Accounts and sessions
- Register with a username, password and password confirmation when registration is enabled.
- Sign in with an existing username and password.
- Sign out and revoke the current application session.
- Keep each account's identity, connections and saved data separate from other accounts.
- Support closed registration while allowing existing users to sign in.
- Preserve the reserved legacy `owner` account.
- Handle invalid credentials, duplicate usernames, registration closure, request limits, expired sessions and unavailable account storage.
- Clear account-specific session data when signing out or changing accounts.
| Field | Requirement |
| --- | --- |
| Username | 3–32 characters; letters, numbers, underscores or hyphens; starts with a letter or number; case-insensitive |
| Password | 16–256 characters for registration |
| Password confirmation | Must match the registration password |
Email collection, email verification, password recovery, multi-factor authentication and account deletion are not currently available.
### TeamSpeak identity
- Explicitly create a persistent TeamSpeak identity or import an existing identity file.
- Retain the same identity across sign-ins, browser sessions and application deployments.
- Access the identity's public UID and security level.
- Export a private identity backup.
- Preserve an existing identity rather than silently replacing it.
- Support server-required identity security-level increases without changing the identity's UID.
- Distinguish a missing identity from an unreadable identity, failed import, storage failure or unavailable identity service.
- Require an identity before connecting to a TeamSpeak server.
### Connections and saved destinations
- Connect to a TeamSpeak server using an address, voice port and nickname.
- Support an optional server password, destination channel ID and channel password.
- Save connection settings and passwords encrypted on the backend for the authenticated account.
- Create, name, edit, select and delete saved connections.
- Retain saved connections and nicknames across sign-ins.
- Preserve saved passwords when no replacement is supplied for the same destination.
- Explicitly remove saved passwords.
- Keep saved passwords from being reused for a different destination after an address or channel change.
- Disconnect an active connection or stop an ongoing connection attempt.
- Support one active TeamSpeak connection per account. Separate accounts have independent connections.
- Restrict destinations to permitted public IPv4 addresses and voice ports from 1024 to 65535.
### Server, channels and participants
- Synchronize the connected server's name, channel hierarchy and visible participants.
- Search channels and participants.
- Access channel names, topics, password requirements, subscriptions and codec information.
- Access participant names, channel membership, mute states, away messages and speaking activity where available.
- Distinguish the current user and their current channel.
- Join another channel, including password-protected channels when authorized.
- Subscribe to and unsubscribe from channel updates when permitted.
- Change the current nickname.
- Set an away message and return from away status.
- Retain acknowledged nickname and channel changes in the backend connection settings for recovery.
### Voice communication
- Receive and transmit audio in Opus Voice and Opus Music channels.
- Enable and disable listening independently from microphone activation.
- Enable and mute the microphone.
- Support push-to-talk and hands-free voice activation.
- Adjust the voice activation threshold.
- Select an available microphone.
- Select an audio output device where the browser supports it.
- Adjust individual participants' playback volume from 0% to 200%.
- Track local transmission and remote speaking activity.
- Request browser-supported echo cancellation, noise suppression and automatic gain control.
- Handle denied microphone permission, missing devices, device changes, suspended audio and unsupported codecs.
- Start new sessions with listening and the microphone off.
- Stop microphone transmission when the page is hidden, the connection ends, the user signs out or an audio/device failure occurs.
- Restrict push-to-talk keyboard operation to the focused page; no global shortcut is available.
### Automatic recovery and audio choices
- Attempt bounded automatic recovery after recoverable connection interruptions.
- Reuse the account's existing identity and backend-saved connection settings.
- Recheck account authentication during recovery.
- Restore listening after automatic reconnection when it was previously enabled.
- Resume a previously enabled microphone only when the user has explicitly opted into automatic microphone recovery.
- Retain transmission mode, threshold and selected devices during automatic recovery within the same signed-in page.
- Cancel pending audio recovery on manual disconnect, sign-out, channel changes, device errors or page hiding.
- Never restore a previously held push-to-talk press.
- Start with audio off after reload or a new sign-in.
- Handle browser restrictions that prevent automatic audio resumption.
### Text communication and participant contact
- Send and receive channel, server and private text messages when permitted.
- Send and receive participant pokes when permitted.
- Associate private conversations with the intended participant.
- Distinguish pending actions, confirmed actions, denied actions and unconfirmed results.
- Do not automatically resend messages or participant actions after a timeout or disconnect.
- Keep messages in the current browser session, with a maximum of 200 retained entries.
- Clear messages on sign-out. Durable message history is not available.
### Connection diagnostics
- Record connection status changes, native session-limit events, socket close codes, connection duration and retry attempts/delays.
- Record heartbeat round-trip timing, time since the last transport message, protocol error codes and browser network/visibility changes.
- Export diagnostic data as a JSON file.
- Retain up to 1,000 events in memory for the current signed-in page.
- Clear diagnostics on reload or sign-out.
- Exclude server addresses, account identifiers, passwords, private identity material, messages and audio contents.
- Do not automatically upload diagnostic logs.
## Required operational states
- Signed out; registering; signing in; authenticated; session expired or revoked.
- Registration available or closed.
- No identity; identity available; identity operation pending; identity operation failed.
- No saved connection; saved connections available; settings being saved; conflicting or stale settings; settings storage failure.
- Disconnected; connecting; connected; reconnecting with a retry delay; network offline; recovery exhausted; connection rejected.
- Connection already active for the account.
- Live server data available; no participants; no search matches; previously received data no longer live.
- Listening off or on; microphone off, ready, idle or transmitting; microphone permission pending or denied.
- Unsupported channel codec; unavailable audio device; audio initialization or recovery failure.
- Action pending, confirmed, denied by server permissions, timed out or interrupted.
## Privacy and data requirements
- Require authentication for private account data and server actions.
- Keep private identities and connection credentials encrypted in durable backend storage.
- Keep credentials out of URLs, ordinary account responses and browser local storage.
- Restrict private identity export to an explicit action by the authenticated account.
- Preserve saved identities and connections through application updates.
- Stop account activity when its session expires or is revoked.
- Enforce server permissions for every supported action.
- Treat the instance operator as trusted with backend access; encryption at rest does not prevent operator access.
## Planned capabilities — not currently available
| Area | Required capabilities |
| --- | --- |
| Connection history and quality | Durable connection history; connection latency, packet loss and quality information |
| Multiple servers | Concurrent server connections with an explicit active microphone destination and audio routing |
| Advanced voice | Whisper targets, whisper lists and advanced audio routing |
| Channel management | Channel creation, editing, ordering, deletion and password management |
| Moderation | Authorized participant movement, kick, ban, complaints and ban management |
| Groups and permissions | Server groups, channel groups, privilege keys and detailed permission management |
| Files | Channel file browsing, upload, download, folders and deletion |
| Profiles and presence | Descriptions, avatars, badges and icons where supported |
| Server administration | Server information and authorized changes to server settings |
## Compatibility and verification boundaries
- TeamSpeak 3 is the current protocol target.
- Video, screen sharing, newer protocols and proprietary account services remain separate investigations.
- Server-side permissions can prevent otherwise supported operations.
- Native sessions currently have a 240-second lifetime before automatic reconnection; uninterrupted audio across that boundary is not guaranteed.
- Generated two-way Opus audio has been demonstrated through a real server. Actual microphone conversations, audible browser playback and microphone recovery still require live verification.
- Private messaging and poke interoperability remain unverified where server permissions prevented testing.
- Concurrent multi-user voice capacity, broad browser/device compatibility and reliable mobile background audio remain unverified.
+35
View File
@@ -0,0 +1,35 @@
# Deploying an operator-hosted instance
Use your own Vercel project and Redis REST integration. The application targets Node.js 22, Linux native execution, and a finite Function lifetime. This is experimental; verify the deployed account rather than assuming every platform configuration works.
## Private deployment settings
| Variable | Purpose |
| --- | --- |
| `APP_ORIGIN` | Exact HTTPS origin of your application, with no trailing slash/path |
| `OWNER_PASSWORD_HASH` | Optional reserved `owner` login; preserve existing values; generate privately with `npm run owner:hash` |
| `ALLOW_REGISTRATION` | `1` (default) enables signup; `0` closes new signups while existing users can sign in |
| `SESSION_SECRET` | Independent random 32-byte hex secret; keep stable unless revoking all sessions |
| `IDENTITY_ENCRYPTION_KEY` | Independent random 32-byte hex key for identities and connection preferences |
| `UPSTASH_REDIS_REST_URL` + `UPSTASH_REDIS_REST_TOKEN` | A complete owner-controlled Redis REST credential pair |
| `KV_REST_API_URL` + `KV_REST_API_TOKEN` | Alternative Marketplace-provided credential pair; do not mix pairs |
| `IDENTITY_PREVIOUS_ENCRYPTION_KEY` | Only during deliberate encryption-key rotation |
Do not enable `ALLOW_LOCAL_MEMORY_STORE` in production. There is no TeamSpeak host, channel, identity, owner password or Redis endpoint bundled into the source. Earlier experimental `TS3_SERVER_*`, UDP probe and rotation variables are no longer used; configure connections through the authenticated app. Existing unrelated environment values are not modified by this cleanup.
## Build and upload
1. Configure the required private variables. Keep them out of source, issue reports and logs.
2. Run `npm ci`, `npm run check`, `npm test` and `npm run deployment:package` locally.
3. Upload the printed clean source folder to your intended Vercel project. Do not upload the working directory or connect a private evidence folder.
4. Use framework **Other**, Node **22**, and the `vercel.json` build command. The pinned native adapter is built with Cargo's lockfile and packaged for Linux; never upload a local macOS binary.
5. Confirm startup and account isolation on the real URL. Register or sign in, create/import an identity once, then enter and connect to a server you are authorized to use.
6. Confirm the same UID and saved connection survive reload and redeployment. Test audio only in an appropriate authorized channel with consenting participants.
If your account changes Fluid Compute, WebSocket support, execution duration, region, architecture or networking behavior, re-run deployment checks. The configured Function limit is 300 seconds; native sessions rotate at 240 seconds. Recovery interrupts audio and restarts it muted. A dead transport may require waiting for its 35-second ownership lease to expire. One simultaneous native session per account is supported locally; production concurrency/capacity must be verified.
## Operations
Preserve your Redis database and encryption key across redeployments. Do not recreate an identity to hide a decryption/storage error. Account sessions expire after 15 minutes. Restore storage before reconnecting after an outage. See [identity recovery](IDENTITY.md), [workspace storage](WORKSPACE.md) and [testing](TESTING.md).
Read [multi-user rollout](MULTIUSER.md) before opening signup. Preserve the legacy owner records and verify separate users. Encryption-key rotation must cover every account before retiring the previous key.
+27
View File
@@ -0,0 +1,27 @@
# Console workflow implementation
The client follows the supplied Console / Product UI's page structure using separate hash routes. Only short confirmations and pokes are dialogs. All live transport, identity and encrypted storage operations remain attached to the signed-in account.
## Pages and transitions
- **Connections** is the starting page after sign-in. Saved destinations expose nickname, connection status, direct Connect/Open console, Edit and active Disconnect actions. Add opens a complete editor. A backend-saved last connection remains available even without a bookmark. One active server per account is enforced in the interface and backend.
- **Connection editor** keeps name, destination, nickname, optional channel and password handling in one form. Save returns to the destination list. Save & connect saves first and then opens the console. Leaving unsaved edits requires an explicit discard choice. Blank saved passwords retain their existing meaning; the explicit removal control clears them. Delete requires confirmation and never removes the identity.
- **Console** shows the actual current room, participant mixer, conversation and voice panel. The room strip contains only the current and recently visited rooms, capped at four. The complete hierarchy is in All channels. Mixer and compact layouts share playback volume state.
- **Channels** provides ordered hierarchy, parent paths, occupancy, current-room and password labels, and search by room or participant. Selection previews the topic and participants in a separate panel. Previewing does not move the user. A denied join retains current audio; a successful channel change turns audio off. Phone selection brings the preview into view.
- **Private conversations** have a participant/thread list, message pane and recipient playback/poke controls. Selecting a participant binds the recipient to their current ID and UID. Incoming messages have unread counts. Reconnection invalidates recipient bindings; they must be selected again. Returning to the console restores channel conversation scope. Phone participant controls expand separately.
- **Identity** provides distinct creation/import choices for a new account and stored-identity/backup actions once an identity exists.
- **Audio**, **Presence** and **Diagnostics** are individual pages. Navigation does not disconnect the server or reset audio. An active-session ribbon exposes connection/audio state and microphone muting while outside the console.
Browser Back/Forward follows the page routes. Hashes contain page names only; credentials and destinations are not placed in URLs. Editor secrets clear on leaving the editor. Sign-out clears temporary audio, messages, recipients, unread counts and private fields. Messages remain bounded and are not automatically resent. Drafts are kept separately by conversation in bounded page memory, so a private draft never appears in channel chat. They clear on sign-out or a manual server change.
## Assets and responsive behavior
The console palette, locally hosted IBM Plex fonts and exported 22 × 22 microphone/headphone SVGs are retained. Font licenses remain in `public/fonts/OFL.txt`.
Phone layouts adapt the flows: destination actions stay visible, the complete connection form precedes save actions, channel results have bounded scrolling, participant cards become compact rows, and the console keeps accessible voice controls. Notifications are dismissible. All server, room, participant and account data are dynamic; simulation data is confined to local verification fixtures.
## Verification limits
Automated coverage includes large channel lists, hierarchy/participant search, bounded recent-room navigation and route validation, together with the protocol, storage, audio and account regression tests. Browser checks use a disposable simulated backend with 123 channels. They cover direct connections, saving/editing, discard/cancel, channel previews and joins, preserved listening after a denied join, private messaging, audio preferences and phone layouts.
These UI checks do not establish new real microphone/device or TeamSpeak interoperability results. See `AUDIO.md`, `TESTING.md` and `FEASIBILITY.md` for those limits.
+22
View File
@@ -0,0 +1,22 @@
# Feasibility and verification scope
A private owner-operated Vercel deployment demonstrated the following before the public-source cleanup. Raw account screenshots, private deployment URLs/IDs, destination details, UIDs and session evidence are kept outside the public source.
| Area | Observed result | Limits |
| --- | --- | --- |
| Binary WebSocket / outbound UDP | Bidirectional binary transport and validated non-DNS STUN responses | Historical transport experiments; their product endpoints were removed during cleanup |
| Native runtime | Linux x64 Node 22 deployment build and native execution; local macOS build | Re-verify your account/runtime; no universal hosting claim |
| Full TS3 session | Real handshake, authentication, channel and participant synchronization | Existing unmodified authorized TS3 server; newer server features are separate |
| Identity and settings | Same encrypted identity across sign-ins/redeployments; durable encrypted preferences | Production restore/key-rotation drills are not certified |
| Opus | Browser/native peer exchanged generated audio through the real server; nonzero decode/playback energy | No microphone permission requested; local hardware output stayed silent; real capture/browser audibility unverified |
| Recovery | Recovered after the 240-second native cap and deliberate socket loss; identity unchanged and audio off | Roughly 8.5 seconds at cap and 41 seconds after the dropped socket in one final run, including lease expiry; no actual process-kill/server-restart attribution |
| Permissions | Server denied private messages for the test identities | No successful live messaging pass; permissions were preserved |
| Browser rendering | Literal markup-like names/text in an isolated local simulated fixture | Simulation is UI integration evidence, not real messaging interoperability |
The subsequent public-source cleanup replaces environment-based connection defaults and browser-held reconnect credentials with encrypted backend settings and an opaque settings reference. It also removes the superseded echo/STUN product experiments and production test-tone controls. Its current test results are described in [testing](TESTING.md); changes validated locally are not automatically a new production verification pass.
The architecture uses an owner-controlled native Function adapter, not ServerQuery, a vendor gateway, a VPS or a desktop companion. No hard platform prohibition was proven in the tested configuration. Finite Function lifetime still interrupts audio. Local source now supports restoring listening and opt-in microphone recovery; deployment and real-device verification of that change are separate. Comprehensive official-client parity, hardware/browser certification and uninterrupted conversation remain unfinished. See the [feature matrix](FEATURE_MATRIX.md).
Relevant primary platform references: [WebSocket Functions](https://vercel.com/docs/functions/websockets), [Function limitations](https://vercel.com/docs/functions/limitations). Check current documentation and actual account behavior before deploying; historical observations do not override platform changes.
The subsequent multi-user milestone adds registration, account-bound sessions, per-user encrypted records and independent protocol leases. Local tests include separate real native identity generation/export and simultaneous simulated protocol sessions. A production deployment on 2026-11-01 passed two-account registration, distinct native identity creation, connection/bookmark isolation, authenticated WebSocket heartbeat and independent logout/persistence checks, with legacy owner continuity preserved. Real multi-user voice/capacity remains unverified. See [accounts and rollout](MULTIUSER.md).
+27
View File
@@ -0,0 +1,27 @@
# Feature matrix
Statuses distinguish implemented code, observed private-deployment results and pending verification. The public-source cleanup changes connection storage and removes old experiment endpoints; it is not automatically a new production certification.
| Capability | Status / scope |
| --- | --- |
| Registration/login, account isolation, origin/CSRF, revocation | Implemented; local isolation/concurrent simulated session tests and production two-account registration/settings/identity/WebSocket/logout checks; real concurrent native voice/capacity unverified |
| Durable encrypted TS3 identity | Persistence demonstrated across sign-ins/redeployments; import/export/rotation tested locally; official-client restore drill pending |
| Backend connection settings and bookmarks | Implemented; encrypted/redacted, stale-edit and destination isolation tests; cleanup flow verified locally |
| Real TS3 connection / synchronized channels and participants | Demonstrated in a private Vercel deployment |
| Channel/participant search and previews | Implemented; browser checks with real and simulated state |
| Channel movement / subscriptions | Implemented; password-protected self-movement verified; server permissions apply |
| Nickname and away/return | Implemented; previous production server acknowledgements verified |
| Opus send/receive | Generated two-way network audio demonstrated; actual microphone/audible browser conversation unverified |
| PTT, VAD, microphone/output mute, per-user volume | Implemented with codec/worker/lifecycle tests; comprehensive live device verification pending |
| Speaking indicators and bounded queues | Implemented; worker tests and browser integration checks; broader live multi-speaker testing pending |
| Private/channel/server text, poke | Typed acknowledged controls implemented; private live test was server-denied; successful real messaging/poke interoperability remains unverified |
| Responsive workspace and themes | Implemented; partial in-app Chromium narrow/desktop checks; comprehensive accessibility/mobile/browser testing pending |
| Automatic recovery | Native-cap/socket-drop recovery demonstrated; identity retained and audio muted; actual Function kill/server restart unverified |
| Durable connection history / quality metrics | Planned; worker loss counters are not a full TS3 quality dashboard |
| Whisper / advanced routing / concurrent servers | Planned |
| Channel management / moderation / groups / permissions | Planned |
| File browsing/transfer/management | Planned |
| Rich profiles, icons, avatars, badges | Planned |
| Video, screen sharing, newer protocols / proprietary accounts | Separate investigation; no compatibility claim |
A custom client grants no additional server privileges. No control is represented as verified merely because it builds or passes a simulated fixture. The [implementation plan](../IMPLEMENTATION_PLAN.md) remains unfinished.
+36
View File
@@ -0,0 +1,36 @@
# Persistent TeamSpeak identity
The native child inside the owner's Node Function uses tsclientlib to generate a real P-256 TeamSpeak identity and security-level offset, and to sign protocol packets. Node persists each private identity in its account-scoped Redis record (the legacy owner retains `voxharbor:identity:v1:owner`), encrypted with AES-256-GCM and a fresh random 96-bit nonce per write. The envelope has a version, key ID, ciphertext and authentication tag. AAD binds the record to its purpose, account and key ID. Legacy owner associated data remains unchanged.
`IDENTITY_ENCRYPTION_KEY` is a separate 32-byte deployment secret. It is not derived from `SESSION_SECRET`, stored in Redis, inherited by the native child, or sent to the browser. Node decrypts the identity and gives it to the child through private stdin for signing. Those trusted backend components can access private material while active. Ordinary authenticated API responses expose only the signed-in account’s UID, security level and creation time.
Creation/import requires an explicit authenticated, same-origin, CSRF-protected owner action. Atomic create-if-absent prevents concurrent replacement. Storage errors are distinct from missing records; decryption errors stop the operation without regenerating an identity. Counter upgrades must preserve both the private key and UID.
One live protocol session per account is allowed in this milestone. An account-scoped Redis lease renews every ten seconds and expires after 35 seconds if abandoned. Socket closure, account logout/expiration, or lease failure stops the child. Sessions have a deliberate 240-second cap before the configured 300-second Function boundary. Automatic full-protocol recovery at that cap and after an abrupt socket drop is verified in production, as is two-way synthetic Opus through the real server. Actual microphone capture remains unverified. Recovery reuses the identity and loads the current encrypted connection record on the backend through an opaque settings ID. It checks account authentication again and keeps audio muted. Changing connection settings invalidates older recovery IDs. The experimental audio pipeline starts muted and requires explicit user actions.
## Local development
`npm run identity:key` adds a separate key to `.env.local` once, preserving a valid existing value and refusing to silently replace an invalid one. The development web app uses the explicitly volatile memory store unless configured with Redis; its identity will not survive process replacement in that mode. Production rejects volatile storage. Never upload `.env` or `.local` files.
## Backup and recovery
**Export private identity** makes an owner-initiated POST with CSRF and downloads a TeamSpeak-style INI containing a compatible obfuscated identity string. Obfuscation is not encryption; secure that backup. The library export/import round trip preserves UID and level in tests. Direct import into the official client remains unverified.
For infrastructure recovery, back up Redis ciphertext and its encryption secret separately. Both are required. Keep the encryption secret stable across redeployments, Functions and sign-ins. Rotating the login password/session secret revokes sessions without changing the TeamSpeak identity slot.
When storage is unavailable, restore it before reconnecting. When decryption fails, restore the correct secret and ciphertext. Do not generate a new identity to hide the failure; the creation route refuses to replace existing records.
## Deliberate encryption-key rotation
1. Securely back up the current ciphertext and key.
2. Set the new `IDENTITY_ENCRYPTION_KEY` and old `IDENTITY_PREVIOUS_ENCRYPTION_KEY`, then redeploy.
3. As the authenticated owner, POST `/api/identity/rotate` and `/api/preferences/rotate` with the current CSRF header and exact allowed Origin. These authenticate and atomically re-encrypt each record under the new key, preserving the identity key/UID and saved connections. Keep both encryption keys configured if either operation fails.
4. Repeat rewrapping and verification for every account, including dormant accounts, before retiring an old key. The endpoints affect only the signed-in account. Keep both keys until every identity/preference record is rewrapped. Verify UID, connectivity and reopening saved connections; then remove the previous-key variable, redeploy, and retire older deployments retaining old environment values.
Rotation is covered locally; production rotation and restore drills remain pending. Raw keys, import/export contents, passwords, private messages and voice contents remain excluded from logs.
## Saved connection encryption
The client workspace also encrypts owner preferences, current connection settings and bookmarks with the separate identity encryption key, using independent nonces and purpose-specific associated data. Identity and preference records remain separate. During key rotation, keep `IDENTITY_PREVIOUS_ENCRYPTION_KEY` until both records have been rewrapped and verified: use the existing owner-authenticated identity rotation action and POST `/api/preferences/rotate` with the same session/CSRF protection. Verify identity metadata and reopening saved connections before retiring the old key. Do not remove an old key after rewrapping only the identity. See WORKSPACE.md for bookmark credential access and clearing behavior.
See [multi-user storage and key rotation](MULTIUSER.md). The trusted operator controls the shared encryption key; user isolation does not imply encryption from that operator.
+13
View File
@@ -0,0 +1,13 @@
# Manual deployment
Use the complete [deployment guide](DEPLOYMENT.md) for variables and platform constraints.
```sh
npm run deployment:package
```
Upload the generated folder to the intended project in your Vercel account. The allowlist excludes `.env.local`, `.local`, identities, private evidence, editor metadata, dependencies, local binaries and Git metadata. A source manifest records SHA-256 hashes. Build Linux native code on Vercel instead of copying a development binary.
Preserve existing secrets and encrypted records. Never rotate credentials merely to update source. After deployment, sign in as `owner` with the existing password, verify legacy continuity, then test two separate registered accounts and independent logout. See [multi-user rollout](MULTIUSER.md). In each account, open your backend-saved connection, verify identity continuity and test only an authorized destination. No hardcoded test server, channel, password, UID or account is required.
Git operations are separate from this upload workflow. See [public repository preparation](PUBLICATION.md) before publishing source.
+31
View File
@@ -0,0 +1,31 @@
# Accounts and private workspaces
VoxHarbor supports username/password registration on one operator-controlled deployment. Each account has its own TeamSpeak identity, nickname, encrypted current connection, bookmarks, preferences and active protocol lease. Accounts are application accounts, not TeamSpeak/vendor accounts. Server permissions still apply.
## Sign in or register
Choose **Create an account**, enter a username and a password, and confirm the password. Usernames contain 3–32 ASCII letters, numbers, underscores or hyphens, starting with a letter or number. They are case-insensitive and stored lowercase. Passwords contain 16–256 characters and are stored as independently salted scrypt hashes. Registration signs in with a fresh opaque HttpOnly session cookie. Create/import a TeamSpeak identity in your private workspace once; the application never silently creates a replacement identity.
There is no email collection, email verification, password reset, account deletion UI or MFA in this milestone. Keep your password and private identity backup secure. Registration limits and generic login failures follow the principles in the [OWASP authentication guidance](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html). Username availability is observable through registration; usernames are not treated as private email addresses.
## Existing deployment compatibility
The reserved username **owner** uses the existing `OWNER_PASSWORD_HASH`. Existing password-only API login requests remain supported for this account; the browser uses an explicit username. Pre-account owner sessions continue to access only the legacy owner workspace. Existing owner identity/settings records keep their original storage keys, encryption associated data and ciphertext; no migration or key change is needed. Registration can never claim `owner`, even when no owner password is configured. The legacy owner login does not gain an application route to other users' records.
New accounts have random immutable IDs, separate from usernames. Account records are atomically created at `voxharbor:account:v1:<sha256-of-normalized-username>`; each contains its ID, canonical username, password hash and creation time. Account IDs are not accepted from browser requests to choose a workspace. Sessions contain the authenticated account ID and username; the account record is checked again on authenticated requests and active WebSocket revalidation. Missing/corrupt account storage fails closed.
## Storage and encryption boundaries
New users' application records, leases and authenticated rate counters are prefixed by `voxharbor:user:v1:<account-id>:`. The identity/preference envelope's associated data also includes that account ID, so moving ciphertext between accounts cannot decrypt successfully. A shared deployment encryption key is still required; the trusted operator and backend have access to decrypted material while processing a user's request. This is encryption at rest, not end-to-end encryption from the operator.
Only authenticated metadata exposes the current user's UID and connection fields; passwords remain backend-only. Export/import/rotation routes always operate on the session's workspace. Connection IDs from another account cannot select its saved settings. Each account can hold one live native session; separate users have separate leases and may connect concurrently. One account's logout revokes only its presented browser session and stops that session's sockets. Replacing a browser login revokes its previous session. Other tabs receive a sign-in-change notification and clear their workspace.
## Operator configuration and rollout
`ALLOW_REGISTRATION=1` enables public signup and is the default. Set `ALLOW_REGISTRATION=0` to close new signups while preserving existing accounts' sign-in. Registration also requires `IDENTITY_ENCRYPTION_KEY`. `OWNER_PASSWORD_HASH` is optional for new account-based deployments; preserve it unchanged on existing installations. Production still requires HTTPS, a stable session secret and durable Redis; the development memory store loses all accounts and their data when the process stops.
This source change does not modify private environment values, touch existing Redis data or deploy automatically. Before rollout, back up existing ciphertext and its encryption key separately. Verify the legacy owner UID and saved connections, register two disposable test accounts, check identity/connection separation, concurrent protocol sessions, independent logout and persistence across replacement of the deployed application. On 2026-11-01, production checks verified two-account registration, separate native identities/settings, authenticated WebSockets, independent logout and persistence after sign-in, while the legacy owner identity/settings matched a private pre-deployment baseline. Real concurrent TeamSpeak/voice sessions and hosting cost/capacity still need separate verification. Previous single-owner protocol verification is not multi-user voice certification.
Global limits currently allow 10 registration requests and 120 login requests per minute, with a shared per-username limit of 10 authentication requests per minute. Authenticated settings/identity/socket and connect limits are scoped per account. These limits bound an initial rollout; there is no verified capacity guarantee, billing quota system or bot challenge. Closing signup does not disconnect existing accounts.
For encryption-key rotation, every account's identity and preferences must be rewrapped and verified, including the legacy owner. The existing per-account rotation endpoints affect only the signed-in account. Keep the previous key until **all** records have been rewrapped; rotating only the owner and then removing the old key would strand other accounts. Account password hashes do not use the identity encryption key. Rotating `SESSION_SECRET` revokes all application sessions without changing account records or TS3 identities.
+27
View File
@@ -0,0 +1,27 @@
# Preparing a public repository
Intended destination: [MeghdadFadaee/VoxHarbor](https://github.com/MeghdadFadaee/VoxHarbor). Original project code is MIT licensed; third-party notices remain separate.
```sh
npm run check
npm test
npm run publication:check
npm run publication:package
```
The checker reads current source and Git's tracked/unignored candidates, including staged content. It flags private paths, known local secret values (without printing them), credential/private-key formats, personal filesystem paths, private deployment URLs and files outside the source allowlist. Intentional published upstream crypto fixtures are distinguished from local secrets. The unchanged, hash-pinned upstream Opus artifact contains compiler paths from its original build; its provenance is recorded alongside the artifact. Known local secrets and this project’s filesystem path are still checked in every file, including vendored code. A generated source manifest records hashes for review.
The exported folder contains no Git history or metadata. Keep `.env.local`, `.local`, editor settings, dependencies, binaries, raw verification records/screenshots and identity backups out of the public repository. The cleanup privately archives old instance-specific material under `.local/private-archive/`; do not upload that directory. Examples and synthetic test fixtures are not real connection settings.
A scanner is not a guarantee. Review the exact files you stage and any existing Git history. If credentials ever entered history, removing a working file or adding an ignore rule is insufficient: revoke affected credentials and perform a deliberate history cleanup before publication. An empty history avoids that historical exposure, but still inspect the first commit.
## Owner publication steps
Git and GitHub operations are intentionally not automated by these scripts. If your workflow requires read-only Git/GitHub access for the coding agent, you must perform the final operations yourself:
1. Create or verify the intended public GitHub repository. Avoid adding a conflicting initial README/license when the local source is ready.
2. Review `git status`, then stage only reviewed files. Inspect `git diff --cached --stat` and `git diff --cached`; run `npm run publication:check` again so staged bytes are checked too.
3. Commit the reviewed source, set/verify the remote destination, and push it yourself. Do not force-push or rewrite existing history casually.
4. Confirm repository visibility, licensing and that no private configuration/evidence was included.
The clean export is also suitable for starting a separate fresh publication checkout if desired. It is not a reason to upload private local folders or bypass audit findings. The `private: true` flag in package.json prevents accidental npm-registry publication; it does not make a GitHub repository private.
+41
View File
@@ -0,0 +1,41 @@
# Testing
Run `npm ci`, `npm run native:build`, `npm run check` and `npm test`. Automated tests use synthetic credentials, temporary directories, local sockets and simulated native fixtures; they do not contact public TeamSpeak servers. Native identity endpoint tests require the built executable. Mock fixtures are not real server compatibility evidence.
`npm run audio:qa` starts a local silent AudioWorklet/Opus test with deliberately missing packets. It requests no microphone, sends no audio to a server and emits silence to local hardware. Close it after testing.
`node scripts/workspace-render-fixture.mjs` starts a clearly labelled local simulated workspace. Sign in as `owner`; its fixture-only password is in that source. It uses an ephemeral synthetic identity payload, no real TS3 network, and volatile storage. Test message/name markup remains literal text. Enter `quit` to remove its temporary executable and stop it. It is forbidden in production.
For an authorized deployment, configure the connection through its owner UI first. These optional scripts require an explicit HTTPS origin and hidden owner password:
```sh
node scripts/verify-public-deployment.mjs https://your-project.vercel.app
node scripts/verify-production-protocol.mjs https://your-project.vercel.app 45 .local/protocol-result.json
node scripts/verify-recovery.mjs https://your-project.vercel.app 350 .local/recovery-result.json
```
They use the backend-saved connection, do not create/replace an identity, keep audio muted and revoke their own verification sessions. Results may contain private instance metadata: keep them under `.local`, not in a public issue or commit. Do not run concurrent native verification sessions against the same owner lease.
Real voice testing needs another authorized client and a suitable channel whose participants expect testing. Record outcomes/counters, not audio/chat contents. Verify microphone permission, audible receive/send, mute/deafen, denied talk power, devices, multiple speakers, background behavior and reconnects separately. Never infer hardware/browser compatibility from codec tests.
The current cleanup is tested locally; it has not been redeployed automatically. Previous production observations are summarized without private account/destination data in [FEASIBILITY.md](FEASIBILITY.md).
## Public-source cleanup verification
On 2026-10-31, JavaScript syntax checks and all 80 automated tests passed, with no skips. The macOS native release build passed. A disposable simulated workspace verified saving and reloading connection metadata while password inputs remained empty and backend-saved password indicators persisted; browser error logs were empty. The silent browser audio test passed with three simulated speakers, nonzero decoded/playback energy, deliberate packet loss handling and stopped transmission after PTT release. These are local checks, not a deployment or real microphone test.
Account tests cover atomic case-insensitive registration, reserved-owner compatibility, password hashing, session/account binding, ciphertext substitution rejection, independent identity/settings/bookmark/lease/rate scopes, HTTP origin/CSRF, cross-account connection IDs, simultaneous simulated native sessions and independent logout. These do not establish multi-user production capacity.
## Multi-user milestone verification
On 2026-11-01, syntax checks and all 90 automated tests passed, with no skips. New registered accounts generated different real native identities; exports restored to the correct account UID. Browser verification in a disposable volatile fixture confirmed registration, separate identities/bookmarks/default nicknames, restoration after sign-in and cross-tab logout cleanup, with no browser errors. No private environment, existing Redis or actual TeamSpeak server was used in these account tests.
## Production account rollout
On 2026-11-01, the Linux native release build and public HTTP/WebSocket access gates passed after deployment. Two new test accounts registered, generated distinct native identities, retained isolated connections/bookmarks/nicknames, rejected a cross-account connection reference, used authenticated WebSockets, logged out independently and retained identity/settings after signing in again. The legacy owner UID and saved preference digest matched a private baseline from before deployment. Reports and encrypted test-account credentials remain private under `.local`. These checks made no TeamSpeak server connections and transmitted no audio; real multi-user voice and capacity remain unverified.
## Audio recovery and connection diagnostics
The local suite now has 96 passing tests. Recovery tests cover listening/device restoration, microphone opt-in and opt-out, repeated disconnect notifications, muted/background state, cancellation during initialization, automatic-resume failures and diagnostics redaction. Transport fixtures distinguish the native session cap, heartbeat timeout, socket close duration and retry timing. A disposable browser fixture verified the recovery checkbox and sign-out reset without microphone access or TeamSpeak traffic. These are automated and UI checks, not a real microphone recovery pass.
The audio-recovery update was deployed on 2026-11-01. All six changed browser entry/module assets matched the tested source on the public domain, and public authentication/origin/WebSocket gates passed. Actual microphone recovery remains unverified.
+25
View File
@@ -0,0 +1,25 @@
# Workspace and connection storage
The destinations page opens after sign-in. The console shows the current and recently visited rooms, participant playback controls, conversation scopes and a separate voice panel. The full searchable hierarchy and room previews have a dedicated Channels page. Connection editing, private conversations, identity, presence, diagnostics and audio each have a separate page. There are no demonstration people/messages in the product. The default appearance follows the dark console design, with an explicitly saved light theme still supported. See [design implementation](DESIGN_IMPLEMENTATION.md).
## Backend-owned connections
Each user enters a server, voice port, nickname, optional channel and passwords. **Connect** performs an authenticated same-origin CSRF-protected `POST /api/connection`, encrypts the settings, then opens the protocol socket using only the returned opaque connection ID. Native reconnects load those settings from the backend; the browser reconnect controller holds no destination credentials. A stale connection ID cannot silently select settings saved by another session.
Settings/bookmarks use a per-account Redis namespace. The legacy owner retains `voxharbor:preferences:v1:owner`; new accounts add their immutable account prefix and encryption associated data. See [account isolation](MULTIUSER.md). AES-256-GCM uses the separate identity encryption key, independent random nonces and purpose-specific associated data. Identity and preference ciphertext remain separate. Wrong keys/corruption fail closed; unreadable records are never replaced with defaults. The explicit development memory store is volatile.
Ordinary metadata includes only password-presence flags. Opening a bookmark fills public connection fields and passes its ID when connecting; bookmark passwords are resolved on the backend and are never returned by a bookmark credential endpoint. Empty password inputs preserve a current password only for the same server/channel, or select the bookmarked credential. Passwords never follow an edited destination to another server. Use the explicit clear-password control to remove current saved credentials.
Acknowledged nickname/channel changes update the backend connection for recovery. A storage failure after a successful server action is reported separately; the action is not replayed. Bookmark/theme edits use revision checks and preserve omitted secrets. No connection data is stored in localStorage; only the non-sensitive theme is cached there.
## Commands and safety
Typed channel join/subscription, nickname, away, text and poke actions have bounded input and correlated server acknowledgements. Arbitrary protocol names/arguments are rejected. Timeouts and disconnects never automatically resend messages/actions. Private recipients are bound to their public UID when available; channel messages are bound to the channel observed by the user, so reused client numbers or a concurrent move cannot redirect a message silently.
Messages are literal DOM text, bounded to 200 entries in browser memory, and cleared on logout. They are not saved or logged. Diagnostic downloads exclude names, messages, audio, credentials and private keys. Device changes, hidden pages, disconnection and logout stop transmission. Automatic reconnection can restore listening and an explicitly opted-in, previously enabled microphone. Manual disconnect/sign-out clears recovery, and hiding the page cancels pending recovery. Choices live only in the signed-in page; browser restrictions can still require manual audio enablement. See [audio behavior and diagnostics](AUDIO.md).
## Destination policy
The backend validates every connection. It resolves only allowed public IPv4 destinations, rejects private/reserved/metadata addresses and mixed DNS answers, and passes a pinned numeric address to native code. A bookmark is not permission to bypass these checks. The current voice-port policy is 1024–65535. The application is authenticated and operator-hosted; it is not an unauthenticated proxy.
The full [feature matrix](FEATURE_MATRIX.md) remains open. The old production synthetic-tone UI and instance-specific live-test scripts were removed; use the separate silent browser fixture or an authorized two-client manual audio test.