Skip to content

Navigation and App Structure

Radch-enko edited this page Jul 24, 2025 · 2 revisions

Navigation & App Structure

This document covers the navigation patterns, component architecture, and application structure of the tablet client. It focuses on the root navigation system, modal window management, and the main interface organization. For detailed information about individual UI components and their interactions, see UI Components. For room display and slot management specifics, see Room Display & Slot Management.

Application Architecture Overview

The tablet application follows a component-based architecture using Decompose for navigation and state management. The app structure consists of a root navigation system that manages both stack-based screen navigation and slot-based modal windows.

Root Navigation Structure

root-navigation-structure.svg

RootComponent Implementation

The RootComponent serves as the primary navigation controller and manages the application's top-level state transitions. It implements a dual navigation system using Decompose's stack and slot navigation patterns.

Navigation Configuration

Navigation Type Purpose Configuration Classes
Stack Navigation Primary screens Config.Main, Config.Settings
Slot Navigation Modal windows ModalWindowsConfig.FastEvent, ModalWindowsConfig.UpdateEvent, ModalWindowsConfig.FreeRoom

The component automatically determines the initial screen based on settings configuration:

// Initial screen determination logic
val childStack: Value<ChildStack<*, Child>> = childStack(
    source = navigation,
    initialConfiguration = if (checkSettingsUseCase().isEmpty()) {
        Config.Settings
    } else {
        Config.Main
    },
    // ...
)

Modal Window Management

modal-window-management.svg

MainComponent Architecture

The MainComponent represents the core interface component responsible for room management, booking coordination, and real-time updates. It follows a reactive pattern with state management and intent handling.

Component Structure and Dependencies

component-structure-and-dependencies.svg

Intent Handling System

The MainComponent processes UI interactions through a structured intent system:

Intent Type Purpose Parameters
OnFastBooking Trigger quick room reservation minDuration: Int
OnOpenFreeRoomModal Open room liberation dialog None
OnSelectRoom Change active room index: Int
OnUpdateSelectDate Navigate between dates updateInDays: Int
RebootRequest Refresh component state None

Real-time Update Mechanism

The component implements multiple timer-based update patterns for maintaining current information:

real-time-update-mechanism.svg

Build Configuration and Platform Structure

The application is configured as a Compose Multiplatform project supporting both Android and iOS platforms with a shared codebase.

Module Dependencies

module-dependencies.svg

Android Application Configuration

The Android application is configured with specific requirements for tablet deployment in office environments:

Configuration Value Purpose
applicationId band.effective.office.tablet Unique app identifier
launchMode singleInstance Single app instance
lockTaskMode if_whitelisted Kiosk mode support
configChanges `orientation screenSize

The application includes Firebase Cloud Messaging integration for real-time notifications and device admin capabilities for kiosk deployment.

State Management Pattern

The application implements a unidirectional data flow pattern with centralized state management in each component:

state-management-pattern.svg

Clone this wiki locally