Skip to main content

Backend Features

One page per domain feature. Each page covers what the feature does, its data model, the API endpoints it exposes, and its key external dependencies.

Features map directly to packages under internal/features/ in the backend codebase.

Feature inventory

FeaturePackageWhat it does
AnalyticsanalyticsUsage analytics and event tracking
AuthenticationauthenticationWorkOS AuthKit integration — sign-in, SSO, OAuth, session management, token validation
CalendarcalendarGoogle Calendar sync — event creation, updates, and participant management
ChatchatIn-room chat messages
Event SynceventsyncPolls the WorkOS event stream and syncs org/membership/license changes into the local database. Runs as a separate worker binary.
LicenselicenseOrg license management tied to WorkOS subscription state
MembershipmembershipOrg membership — invitations, roles, user-org relationships
MetadatametadataOrg and user metadata management
MetricsmetricsPrometheus metrics endpoint — exposes LiveKit-derived stats
OrganizationorganizationOrg CRUD, settings, logo upload
RealtimerealtimeLiveKit room token generation and participant tracking
RecordingrecordingLiveKit egress control — start, stop, and status of room recordings
RoomroomRoom lifecycle — create, join, leave, close
SessionsessionSession tracking across rooms
UseruserUser profile — read, update, avatar upload
WebhookwebhookInbound WorkOS webhook handler — validates signature and dispatches events

Common internal structure

Every feature package follows the same layout:

internal/features/<name>/
api/ ← Gin route registration and request/response types
models/ ← Domain types and DTOs
module/ ← Dependency wiring (constructor that assembles service + handlers)
service/ ← Business logic

The shared/ package holds cross-feature helpers that don't belong to any single feature: auth response shaping, image upload handling, and user context extraction from the request.

What belongs here vs elsewhere

  • Implementation detail of a single feature → its page in this folder
  • An API endpoint's request/response contract → ../api/rest/
  • Database table used by a feature → ../database/tables/
  • External service a feature depends on → ../../platform/services/