How belghalimohammed/modules works
Project Type and Purpose
• This is a monorepo of custom Drupal modules (“pleiade-custom-modules”) that extend the Pléiade dashboard.
• It provides connectors (API clients), blocks, forms and services that integrate various external applications (Lemon, GLPI, Moodle, Nextcloud, Zimbra, etc.) into the Pléiade Drupal site.
File Structure Analysis
• Top-level: LICENSE, README.md, then a folder per module (e.g. api_lemon_pleiade, api_glpi_pleiade, api_moodle_pleiade, module_actu_pleiade, datatable_pleiade, …).
• Each module follows the Drupal 8+ structure:
• .info.yml and .libraries.yml describe metadata and asset libraries
• .routing.yml defines routes
• .links.menu.yml adds menu links
• src/Controller for request handlers (Symfony controllers)
• src/Form for configuration or form classes
• src/Service for service classes that call external APIs
• css/ and js/ folders for front-end assets
• There is a “module_api_pleiade” which appears to be the core API that other modules depend on, plus an “api_lemon_pleiade” module that provides core settings (LL:NG endpoints).
README Insights
• Instructs to install module_api_pleiade first, then api_lemon_pleiade.
• api_lemon_pleiade holds global configuration for LL:NG endpoints.
• All other “api_*” modules are optional connectors that need their own endpoint configuration pages.
Main Components
a. Drupal Core (HTTP server, theme layer)
b. module_api_pleiade (Core API module)
c. api_lemon_pleiade (Core settings & services for LL:NG)
– api_glpi_pleiade
– api_moodle_pleiade
– api_nextcloud_pleiade
– api_parapheur_pleiade
– api_pastell_pleiade
– api_user_pleiade
– api_watcha_pleiade
– api_zimbra_pleiade
– …plus datatable_pleiade, module_actu_pleiade, guide_utilisateur_pleiade, etc.
e. External Services / Endpoints (e.g. GLPI API, LL:NG API, Moodle API, Nextcloud API, Zimbra API)
f. Front-end Assets (CSS/JS libraries served to browser)
Relationships & Data Flows
• User Browser → Drupal Core (HTTP request)
• Drupal Core routes to Controller in a connector module
• Controller invokes Form or Service (dependency injected)
• Service in connector module → module_api_pleiade / api_lemon_pleiade for shared logic or settings
• Service → External API over HTTP/REST
• External API response → Service → Controller → render Twig block or return JSON (AJAX)
• Front-end JS library in module listens for user interaction → AJAX call to Drupal route → repeat
Architectural Patterns & Principles
• MVC (Symfony-based routing + controllers + templating)
• Dependency Injection (services registered in .services.yml)
• Drupal Plugin system for Blocks (e.g. AccessibilityToolsBlock)
• Separation of Concerns:
• Presentation layer (CSS/JS, Twig)
• Application logic (Controllers, Forms)
• Integration layer (Service classes calling external APIs)