Skip to Content
LYNKORIADocs

SDK architecture

How the web, React Native, Android, iOS and server SDKs fit together and what each owns.

Every Lynkoria SDK talks to the same API and event contracts (@lynkoria/contracts, /openapi.json). Media always flows between the client and LiveKit; the Lynkoria API never relays audio or video. The API owns authentication, authorization, rooms, tokens, messaging, push, recording jobs and file scanning.

Packages

PackagePlatformOwnsStatus
@lynkoria/serverNode.js product backendsService-key calls: rooms, join tokens, messaging tokens, conversations, webhooksTested against the local API
@lynkoria/clientBrowsers, React Native (JS)Messaging, presence, typing, call signals, push registration; browser media (LiveKit)Tested against the local API
@lynkoria/reactReact (web)Hooks over @lynkoria/clientUnit tested
@lynkoria/react-nativeReact Native ≥ 0.82Native media via TurboModule + Fabric view; re-exports @lynkoria/client messagingTS layer and codegen verified; native code not compiled or device-tested
io.lynkoria:lynkoria-coreJVM / AndroidMessaging, presence, push payloads, tokens (Kotlin coroutines + Flow)Unit and integration tested against the local API
io.lynkoria:lynkoria-androidAndroidLiveKit calls, screen share, audio routing, incoming-call notifications, lifecycleCompiles (./gradlew build); not device-tested
LynkoriaCore (SwiftPM)iOS, macOS, LinuxMessaging, presence, push payloads, tokens (async/await + AsyncStream)Unit tested; REST integration tested on Linux
Lynkoria (SwiftPM)iOS, macOSLiveKit calls, CallKit, PushKit, screen shareCompiles for macOS (swift build); iOS build needs Xcode
@lynkoria/scanner-clientNode.js servicesTyped client for the malware-scanning serviceTested against the scanner

Shared contracts

  • Tokens. Apps receive short-lived messaging tokens and call join credentials from their own backend, which uses a service key. No SDK accepts a service key.
  • Messages. Every conversation event has a sequence number. All SDKs apply last + 1, drop duplicates (<= last) and fill gaps with GET /v1/conversations/{id}/messages?after_seq=last. Every (re)connect replays tracked conversations, so missed events are recovered after network loss or backgrounding.
  • Sends are idempotent on clientMessageId; retry with the same id.
  • Realtime uses Socket.IO v4 over WebSocket only. The Kotlin and Swift cores implement the small subset Lynkoria uses (connect with auth, ping/pong, events, acknowledgements) on the platform WebSocket, avoiding third-party socket libraries.
  • Errors carry the contract code (unauthorized, not_found, feature_disabled, …), HTTP status and request id: LynkoriaError (TS, Swift) and LynkoriaException (Kotlin).
  • Push payloads use the same keys everywhere (lynkoria_kind, lynkoria_call_id, …); each SDK exposes a parser.

Native conventions

ConcernAndroidiOSReact Native
Asyncsuspend functionsasync throwsPromises
Event streamsStateFlow / SharedFlowAsyncStreamlistener functions returning unsubscribe
Client lifetimebindToProcessLifecycle()connect in .task, disconnect on backgroundAppState in the app
Incoming callsCallStyle notification + full-screen intentPushKit + CallKitincomingCalls over the native layer

See native media, React Native, Android and iOS.

On this page