Skip to main content
The Joystick IoT platform is built on a microservices architecture, with each service handling specific responsibilities. All services communicate through a common network and are orchestrated using Docker Compose.

Core services

Joystick

Command runner API for executing device actions

Studio

Media management and event harvesting service

Switcher

Automatic slot switching and stream management

Baker

Scheduled actions and cron job management

Support services

Whisper

SMS gateway for device communication

Panel

Panel UI service for device control

Pocketbase

Database and authentication backend

MediaMTX

Real-time streaming server

Infrastructure

Traefik

Reverse proxy and routing layer

Service communication

All services communicate within the app-network Docker network. Key integration points:
  • Pocketbase - Central database accessed by all services
  • MediaMTX - Streaming server accessed via host network
  • Joystick - Command execution used by Baker, Switcher, and Studio
  • Traefik - HTTP routing for all web services

Common configuration

All services share common Docker Compose configurations:
x-logging: &default-logging
  driver: "json-file"
  options:
    max-size: "10m"
    max-file: "3"

x-platform-restart: &default-platform-restart
  platform: linux/amd64
  restart: unless-stopped

Health monitoring

Most services expose a /api/health endpoint that returns:
{
  "status": "healthy",
  "service": "service-name",
  "uptime": 12345,
  "timestamp": "2024-03-20T10:00:00Z",
  "memory": {},
  "version": "0.0.0"
}

Environment variables

Common environment variables across services:
  • PORT - Service port number
  • POCKETBASE_URL - PocketBase connection URL
  • STREAM_API_URL - MediaMTX API URL
  • JOYSTICK_API_URL - Joystick service URL
  • JOYSTICK_API_KEY - API key for inter-service communication

Service dependencies

Services have dependency chains to ensure proper startup order:
  1. Traefik - No dependencies
  2. MediaMTX - No dependencies
  3. Pocketbase - No dependencies (but required by others)
  4. Joystick - Depends on Pocketbase, MediaMTX
  5. Panel, Baker, Switcher, Whisper, Studio - Depend on Pocketbase, MediaMTX

Build docs developers (and LLMs) love