# axelor/open-suite-webapp architecture

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

- Interactive diagram: https://gitdiagram.com/axelor/open-suite-webapp
- Repository: https://github.com/axelor/open-suite-webapp

## Overview

##### Project Type and Purpose
- This is a full-stack, modular Java web application (“Axelor Open Suite”) built on top of the Axelor Open Platform.
- Purpose: Provide a suite of business modules (CRM, Sales, Finance, HR, Project, Inventory, Production, multi-company/multi-currency/multi-lingual) in a single, extensible system.

##### File Structure Analysis
- Top‐level build files:
- build.gradle, settings.gradle, gradle.properties, Gradle wrapper (gradlew, gradle/wrapper/*)
- buildSrc/…: custom Gradle tasks for XML checks, CSV checks, changelog generation
- Source code layout:
- modules/axelor-open-suite: submodule directory containing all business module code
- src/main/java (not shown, but implied by persistence.xml under src/main/resources)
- src/main/resources: configuration (persistence.xml, axelor-config.properties), i18n CSVs
- No explicit “frontend” vs. “backend” directories: backend Java under modules, frontend static under webapp.

##### Insights from README
- Confirms modular architecture via Git submodules
- Installation requires cloning submodules, building with Gradle
- Built on Axelor Open Platform (likely providing core services, REST endpoints, web framework)

##### Main Components
a. Client / Browser
– Renders HTML/CSS/JS (Leaflet maps, NVD3 charts)
b. Web Server / Application Container
– Serves static webapp files
– Hosts Java servlets/controllers (Spring MVC or equivalent)
c. Business Modules
– CRM, Sales, Finance, HR, Project, Inventory, Production
– Packaged as submodules loaded at runtime
d. Service Layer
– Java services (transactional business logic)
e. Persistence Layer
– JPA/Hibernate (configured via META-INF/persistence.xml)
– RDBMS (e.g., PostgreSQL or MySQL)
f. Build & Deployment Pipeline
– Gradle core + custom buildSrc tasks (XML checks, changelog generation)
– CI/CD integration
g. External Services
– Map tile providers (OpenStreetMap, Google Maps APIs)
– Email/SMS gateways (if modules use notifications)
– Third-party REST APIs

##### Relationships and Data Flows
- User → (HTTPS) → Web Server → Router/Controller
- Controller → Service Layer → Repository Layer → Database
- Service Layer ↔ External APIs (maps, notifications)
- Static Asset Fetch: Browser GET /webapp/* → Web Server

##### Architectural Patterns & Design Principles
- Modular monolith: each business domain packaged as a submodule
- Layered architecture: Presentation → Controller → Service → Repository
- Convention-over-configuration via Axelor Platform
- Gradle build with custom tasks enforces quality checks (XML, CSV, changelog)

##### Key Technologies/Frameworks
- Java 8+ / Jakarta EE or Spring MVC
- Gradle (with buildSrc extension)
- JPA/Hibernate
- Web UI: HTML5, CSS, JavaScript (Leaflet, NVD3)
- Git submodules for modular source
- RDBMS (PostgreSQL, MySQL, etc.)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Interface Layer
    subgraph "User Interface" 
        direction TB
        Browser["Client / Browser"]:::ui
        Leaflet["Leaflet Map Integration"]:::ui
        NVD3["NVD3 Chart Library"]:::ui
        MapDemo["Map Demo Pages & Scripts"]:::ui
        SyncContact["Sync Contact Demo"]:::ui
    end

    %% Application Container
    subgraph "Web Application Container"
        direction TB
        Controller["Web Controllers"]:::service
        ServiceLayer["Service Layer"]:::service
        Repository["Repository Layer"]:::service
        Modules["Business Modules (CRM, Sales, Finance, HR, Project, Inventory, Production)"]:::service
        PersistenceCfg["JPA Config (persistence.xml)"]:::db
        AppConfig["Axelor Platform Config (axelor-config.properties)"]:::service
        subgraph "Internationalization CSVs"
            direction TB
            I18nAll["messages.csv"]:::service
            I18nEN["messages_en.csv"]:::service
            I18nFR["messages_fr.csv"]:::service
        end
    end

    %% Database
    Database["RDBMS Database"]:::db

    %% External Services
    subgraph "External Services"
        direction TB
        MapAPI["Map Tile Providers"]:::external
        Notif["Email/SMS Gateways"]:::external
        ThirdParty["Third-Party REST APIs"]:::external
    end

    %% Build & CI Pipeline
    subgraph "Build & CI Pipeline"
        direction TB
        GradleCore["Core Build Script (build.gradle)"]:::build
        Settings["Settings & Properties (settings.gradle, gradle.properties)"]:::build
        Wrapper["Gradle Wrapper"]:::build
        subgraph "Custom Build Tasks"
            direction TB
            CustomTasks["Tasks Directory"]:::build
            ChangelogTask["Changelog Task"]:::build
            CSVTask["CSV Check Task"]:::build
            RPTTask["RPTDesign Check Task"]:::build
            XMLTask["XML Check Task"]:::build
        end
    end

    %% Data Flows
    Browser -->|"HTTPS Request"| Controller
    Controller -->|"invoke()"| ServiceLayer
    ServiceLayer -->|"data access"| Repository
    Repository -->|"CRUD operations"| Database
    ServiceLayer -->|"call APIs"| MapAPI
    ServiceLayer -->|"send notifications"| Notif
    ServiceLayer -->|"integrate with"| ThirdParty
    Browser -->|"GET static assets"| Leaflet
    Browser --> Leaflet
    Browser --> NVD3
    Browser --> MapDemo
    Browser --> SyncContact

    %% Build Flow
    GradleCore --> Settings
    GradleCore --> Wrapper
    GradleCore --> CustomTasks
    CustomTasks --> ChangelogTask
    CustomTasks --> CSVTask
    CustomTasks --> RPTTask
    CustomTasks --> XMLTask

    %% Click Events
    click Browser "https://github.com/axelor/open-suite-webapp/tree/master/src/main/webapp"
    click Leaflet "https://github.com/axelor/open-suite-webapp/tree/master/src/main/webapp/leaflet"
    click NVD3 "https://github.com/axelor/open-suite-webapp/tree/master/src/main/webapp/lib/nvd3"
    click MapDemo "https://github.com/axelor/open-suite-webapp/tree/master/src/main/webapp/map"
    click SyncContact "https://github.com/axelor/open-suite-webapp/tree/master/src/main/webapp/synccontact"
    click Modules "https://github.com/axelor/open-suite-webapp/tree/master/modules/axelor-open-suite"
    click Controller "https://github.com/axelor/open-suite-webapp/tree/master/modules/axelor-open-suite/src/main/java"
    click PersistenceCfg "https://github.com/axelor/open-suite-webapp/blob/master/src/main/resources/META-INF/persistence.xml"
    click AppConfig "https://github.com/axelor/open-suite-webapp/blob/master/src/main/resources/axelor-config.properties"
    click I18nAll "https://github.com/axelor/open-suite-webapp/blob/master/src/main/resources/i18n/messages.csv"
    click I18nEN "https://github.com/axelor/open-suite-webapp/blob/master/src/main/resources/i18n/messages_en.csv"
    click I18nFR "https://github.com/axelor/open-suite-webapp/blob/master/src/main/resources/i18n/messages_fr.csv"
    click GradleCore "https://github.com/axelor/open-suite-webapp/blob/master/build.gradle"
    click Settings "https://github.com/axelor/open-suite-webapp/blob/master/settings.gradle"
    click Wrapper "https://github.com/axelor/open-suite-webapp/tree/master/gradlew"
    click CustomTasks "https://github.com/axelor/open-suite-webapp/tree/master/buildSrc/src/main/java/com/axelor/gradle/tasks"
    click ChangelogTask "https://github.com/axelor/open-suite-webapp/tree/master/buildSrc/src/main/java/com/axelor/gradle/tasks/changelog"
    click CSVTask "https://github.com/axelor/open-suite-webapp/tree/master/buildSrc/src/main/java/com/axelor/gradle/tasks/csvcheck"
    click RPTTask "https://github.com/axelor/open-suite-webapp/tree/master/buildSrc/src/main/java/com/axelor/gradle/tasks/rptdesigncheck"
    click XMLTask "https://github.com/axelor/open-suite-webapp/tree/master/buildSrc/src/main/java/com/axelor/gradle/tasks/xmlcheck"

    %% Styles
    classDef ui fill:#add8e6,stroke:#333,stroke-width:1px
    classDef service fill:#90ee90,stroke:#333,stroke-width:1px
    classDef db fill:#ffa500,stroke:#333,stroke-width:1px
    classDef external fill:#d8bfd8,stroke:#333,stroke-width:1px
    classDef build fill:#f0e68c,stroke:#333,stroke-width:1px
```
