docs.zenspace.io
    docs.zenspace.io
    • 🧭 Introduction
    • 🧱 System Components
    • 🧰 Tech Stack
    • 🏗️ System Architecture
    • 🌐 Deployment Architecture
    • 🗄️ Database Design Documentation
    • API Endpoints
      • RaspberryPi
        • Heartbeat API
        • Retrieve all active sensors and device permissions
        • Control a device (e.g., turn on/off, adjust intensity)
        • Enable or disable a device
        • Register a meeting space ID and retrieve network details
      • Meeting Space
        • Schedule meeting space state
        • Get meeting spaces by customer
        • Get meeting space state by ID
        • Get meeting space state by device ID
        • Disable meeting space state
        • Send meeting space state by meeting space ID
        • Store meeting space availability
        • Create Google Calendar
      • Device Management
        • Create device
        • Create device sensors
        • Create or update admin unlock codes
        • Upload meeting space screenshot
      • Authentication
        • Create authorization token
      • Messaging
        • Send message to Android device
      • Booking
        • Send meeting space state by booking ID
        • Create or update booking

    🌐 Deployment Architecture

    ZenSpace-Deployment Architecure.jpg

    🧩 Deployment Architecture – Component Descriptions#

    📁 Supabase (Bookings DB & Automation DB)#

    Supabase serves as the backend database powering both booking and automation modules. It stores meeting reservations, device configurations, sensor logs, and user data using a scalable Postgres setup.

    🧑‍💻 Booking Admin#

    A web portal for system administrators to manage bookings, users, pod availability, and reporting.
    Deployment: Hosted on AWS Amplify using CI/CD from CodeCatalyst.
    Data Source: Connects to Supabase and communicates with AWS Lambda and API Gateway.

    👤 Booking Client#

    The main interface for customers to browse, book, and manage SmartPod reservations.
    Deployment: Hosted on AWS Amplify with auto-deployment from CodeCatalyst.
    Integrations: Stripe for payments, Supabase for user data and availability, Google Calendar for sync.

    🔧 Automation Portal#

    Used by internal teams to control and configure IoT devices inside SmartPods such as lights, fans, and locks.
    Deployment: Hosted on AWS Amplify and linked to Raspberry Pi via API calls.
    Functions: Manages device access, permissions, and real-time hardware commands.

    📲 Meeting Pod Display (Outside Pod)#

    An Android tablet mounted outside the pod that shows availability, meeting status, and allows check-ins.
    Platform: Native Android (Java) with Firebase integration for updates and remote control.

    📱 Meeting Pod Display (Inside Pod)#

    A tablet inside the SmartPod that controls lights, fans, and door locks.
    Platform: Native Android app using Firebase for notifications and UI to control pod environment.

    🔌 Raspberry Pi (Django Server)#

    Hardware controller inside each SmartPod that receives commands from the Automation Portal or Lambda functions.
    Tech: Python + Django
    Purpose: Translates API requests into physical actions on hardware devices.

    💡 Hardware Devices#

    Includes smart lights, fans, and electronic door locks. Connected to and controlled via Raspberry Pi using GPIO or serial interfaces.

    🛰️ API Gateway#

    Entry point for all client-side and server-side API requests. Routes calls securely to either Lambda functions or Raspberry Pi.

    🦾 AWS Lambda#

    Stateless functions that handle key logic such as booking workflows, notification dispatch, and Google Calendar integration.

    🔌 Third-party Integrations And Deployment tools#

    ServicePurpose
    FirebasePush notifications to in-pod and out-pod Android devices.
    StripeSecure online payments.
    Google CalendarSynchronizes bookings with user's calendar.
    AWS EventBridgeTriggers automation events and schedules.
    AWS CloudWatchLogs and monitors Lambda and system metrics.
    AWS CodeCatalystSource management & CI/CD to Amplify.
    AWS AmplifyHosting platform for Booking Admin, Booking Client, and Automation Portal.
    AWS Route 53Domain name management and DNS routing.

    🖼️ Architecture Diagram Placeholder
    Overall Architecture
    Booking Flow
    How Customer Accesses the Pod
    SmartPod Onboarding Flow

    📌 Key Architectural Features#

    Serverless backend: Scalable and cost-efficient using AWS Lambda
    Real-time device control: Raspberry Pi with FCM & Supabase polling
    Cross-platform UIs: Single codebase across admin and client interfaces
    API-first design: Fully documented in Apidog for team collaboration
    Secure and Modular: Auth via Supabase and service separation by role
    Previous
    🏗️ System Architecture
    Next
    🗄️ Database Design Documentation
    Built with