How haiau2501/apartment-management-solution works
Project Type & Purpose
• This is a full-stack mobile and multi-platform application built with Flutter and Dart.
• It is designed to manage apartment/community operations, catering to three main user groups (administrators, residents, and guests) by applying a Modular Monolith architecture with Domain-Driven Design (DDD).
• The application implements features such as user authentication, admin dashboards, payment and fee management, event handling, complaints, and notifications.
Analyzing the File Structure
• The top-level directories include configuration and platform-specific folders (android, ios, web, windows, macos, linux), which indicate support across multiple platforms.
• The core business logic and UI code reside in the “lib” folder. Notice the two main parts:
• “core” – Contains shared constants, utilities (e.g., extensions, translations), themes, and common widgets.
• “features” – Organized into several submodules (e.g., .authentication, admin, resident, guest). Each module shows further separation into data, domain, and presentation layers, which is in line with DDD.
• Additional documentation files (in the .document folder) and CI/CD config files are also present, ensuring the project’s maintainability and automation.
Key Components
a. Frontend/UI Layer:
• Represented by Flutter’s presentation components.
• The “presentation” subdirectories under each feature (authentication, admin, resident, guest) serve as the UI pages and widgets.
b. Domain/Business Logic Layer:
• Each feature retains a “domain” folder, modeling business entities (users, complaints, fees, events, etc.) and core rules.
• DDD aspect by showing entities and services which represent core business logic.
c. Data Access/Repository Layer:
• “data” directories in each feature encapsulate repositories and service implementations for backend operations (such as authentication, fee processing, complaint handling) including external service integrations (example: weather service).
d. Core Module:
• Acts as the shared layer of utilities, constants, themes, and common widgets, which is used by all feature modules.
e. Platform-Specific Layers:
• Although the primary code is in Dart/Flutter, include an outer layer for cross-platform compatibility (Android, iOS, web, desktop) managed by Flutter’s engine and platform-specific configuration.
f. External Systems & Integration Points:
Relationships & Interactions
• From UI (presentation layer) → Domain/Business Logic (domain layer) → Data/Repository layer.
• Dependencies from feature modules to the shared “core” module.
Architectural Patterns & Design Principles
• Modular Monolith: Emphasize how each module (feature) is self-contained yet integrated to the whole system.
• Domain-Driven Design: Highlight the separation between domain models, business rules, and data access logic.