Skip to Content
LYNKORIADocs

Platform audit (2026-11-13)

Features, SDKs, consistency, security, reliability and deployment readiness, with verification results and an honest readiness assessment.

Audit date: 2026-11-13. Scope: the whole repository (API, scanner, console, playground, docs site, SDKs, database, infrastructure templates, CI, documentation). Method: reading code and docs, targeted fixes with tests, a full local verification run and browser checks. No penetration test, deployed environment, physical device or real third-party provider was used. Open items are tracked in the implementation tracker; security findings in the register; styling in the CSS audit.

Summary

The codebase was already mature: tenant isolation, token handling, ordered messaging, presence leases, fail-closed scanning and deployment tooling were implemented and tested against real local infrastructure. The audit found and fixed one high-severity issue (scanned attachments could be swapped before download), two medium issues (spoofable client IP for rate limits; unbounded password hashing), several hardening gaps, an SDK gap (no typed participant, quality or device APIs), and documentation that had fragmented across overlapping status pages. Remaining work is mostly verification that needs real infrastructure, devices or product decisions.

Capability matrix

Status: Supported = implemented and tested against real local infrastructure; Preview = implemented, verification incomplete; Product = the product backend's responsibility by design; Gap = not implemented.

Calls (3.1)

RequirementStatusEvidence
1:1 and group audio/video, concurrent sessionsSupportedPOST /v1/calls, join tokens per device; maxConcurrentRooms quota with advisory lock
Participant join/leave events, mute/unmute, camera, device selection, connection qualitySupported (web)LiveKit webhooks update participant sessions; SDK CallSession.participants, onParticipantsChange, listDevices, switchDevice (added in this audit)
Network reconnectionSupportedLiveKit reconnect states surfaced as reconnecting; messaging socket reconnects with replay
Adaptive bitrate, simulcast, SVCSupported (client)adaptiveStream and dynacast on by default; simulcast is LiveKit's camera default; SVC codecs via roomOptions
Room management, participant permissions, host/moderator rolesSupportedRoles derive grants server-side; participants/{pid}/permissions, /remove; maxParticipants per call
Waiting roomsGap (FEAT-01)Products can gate join-token issuance; no lobby state in Lynkoria
Call lifecycle and reliable terminationSupportedcall:invited/accepted/declined/ended signals, /end, reconciler closes calls LiveKit no longer has
Mobile and desktopDesktop web supported; native PreviewNative media layers not compiled or device-tested (NAT-01..03)
Production LiveKit configurationSupported (template)auto_create: false, TURN/TLS, per-environment keys, webhook key; unverified on a real node

Screen sharing (3.2)

Supported on desktop browsers: screen, window and tab (browser picker), publish permission derived from role, events through participant snapshots, cleanup on stopScreenShare and room leave. Mobile browsers generally cannot capture the screen; native screen share is Preview.

Livestreaming (3.3)

RequirementStatusEvidence
One-to-many and interactive streams, host/speaker/viewer rolesSupportedViewers subscribe only; backend promotes speakers (ADR 011)
Audience management, moderation, viewer permissionsSupportedPermission updates, removal, suspension
Viewer limits, multiple concurrent streamsSupportedmaxParticipants, environment room quota
Stream health monitoringPartialMedia metrics and alerts (MediaHostCpuHigh, MediaEgressHigh); no per-stream health API
Hundreds of viewersUnverified300 simulated viewers locally at medium quality without loss; not a deployed result (LOAD-01)
Egress (HLS/RTMP), CDNPreview / GapEgress lifecycle tested with a stub; HLS/CDN delivery not built (ARCH-02)

Messaging (3.4)

Supported: direct, group and room conversations; text; delivery and read receipts; typing; edit and delete; history with cursor pagination; attachments (images, video, files) with scanning; reactions; threads; per-conversation sequence ordering; reconnect and gap replay; duplicate prevention by clientMessageId; retention with ordered tombstones. Offline handling: history replay on reconnect is supported; a durable client-side send queue is a Gap (FEAT-02). Messaging is not coupled to LiveKit: it runs on Socket.IO (WebSocket only) and PostgreSQL. The Socket.IO design is sound for one replica; scaling out needs the Redis adapter and cross-node revocation (ARCH-01).

Presence (3.5)

Supported: online/away/busy/dnd/invisible, last seen, subscriptions and updates, multiple sessions per user, heartbeats (about 25 s) with 60 s leases, disconnect detection via lease expiry, a single sweeper across instances (Redis lock) and atomic Lua recompute. Custom presence metadata is not offered. Presence is visible tenant-wide; contact/block filtering is Product.

Recording (3.6)

Preview: ledger, start/stop, webhook reconciliation with out-of-order protection, private storage, 5-minute presigned downloads through the service key, deletion and retention. E2EE calls cannot be recorded (409). No real Egress job has run (REC-01). Recording access is the product backend's decision (service-key only), so recordings are never public.

File and attachment security (3.7)

Supported: declared type allowlist per environment, size limits, signed type/length on upload, magic-byte detection and declared-type match, archive bomb limits, ClamAV scanning, fail-closed on scanner errors, scan status tracking, rejection and deletion of malicious files, quarantine upload keys (new), membership-checked 5-minute download URLs with attachment disposition, lifecycle rules. Filenames are stored as metadata only (object keys are server-generated UUID paths) and encoded in Content-Disposition.

Platform capabilities (3.8)

