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
| Feature | Package | What it does |
|---|---|---|
| Analytics | analytics | Usage analytics and event tracking |
| Authentication | authentication | WorkOS AuthKit integration — sign-in, SSO, OAuth, session management, token validation |
| Calendar | calendar | Google Calendar sync — event creation, updates, and participant management |
| Chat | chat | In-room chat messages |
| Event Sync | eventsync | Polls the WorkOS event stream and syncs org/membership/license changes into the local database. Runs as a separate worker binary. |
| License | license | Org license management tied to WorkOS subscription state |
| Membership | membership | Org membership — invitations, roles, user-org relationships |
| Metadata | metadata | Org and user metadata management |
| Metrics | metrics | Prometheus metrics endpoint — exposes LiveKit-derived stats |
| Organization | organization | Org CRUD, settings, logo upload |
| Realtime | realtime | LiveKit room token generation and participant tracking |
| Recording | recording | LiveKit egress control — start, stop, and status of room recordings |
| Room | room | Room lifecycle — create, join, leave, close |
| Session | session | Session tracking across rooms |
| User | user | User profile — read, update, avatar upload |
| Webhook | webhook | Inbound 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/