-
Notifications
You must be signed in to change notification settings - Fork 0
Project Structure
This document provides a comprehensive overview of the Effective Office codebase organization, including module structure, dependency management, build conventions, and architectural patterns. It serves as a navigation guide for developers to understand how the code is organized and how different components relate to each other.
For information about the overall system architecture and component interactions, see [System Architecture](System Architecture). For details about the build system configuration and tooling, see [Build System & Tooling](Build System And Tooling).
The Effective Office codebase is organized as a multi-module Gradle project with clear separation between backend and client systems. The project follows a feature-based modular architecture where each major functionality is isolated into its own module.
The backend system is organized into three main layers: application, core modules, and feature modules. This structure follows clean architecture principles with clear dependency directions.
Module | Purpose | Key Responsibilities |
---|---|---|
backend:core:domain |
Business Models | Entity definitions, domain logic, business rules |
backend:core:data |
Data Transfer | DTOs, API request/response models, serialization |
backend:core:repository |
Data Persistence | Database access, JPA repositories, data mapping |
Module | Purpose | Key Responsibilities |
---|---|---|
backend:feature:authorization |
Security | JWT handling, authentication, authorization |
backend:feature:user |
User Management | User CRUD operations, user profiles |
backend:feature:workspace |
Room Management | Workspace definitions, room availability |
backend:feature:booking:core |
Booking Logic | Booking CRUD, validation, business rules |
backend:feature:booking:calendar:google |
Google Integration | Google Calendar API integration |
backend:feature:booking:calendar:dummy |
Test Provider | Mock calendar for testing |
backend:feature:calendar-subscription |
Notifications | Calendar change subscriptions |
backend:feature:notifications |
Push Messaging | Firebase Cloud Messaging integration |
The tablet client follows a layered architecture with shared core modules and independent feature modules. Each feature module implements complete user workflows while depending on shared infrastructure.
Module | Purpose | Key Responsibilities |
---|---|---|
clients:tablet:core:ui |
UI Components | Reusable Compose components, design system |
clients:tablet:core:domain |
Business Logic | Use cases, domain models, business rules |
clients:tablet:core:data |
Data Access | Repository implementations, network/local data coordination |
Module | Purpose | Key Responsibilities |
---|---|---|
clients:tablet:feature:main |
Home Dashboard | Room status display, navigation hub |
clients:tablet:feature:settings |
Configuration | App settings, preferences management |
clients:tablet:feature:bookingEditor |
Booking Management | Create, edit, and manage bookings |
clients:tablet:feature:fastBooking |
Quick Booking | Rapid room reservation interface |
clients:tablet:feature:slot |
Time Visualization | Time slot display and interaction |
The project uses Gradle Version Catalogs for centralized dependency management. All versions and library definitions are consolidated in a single TOML file, promoting consistency across modules.
Component | Version | Purpose |
---|---|---|
Kotlin | 2.1.21 | Primary language for both backend and client |
Spring Boot | 3.5.0 | Backend web framework |
Compose | 1.8.1 | UI framework for tablet client |
Ktor | 3.1.3 | HTTP client for API communication |
PostgreSQL | 42.7.6 | Database driver |
Decompose | 3.3.0 | Navigation and component lifecycle |
The project uses a custom build logic system with convention plugins to standardize module configuration and reduce build script duplication.
The band.effective.office.client.kmp.feature
plugin automatically configures:
- Kotlin Multiplatform with common, Android, and iOS targets
- Compose Multiplatform UI dependencies
- Core module dependencies (
core:ui
,core:domain
,core:data
) - Navigation and lifecycle management (Decompose, Essenty)
- Dependency injection (Koin)
- Serialization support
The project uses Koin for dependency injection in the client and Spring's built-in DI for the backend. The client side organizes dependencies into feature-specific modules that can be composed together.
The domain module demonstrates a sophisticated use case composition pattern where complex use cases depend on simpler ones:
// Example: DeleteBookingUseCase dependencies
DeleteBookingUseCase(
networkBookingRepository = get(),
localBookingRepository = get(),
getRoomByNameUseCase = get(),
)
This pattern promotes reusability and maintains clear separation of concerns throughout the application.