-
Notifications
You must be signed in to change notification settings - Fork 10
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.
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
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:
Booking Creation Process
The booking workflow follows this sequence from user interaction to calendar persistence:
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
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
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():
-
Listen for Updates:
updateUseCase.updateFlow().collect()monitors for changes - Delay Processing: 1-second delay to batch rapid updates
-
Context Switch:
withContext(Dispatchers.Main)for UI updates -
Reload Data:
loadRooms(state.value.indexSelectRoom)fetches fresh data -
Update Components: Propagate changes to
SlotComponentand other child components
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 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.FastEventcarries room selection and duration parameters - Modal navigation managed through
SlotNavigation<ModalWindowsConfig>
Room Context Preservation
- Current room selection passed via
selectedRoom: RoomInfoparameter - 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()
The core features integrate through a layered architecture that separates concerns while maintaining data consistency and real-time synchronization.
Component Hierarchy and Data Flow
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:
-
BookingEditorComponent calls
onDeleteEvent(slot)callback -
RootComponent forwards to
MainComponent.handleDeleteEvent() -
MainComponent delegates to
SlotComponent.sendIntent(SlotIntent.Delete) -
SlotComponent executes deletion via
deleteBookingUseCase -
UpdateUseCase triggers
updateFlow()emission - 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.
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:
-
StoryEngineselects the next story based on freshness, priority, and playlist definitions downloaded from the backend. -
AutoplayControllerorchestrates 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.
See SMS Router.
Operations teams can drop inexpensive Android devices with SIM cards into meeting rooms or remote sites. The SMS router app:
- Listens for
Telephony.Sms.Intents.SMS_RECEIVED_ACTIONbroadcasts. - Maps the message to the configured webhook type (Mattermost or Telegram) using
SmsDataDtoMapper. - Calls
SmsApiServiceImpl(Ktor HTTP client) with bearer authorization headers and JSON payloads. - Records delivery attempts in Room so the Compose diagnostics screen can show success/failure per SIM slot.
- 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.