CapabilityStatus
Multi-tenant organizations, projects, environments; per-environment origins, features, quotas, policiesSupported
Service keys (scoped, hashed, rotatable, revocable immediately) and short-lived ES256 messaging tokens with key rotationSupported
Console RBAC (owner, admin, developer, auditor), audit log, CLI-provisioned accountsSupported
Webhooks: signed, timestamped, retried with backoff, dead-letter and console retry; inbound LiveKit webhooks verified and deduplicatedSupported
Rate limits (per key, user, console IP/email, socket events) failing closed; quotasSupported
Usage metering (daily per environment)Supported, operational grade only
Service health, metrics, alerts, tracesSupported (templates unexercised in a deployment)
API versioning (/v1), OpenAPI with CI drift check, compatibility windowSupported
Idempotency (clientMessageId, productCallId), retries, resilienceSupported
Storage quotas per environmentGap: attachment size per file only
AR filters, masks, beauty effectsProduct/client-side by design (approach)

SDK audit (Phase 4)

SDKStateNotes
@lynkoria/server (reference)SupportedTyped errors and request IDs for all product routes; no automatic retries (callers retry idempotent requests such as productCallId creates)
@lynkoria/clientSupportedESM, lazy livekit-client; now exposes participants, quality and devices instead of requiring raw LiveKit events
@lynkoria/reactSupporteduseCall, useConversation, usePresence, useTyping, new useCallParticipants
@lynkoria/react-nativePreviewTypeScript API tested with a mocked native module; native code not compiled
Android (io.lynkoria:*), iOS (LynkoriaCore, Lynkoria)Core tested, media PreviewCores tested in Docker toolchains; media/CallKit need Android SDK/Xcode
@lynkoria/scanner-clientSupportedUsed by the API; available to other products (Fidescript)

Consistency: shared contracts (@lynkoria/contracts) define errors and events for every JavaScript SDK. CallSession.room remains an intentional escape hatch for rendering with LiveKit components. No package has been published yet (PUB-01), so clean-project installs remain to be done (TEST-01).

Consistency between docs, code, console and SDKs (Phase 5)

  • Console ↔ API: every console request maps to an implemented /v1/admin route in the OpenAPI document; no mock data, hardcoded metrics or placeholder actions were found (input placeholders only). Metrics come from project_usage_daily and the operations endpoint.
  • OpenAPI: regenerated with no diff (46 paths).
  • Docs ↔ code fixes: environment reference completed (CLIENT_IP_HEADER, scanner and tooling variables were missing); stale statements corrected (recording/native "not available", console Access-only, attachments unscanned); new SDK APIs documented in calls, client and React references.
  • Playground: exercises messaging, presence, calls and livestreams against the real API; it is development-only by construction (demo backend exists only in the dev server).

Reliability and performance (Phase 7)

Reviewed: graceful shutdown waits for workers; Redis outages fail closed with 503 and no offline queue; outbox claims with SKIP LOCKED and LISTEN/NOTIFY with polling fallback; retention in bounded batches; reconciler for missed LiveKit events; database pool limits and connect timeouts. Added: role-level statement and idle-transaction timeouts (SEC-07, to apply). Kept deliberately: per-event socket revalidation (SEC-10). Not changed: single API replica and media node (no HA). Load evidence is local only (load testing); no concurrency claim is made for deployed infrastructure.

Deployment readiness (Phase 8)

The supported target is DigitalOcean App Platform plus a LiveKit Droplet, managed PostgreSQL/Valkey, Spaces, a private scanner host and Cloudflare Pages, with provisioning, rendering, migration, rollback and verification scripts. This audit added prerequisites, a complete environment reference, scanner and console-account steps in the deployment guide, a production checklist and a security checklist. A single-host Compose deployment for other providers was not added (DEP-01): it would be a second supported target that this audit could not verify end to end.

Verification

Run locally on 2026-11-13 against PostgreSQL 18, Redis, LiveKit, RustFS (S3) and ClamAV 1.4 containers.

CheckResult
pnpm format:check, pnpm lintPass
pnpm typecheck18/18 tasks pass
pnpm test:infra6/6 pass
pnpm turbo run test --force (with real ClamAV)All 15 tasks pass: api 82, scanner 14 (4 against real ClamAV), auth 10, client 7, contracts 6, server 5, react 5, react-native 5, scanner-client 2, docs content 5
New regression testsAttachment swap (fails on old code, passes now), client IP header, scrypt limiter, call participants/devices, useCallParticipants
pnpm --filter @lynkoria/api openapiNo drift (46 paths)
pnpm build11/11 build tasks pass; docs export verifies 86 pages, internal links, search and OpenAPI
Docker imagesdocker build of apps/api/Dockerfile (507 MB) and apps/scanner/Dockerfile (371 MB) succeed; not Trivy-scanned locally
node scripts/check-bundle-secrets.mjs141 built files contain no secrets (an env-doc PEM example was caught and replaced)
pnpm audit --prodNo known vulnerabilities; full audit has one dev-only moderate advisory (SEC-09)
BrowserConsole, playground (including an in-call LiveKit session) and docs checked; docs served with its CSP without violations

Not run: hosted CI (including the new scanner Trivy job), gitleaks and Trivy locally, any deployed environment, real Egress, real push providers, native toolchains, devices, staging load tests, restore drills.

Production-readiness assessment

Not Production Ready as a whole platform. The web platform's code (calls, livestreams, messaging, presence, attachments, console) is ready with external prerequisites: provisioning, credentials and applying the infrastructure settings in blockers. Production still requires verification that has not happened: media on real networks and TURN, capacity at the target viewer counts, backup restore and rollback drills, and alert delivery. Native SDKs, recording and push are Preview until compiled, device-tested and run against real providers. A successful build and test run is not evidence of production readiness.

On this page