Skip to main content

Platform Architecture

SpaceOS follows a service-oriented architecture with clear boundaries between cloud services, frontend apps, and on-premise components.

System Diagram

Communication Patterns

ZenCore ↔ ZenEdge

  • REST APIs with x-api-key authentication
  • Webhooks for event-driven communication (booking.start triggers device access)
  • Physical Space Mappings bridge virtual meeting spaces to physical spaces

ZenCore → Scheduler (zs-bullmq)

  • ZenCore sends scheduling requests via REST to the Scheduler API
  • Scheduler manages delayed BullMQ jobs for state transitions
  • Three queues: meetingScheduler, statusUpdateQueue, webhookDeliveryQueue
  • Status updates are posted back to ZenCore

Realtime Service

  • Socket.IO WebSocket relay
  • JWT-authenticated connections (token from auth header, query param, or handshake)
  • Room-based pub/sub: clients join rooms by organizationId, meetingSpaceId, or deviceId
  • Events: zscloud:meeting.status_update, zscloud:booking.update, zscloud:device.*

ZenEdge ↔ IoT Adapter

  • Connected via Tailscale mesh VPN
  • Adapter protocol: 7 REST endpoints per device adapter
  • ZenEdge polls adapters for health; adapters can push events via webhooks

Data Flow: Booking to Device Access

Next Steps