Skip to content

Core Features

Radch-enko edited this page Jul 24, 2025 · 2 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 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

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.

Clone this wiki locally