# meeds-io/meeds architecture

> Architecture diagram of the GitHub repository meeds-io/meeds, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/meeds-io/meeds
- Repository: https://github.com/meeds-io/meeds

## Overview

##### Project type and purpose
- This is a Maven-driven, multi-module Java distribution of the “Meeds” (eXo Platform) community portal.
- Goal: compile service-layer modules, assemble web applications, package everything into a standalone Tomcat distribution (and Docker images).

##### High-level anatomy from the file tree
- Top-level pom.xml: orchestrates modules.
- packaging/… : Maven modules that build assemblies (PLF-assemblies), collect community sources, prepare a standalone Tomcat distribution, manage dependencies, resources, Tomcat config, start/stop scripts.
- services/… : Java service modules (JARs) that plug into the Exo container (CommunityEdition, Configuration, Tomcat listener for injecting DataSources).
- webapps/… : WAR modules providing portal extensions (Meeds UI, root portal, Sites extension, Tomcat integration webapp).
- .github/workflows & crowdin.yml: CI/CD pipeline and translation sync.
- README: describes Maven build/install, output directory, how to launch the bundled server, and Docker image signing.

##### Components
a. Build & Delivery
– Developer workstation & GitHub repo
– Maven (multi-module build)
– External Maven repo (repository.exoplatform.org)
– Crowdin translation service
– GitHub Actions workflows → build, test, package, publish archives & Docker images
– Cosign for Docker image signing
b. Packaging modules
– plf-assemblies: assembly descriptors → assemble JARs, WARs, resources, Tomcat config
– plf-community-tomcat-standalone: produces meeds-community-<version> folder → bundled Tomcat + apps
– plf-dependencies / resources / tomcat-resources: supplies libs, configuration XMLs, filters for HSQLDB/MySQL/Postgres
c. Service modules (JARs) loaded by the Exo container
– plf-community-edition-service
– plf-configuration
– plf-tomcat-pc-creator-listener
d. Web application modules (WARs) deployed on Tomcat
– plf-meeds-extension (portal UI, i18n resources, groovy templates)
– plf-root-webapp (root landing pages)
– plf-sites-extension (sites management, templates, JSPs, groovy, images)
– plf-tomcat-integration-webapp (Tomcat context integration)
e. Runtime distribution
– Tomcat server (container)
– Exo container inside Tomcat
– Loaded service JARs (as Exo plugins)
– Deployed WARs
– Configuration files (WEB-INF/conf, META-INF/exo-conf, platform.properties)
– Embedded DB (HSQLDB by default) or external DB (MySQL/PostgreSQL) via DataSourceInjector

##### Relationships & interactions
- Maven compiles service and webapp modules → artifacts (JAR/WAR)
- Packaging modules reference those artifacts + resource files + Tomcat base → produce standalone distribution
- CI/CD workflows orchestrate the Maven build, run tests, assemble Docker images, sign them via cosign, push to GHCR/DockerHub
- At runtime, user HTTP requests → Tomcat → Exo container loads service modules → WARs handle portal UI → services provide business logic → database via JDBC

