-
Notifications
You must be signed in to change notification settings - Fork 0
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 provides three primary features centered around meeting room management:
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 |
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
SlotComponent
and 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.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()
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.