# owncloud/web-extensions architecture

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

- Interactive diagram: https://gitdiagram.com/owncloud/web-extensions
- Repository: https://github.com/owncloud/web-extensions

## Overview

##### Main Components Structure

a. Core Components:
- A Docker Container representation since the project uses containerization

b. Extension Apps Layer:
- File Operation Apps (Unzip, Importer)
- Integration Apps (Cast, External Sites)
- UI Enhancement Apps (Progress Bars)

##### Architecture Patterns to Highlight

- Microservices Architecture: Each app is independent with its own:
- Source code (src directory)
- Configuration (vite.config.ts)
- Localization (l10n folder)
- Tests (unit/e2e)

- Common Infrastructure Layer:
- Shared development tools (dev/docker)
- Common configuration (eslint, prettier, typescript)
- Build and deployment pipelines (drone)

##### Integration Points

- How extensions connect to the ownCloud Web core
- Communication between Docker containers

##### Component Details

- Vue.js components (*.vue files) - Use blue rectangles
- TypeScript services (*.ts files) - Use green rectangles
- Configuration files - Use yellow diamonds
- Test suites - Use purple hexagons

##### Deployment View

A section showing:
- Docker container structure
- Traefik routing layer (from dev/docker/traefik)
- Volume mounts and networking

- Core Platform: Dark Blue
- Extension Apps: Light Blue
- Infrastructure: Gray
- External Services: Green
- Integration Points: Red dots

Important Elements to Include:
##### External dependency connections

Keep the abstraction level focused on the architectural components while showing the modular nature of the extension system. Emphasize how each app maintains its independence while integrating with the core platform.

- Number of extensions
- Main technologies (Vue.js, TypeScript)
- Testing frameworks
- Build tools

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Platform
        Core["ownCloud Web Core"]
    end

    subgraph "Extension Apps"
        direction TB
        subgraph "Content Apps"
            DrawIO["Draw.io App"]
            JSONViewer["JSON Viewer App"]
        end

        subgraph "File Apps"
            Unzip["Unzip App"]
            Importer["Importer App"]
        end

        subgraph "Integration Apps"
            Cast["Cast App"]
            ExtSites["External Sites App"]
        end

        subgraph "UI Apps"
            Progress["Progress Bars App"]
        end
    end

    subgraph "Infrastructure"
        Docker["Docker Container"]
        Traefik["Traefik Router"]:::infra
        DevEnv["Development Environment"]:::infra
        BuildConfig["Build System"]:::infra
    end

    subgraph "Testing Framework"
        TestCore["Test Core"]:::test
        E2EHelpers["E2E Helpers"]:::test
        TestPages["Test Pages"]:::test
    end

    subgraph "Common Services"
        L10n["Localization System"]:::service
        Pipeline["CI/CD Pipeline"]:::service
    end

    Core --> Docker
    Docker --> Traefik
    Traefik --> DrawIO & JSONViewer & Unzip & Importer & Cast & ExtSites & Progress
    DevEnv --> Docker
    BuildConfig --> DrawIO & JSONViewer & Unzip & Importer & Cast & ExtSites & Progress
    L10n --> DrawIO & JSONViewer & Unzip & Importer & Cast & ExtSites & Progress
    Pipeline --> Docker

    TestCore --> E2EHelpers
    E2EHelpers --> TestPages

    %% Component Mappings
    click DrawIO "https://github.com/Owncloud/web-extensions/tree/main/packages/web-app-draw-io"
    click JSONViewer "https://github.com/Owncloud/web-extensions/tree/main/packages/web-app-json-viewer"
    click Unzip "https://github.com/Owncloud/web-extensions/tree/main/packages/web-app-unzip"
    click Importer "https://github.com/Owncloud/web-extensions/tree/main/packages/web-app-importer"
    click Cast "https://github.com/Owncloud/web-extensions/tree/main/packages/web-app-cast"
    click ExtSites "https://github.com/Owncloud/web-extensions/tree/main/packages/web-app-external-sites"
    click Progress "https://github.com/Owncloud/web-extensions/tree/main/packages/web-app-progress-bars"
    click Docker "https://github.com/Owncloud/web-extensions/tree/main/dev/docker"
    click TestCore "https://github.com/Owncloud/web-extensions/tree/main/support"
    click E2EHelpers "https://github.com/Owncloud/web-extensions/tree/main/support/helpers"
    click TestPages "https://github.com/Owncloud/web-extensions/tree/main/support/pages"
    click Traefik "https://github.com/Owncloud/web-extensions/tree/main/dev/docker/traefik"
    click BuildConfig "https://github.com/Owncloud/web-extensions/blob/main/vite.config.ts"
    click L10n "https://github.com/Owncloud/web-extensions/tree/main/packages/*/l10n"
    click DevEnv "https://github.com/Owncloud/web-extensions/blob/main/dev/docker/ocis.web.config.json"
    click Pipeline "https://github.com/Owncloud/web-extensions/blob/main/.drone.star"

    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef infra fill:#e9e9e9,stroke:#666
    classDef service fill:#d9f7be,stroke:#389e0d
    classDef test fill:#f3e8ff,stroke:#722ed1

    %% Legend
    subgraph Legend
        L1[Component]:::default
        L2[Infrastructure]:::infra
        L3[Service]:::service
        L4[Testing]:::test
    end
```
