Skip to main content

Version Docs Updated

Purpose

This document brings together the responsibility boundaries, data flow, and inter-service dependency hierarchy of Rentiva's modules as a technical reference.

🧱 MHM Rentiva Module Architecture

MHM Rentiva is built using a "Modular Monolith" approach. Each module is designed as a self-contained "Service" or "Manager", but the entire system is coordinated through the MHMRentiva\Plugin root class (Service Graph).

πŸš€ Service Graph and Bootstrap​

For performance and predictability, the plugin follows a strict service initialization order. The Plugin::initialize_services() method manages this hierarchy.

πŸ“Š Inter-Module Hierarchy​


πŸ“‚ Module Categories and Responsibilities​

CategoryNamespaceResponsibility
CoreMHMRentiva\CoreDatabase (Migrations), Security (Governance), License checks (Licensing).
AdminMHMRentiva\AdminAdmin UIs, List tables (ListTables), Settings pages.
FinancialMHMRentiva\Core\FinancialLedger entries, Commission policies, Payout management.
LayoutMHMRentiva\LayoutManifest validation, Atomic Import, Design token management.
APIMHMRentiva\ApiREST API endpoints, Webhook handlers, and JSON outputs.

πŸ› οΈ Core Architectural Principles​

1. Singleton and Static Access​

Core classes (e.g., Plugin.php) use the Singleton pattern. This prevents services from being initialized more than once per request, optimizing memory usage.

2. Dependency Injection (Loose Coupling)​

Modules are not tightly coupled to each other. Whether a module runs or not is determined dynamically via is_class_available() checks and the license gate.

3. Event-Driven Architecture (Hooks)​

The system is extensible through WordPress's add_action and add_filter ecosystem. For example, when a booking is completed (mhm_rentiva_booking_completed), the financial records (Ledger) are triggered automatically.


πŸ›‘οΈ Security and Compliance​

Every module must follow these security protocols:

  • Sanitization: All input is cleaned through helper classes such as Sanitizer::text_field_safe().
  • Nonce & Capability: current_user_can() and check_admin_referer() checks are standard for every admin-side request.
  • Audit Logs: Every critical financial or architectural operation is recorded via AdvancedLogger.

Section Summary​

  • The system is built on a service-based graph (Service Graph).
  • The Core module is the foundation at the bottom that supports the entire system.
  • Inter-module communication happens through hooks (event-driven) or central service calls.

Changelog​

DateVersionNote
23.04.20264.27.2Documentation translated into English.
19.03.20264.21.2Page updated with Service Graph and Modular Monolith details.