##### Architectural patterns & design principles
- Modular monolith: separate modules for services vs. UI extensions, all assembled into one deployable unit
- Plugin architecture: services register via META-INF/services/org.exoplatform.container.ExoProfileExtension
- Assembly pattern: use Maven Assembly Plugin descriptors (packaging/plf-assemblies/src/main/resources/assemblies/*.xml)
- CI/CD as code: GitHub Actions YAMLs define build/test/publish pipelines
- Internationalization via Crowdin + properties files under webapps/*/locale

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build & CI/CD
    subgraph "Build & CI/CD"
        direction TB
        GHREPO["GitHub Repository"]:::build
        GHCA["GitHub Actions Workflows"]:::build
        CROW["Crowdin Translation Sync"]:::build
        MAVEN["Maven<br>(Multi-Module Build)"]:::build
        EXRM["External Maven Repository"]:::build
        DOCKER["Docker Registry"]:::build
        COSIGN["Cosign Signing"]:::build
    end

    %% Packaging Modules
    subgraph "Packaging Modules"
        direction TB
        PLF_ASM["plf-assemblies"]:::packaging
        PLF_SOURCES["plf-community-sources"]:::packaging
        PLF_STANDALONE["plf-community-tomcat-standalone"]:::packaging
        PLF_DEPS["plf-dependencies"]:::packaging
        PLF_RESOURCES["plf-packaging-resources"]:::packaging
        PLF_TOMCAT_RES["plf-tomcat-resources"]:::packaging
        STDIST["Standalone Tomcat Distribution"]:::packaging
    end

    %% Service Modules
    subgraph "Service Modules"
        direction TB
        SVC1["plf-community-edition-service"]:::service
        SVC2["plf-configuration"]:::service
        SVC3["plf-tomcat-pc-creator-listener"]:::service
    end

    %% Webapp Modules
    subgraph "Webapp Modules"
        direction TB
        WEB_POM["webapps/pom.xml"]:::webapp
        W1["plf-meeds-extension"]:::webapp
        W2["plf-root-webapp"]:::webapp
        W3["plf-sites-extension"]:::webapp
        W4["plf-tomcat-integration-webapp"]:::webapp
    end

    %% Runtime Environment
    subgraph "Runtime Environment"
        direction TB
        USER["User Browser"]:::runtime
        TOMCAT["Tomcat Server"]:::runtime
        EXO["Exo Container"]:::runtime
        DB["Database<br>(HSQLDB / MySQL / Postgres)"]:::runtime
    end

    %% Build & Delivery fl ow
    GHREPO --> GHCA
    GHCA --> MAVEN
    GHCA --> DOCKER
    GHCA --> COSIGN
    MAVEN --> EXRM

    %% Packaging flow
    MAVEN --> PLF_ASM
    MAVEN --> PLF_SOURCES
    MAVEN --> PLF_STANDALONE
    MAVEN --> PLF_DEPS
    MAVEN --> PLF_RESOURCES
    MAVEN --> PLF_TOMCAT_RES

    PLF_ASM --> STDIST
    PLF_SOURCES --> STDIST
    PLF_DEPS --> STDIST
    PLF_RESOURCES --> STDIST
    PLF_TOMCAT_RES --> STDIST

    STDIST --> TOMCAT

    %% Module compilation
    MAVEN --> SVC1
    MAVEN --> SVC2
    MAVEN --> SVC3

    MAVEN --> WEB_POM
    WEB_POM --> W1
    WEB_POM --> W2
    WEB_POM --> W3
    WEB_POM --> W4

    %% Runtime requests
    USER --> TOMCAT
    TOMCAT --> EXO
    EXO --> SVC1
    EXO --> SVC2
    EXO --> SVC3
    TOMCAT --> W1
    TOMCAT --> W2
    TOMCAT --> W3
    TOMCAT --> W4
    EXO --> DB

    %% Click Events
    click GHCA "https://github.com/meeds-io/meeds/blob/develop/.github/workflows/*.yml"
    click CROW "https://github.com/meeds-io/meeds/blob/develop/crowdin.yml"
    click MAVEN "https://github.com/meeds-io/meeds/blob/develop/pom.xml"
    click PLF_ASM "https://github.com/meeds-io/meeds/tree/develop/packaging/plf-assemblies"
    click PLF_SOURCES "https://github.com/meeds-io/meeds/tree/develop/packaging/plf-community-sources"
    click PLF_STANDALONE "https://github.com/meeds-io/meeds/tree/develop/packaging/plf-community-tomcat-standalone"
    click PLF_DEPS "https://github.com/meeds-io/meeds/tree/develop/packaging/plf-dependencies"
    click PLF_RESOURCES "https://github.com/meeds-io/meeds/tree/develop/packaging/plf-packaging-resources"
    click PLF_TOMCAT_RES "https://github.com/meeds-io/meeds/tree/develop/packaging/plf-tomcat-resources"
    click SVC1 "https://github.com/meeds-io/meeds/tree/develop/services/plf-community-edition-service"
    click SVC2 "https://github.com/meeds-io/meeds/tree/develop/services/plf-configuration"
    click SVC3 "https://github.com/meeds-io/meeds/tree/develop/services/plf-tomcat-pc-creator-listener"
    click W1 "https://github.com/meeds-io/meeds/tree/develop/webapps/plf-meeds-extension"
    click W2 "https://github.com/meeds-io/meeds/tree/develop/webapps/plf-root-webapp"
    click W3 "https://github.com/meeds-io/meeds/tree/develop/webapps/plf-sites-extension"
    click W4 "https://github.com/meeds-io/meeds/tree/develop/webapps/plf-tomcat-integration-webapp"
    click WEB_POM "https://github.com/meeds-io/meeds/blob/develop/webapps/pom.xml"

    %% Styles
    classDef build fill:#D0E8FF,stroke:#357ABD,stroke-width:1px
    classDef packaging fill:#FFE5B4,stroke:#FF8C00,stroke-width:1px
    classDef service fill:#D4FFD4,stroke:#28A745,stroke-width:1px
    classDef webapp fill:#E8FFE5,stroke:#228B22,stroke-width:1px
    classDef runtime fill:#F0F0F0,stroke:#A0A0A0,stroke-width:1px
```
