# eclipse-glsp/glsp architecture

> Architecture diagram of the GitHub repository eclipse-glsp/glsp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eclipse-glsp/glsp
- Repository: https://github.com/eclipse-glsp/glsp

## Overview

##### Main Components

a. Client-Side Components:
- GLSP Client Core (based on Sprotty)
- IDE Integration Modules:
- Theia Integration
- VS Code Integration
- Eclipse Integration
- Standalone Integration

b. Server-Side Components:
- Java-based GLSP Server
- Node.js-based GLSP Server
- Protocol Layer
- Model Processing Components

##### Key Relationships to Highlight

a. Communication Flows:
- Client-Server Protocol Communication
- IDE-specific Integration Points
- Model Data Flow
- User Interaction Flow

**┌─ IDE Integration Layer ─────────────────────┐**
- [Theia] [VSCode] [Eclipse] [Standalone]     │
- GLSP Client Layer ──────────────────────── │
- [Sprotty-based Client Components]           │
- Protocol Layer ────────────────────────────┤
- [GLSP Protocol & Communication]             │
- Server Layer ──────────────────────────────┤
- [Java Server] [Node.js Server]              │
- ┘

##### Specific Implementation Details

Key features as sub-components:
- Model Management
- Validation System
- Command Handling
- Layout Engine
- Export Functionality

##### Deployment View

A separate section showing:
- Runtime deployment options
- Container configurations
- Network communication paths
- Integration deployment scenarios

Remember to include version compatibility information and note the three-month release cycle in supplementary documentation.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph IDE
        Theia["Theia Integration"]
        VSCode["VS Code Integration"]
        Eclipse["Eclipse Integration"]
        Standalone["Standalone Integration"]
    end

    subgraph Client
        ClientCore["GLSP Client Core"]
        SprottyComponents["Sprotty Components"]
        DiagramEditing["Diagram Editing"]
        ValidationClient["Validation System"]
        CommandHandling["Command Handling"]
        LayoutEngine["Layout Engine"]
        ExportFunc["Export Functionality"]
    end

    subgraph Protocol["Protocol & Communication"]
        GLSP_Protocol["GLSP Protocol"]:::protocol
        ModelData["Model Data Flow"]
        UserInteraction["User Interaction Flow"]
    end

    subgraph Server
        JavaServer["Java Server"]:::server
        NodeServer["Node.js Server"]:::server
        ModelManagement["Model Management"]
        ValidationServer["Server Validation"]
    end

    subgraph DevOps
        CICD["CI/CD Pipeline"]:::devops
        Docker["Docker Infrastructure"]:::devops
        BuildSystem["Build System"]:::devops
        TestInfra["Testing Infrastructure"]:::devops
    end

    %% Relationships
    Theia --> ClientCore
    VSCode --> ClientCore
    Eclipse --> ClientCore
    Standalone --> ClientCore

    ClientCore --> SprottyComponents
    ClientCore --> DiagramEditing
    ClientCore --> ValidationClient
    ClientCore --> CommandHandling
    ClientCore --> LayoutEngine
    ClientCore --> ExportFunc

    ClientCore -.-> GLSP_Protocol
    JavaServer -.-> GLSP_Protocol
    NodeServer -.-> GLSP_Protocol

    GLSP_Protocol --> ModelData
    GLSP_Protocol --> UserInteraction

    JavaServer --> ModelManagement
    NodeServer --> ModelManagement
    JavaServer --> ValidationServer
    NodeServer --> ValidationServer

    %% Click Events
    click GLSP_Protocol "https://github.com/eclipse-glsp/glsp/blob/master/PROTOCOL.md"
    click CICD "https://github.com/eclipse-glsp/glsp/blob/master/.github/workflows/codeql-analysis.yml"
    click Docker "https://github.com/eclipse-glsp/glsp/tree/master/docker/ci"
    click BuildSystem "https://github.com/eclipse-glsp/glsp/tree/master/dev-packages"
    click TestInfra "https://github.com/eclipse-glsp/glsp/tree/master/dev-packages"

    %% Styles
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px;
    classDef server fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef protocol fill:#FFE5B4,stroke:#333,stroke-width:2px;
    classDef devops fill:#E6E6FA,stroke:#333,stroke-width:2px;

    %% Legend
    subgraph Legend
        L1["Client Component"]
        L2["Server Component"]:::server
        L3["Protocol Component"]:::protocol
        L4["DevOps Component"]:::devops
    end
```
