Skip to content

Core Features

KrugarValdes edited this page Jan 19, 2026 · 3 revisions

Core Features

This document provides a comprehensive overview of the main features in the Effective Office system and their end-to-end implementation. It covers the core booking functionality, real-time updates, and user interaction patterns that make up the primary value proposition of the system.

For information about the overall system architecture, see System Architecture. For detailed implementation of domain models and business logic, see Data & Domain Architecture.

Feature Overview

The Effective Office system now spans meeting room automation, ambient signage, and SMS-based alert routing:

Feature Purpose Primary Components
Room Booking Create, modify, and delete meeting room reservations GoogleCalendarProvider, BookingEditorComponent
Real-time Status Display Show current room availability and upcoming events MainComponent, SlotComponent
Fast Booking Quick reservation for immediate room needs FastBookingComponent, availability checking
Ambient Signage Autoplay playlists for birthdays, events, photo slideshows, and Mattermost alerts StoryEngine, AutoplayController, LeaderIdView
SMS → Chat Escalation Forward SIM-based alerts into Mattermost/Telegram with retries SmsReceiver, ForwardSmsUseCase, SmsApiServiceImpl

Core Feature Flow Architecture

core-feature-flow-architecture.svg

Room Booking Workflow

For detailed information, see Room Booking Workflow.

The room booking system handles the complete lifecycle of meeting room reservations through a coordinated flow between the tablet client and backend services.

Booking Entity Structure

The system uses a consistent booking model across all layers:

room-booking-workflow.svg

Booking Creation Process

The booking workflow follows this sequence from user interaction to calendar persistence:

booking-creation-process.svg

Availability Checking Logic

The GoogleCalendarProvider.checkBookingAvailability() method implements conflict detection:

  • Queries existing events in the workspace calendar for the requested time range
  • Compares start/end times using overlap detection: startTime < existingEnd && existingStart < endTime
  • Excludes the current booking ID when updating existing events
  • Returns boolean result to determine if booking can proceed

Real-time Availability System

For detailed information, see Real-time Availability System.

The system maintains live room status through a combination of periodic updates, push notifications, and reactive state management in the tablet client.

Real-time Update Architecture

real-time-update-architecture.svg

MainComponent Update Coordination

The MainComponent orchestrates multiple update mechanisms:

Update Type Trigger Frequency Purpose
Time Updates timerUseCase.timer() 1 second Update countdown timers
Date Reset currentTimeTimer.start() 1 minute Reset to current date
Room Data updateUseCase.updateFlow() On change Refresh room information
Next Event Time getTimeToNextEventUseCase() Each update Calculate time to next booking

State Update Flow

The update process follows this pattern in MainComponent.setupEventListeners():

  1. Listen for Updates: updateUseCase.updateFlow().collect() monitors for changes
  2. Delay Processing: 1-second delay to batch rapid updates
  3. Context Switch: withContext(Dispatchers.Main) for UI updates
  4. Reload Data: loadRooms(state.value.indexSelectRoom) fetches fresh data
  5. Update Components: Propagate changes to SlotComponent and other child components

Fast Booking Feature

For detailed information, see Fast Booking Feature.

The fast booking feature provides streamlined room reservation for immediate use, optimizing for speed and minimal user interaction.

Fast Booking Component Flow

fast-booking-feature.svg

Fast Booking Integration Points

The fast booking feature integrates with the main application through several key touchpoints:

Modal Window Management

  • RootComponent.handleFastBookingIntent() activates the modal with context
  • ModalWindowsConfig.FastEvent carries room selection and duration parameters
  • Modal navigation managed through SlotNavigation<ModalWindowsConfig>

Room Context Preservation

  • Current room selection passed via selectedRoom: RoomInfo parameter
  • Full room list provided for alternative selection
  • Minimum duration calculated based on current time and next booking

User Interface Triggers

  • Main screen "Fast Book" button: Intent.OnFastBooking(minDuration)
  • Busy room component when ending current meeting
  • Duration automatically calculated from getTimeToNextEventUseCase()

Feature Integration Architecture

The core features integrate through a layered architecture that separates concerns while maintaining data consistency and real-time synchronization.

Component Hierarchy and Data Flow

component-heararchy-data-flow.svg

Cross-Feature Data Synchronization

The system maintains consistency across features through several mechanisms:

Mechanism Implementation Purpose
Shared State Flow updateUseCase.updateFlow() Broadcast changes to all subscribers
Component Communication onDeleteEvent, openBookingDialog callbacks Direct parent-child coordination
Modal Context ModalWindowsConfig data classes Pass context between features
Use Case Layer Common domain operations Centralized business logic

Event Deletion Coordination Example

When a user deletes an event from any component, the system coordinates updates:

  1. BookingEditorComponent calls onDeleteEvent(slot) callback
  2. RootComponent forwards to MainComponent.handleDeleteEvent()
  3. MainComponent delegates to SlotComponent.sendIntent(SlotIntent.Delete)
  4. SlotComponent executes deletion via deleteBookingUseCase
  5. UpdateUseCase triggers updateFlow() emission
  6. All subscribed components refresh their data automatically

This pattern ensures that room status, time slots, and availability information remain synchronized across all UI components without explicit coupling.

Ambient Signage Experiences

See TV Client Application for full details.

The signage stack consumes backend configuration plus external sources (Notion, Duolingo, Leader ID) and renders them as story cards. Key behaviors:

  • StoryEngine selects the next story based on freshness, priority, and playlist definitions downloaded from the backend.
  • AutoplayController orchestrates crossfade transitions, remote-control commands (pause, skip), and urgent Mattermost interruptions.
  • Data pipelines fetch and cache upstream responses via Retrofit/OkHttp clients, normalize them into domain models, and expose flows to the UI layer.
  • QR overlays (Leader ID) and photo slideshows leverage ZXing and Coil with AVIF/SVG support.

SMS Router Escalation Flow

See SMS Router.

Operations teams can drop inexpensive Android devices with SIM cards into meeting rooms or remote sites. The SMS router app:

  1. Listens for Telephony.Sms.Intents.SMS_RECEIVED_ACTION broadcasts.
  2. Maps the message to the configured webhook type (Mattermost or Telegram) using SmsDataDtoMapper.
  3. Calls SmsApiServiceImpl (Ktor HTTP client) with bearer authorization headers and JSON payloads.
  4. Records delivery attempts in Room so the Compose diagnostics screen can show success/failure per SIM slot.
  5. Retries up to three times before flagging manual intervention.

These escalations complement calendar-triggered push notifications, ensuring that outages on Wi-Fi or Google webhooks can still reach operators through cellular networks.

Clone this wiki locally