# pondersource/dev-stock architecture

> Architecture diagram of the GitHub repository pondersource/dev-stock, 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/pondersource/dev-stock
- Repository: https://github.com/pondersource/dev-stock

## Overview

##### Main Components

a) Testing Infrastructure Layer:
- Cypress Test Runner
- GitHub Actions CI Pipeline
- Docker Container Environment

b) Platform Layer:
- EFSS Platforms (Nextcloud, ownCloud, oCIS, Seafile)
- OCM Stub Implementation
- Reva Middleware

c) Test Categories Layer:
- Login Tests
- Share Link Tests
- Share With Tests
- Invite Link Tests

##### Relationships and Data Flow

- Control flow from CI pipeline to Docker containers
- Test execution flow from Cypress to platforms
- Integration points between Reva and EFSS platforms

##### Component Details

Docker Environment:
**┌─ Docker Environment ──────────────────┐**
- ┌─ EFSS Containers ─┐ ┌─ Support ──┐ │
- Nextcloud      │ │ - Reva     │ │
- ownCloud       │ │ - OCMStub  │ │
- oCIS           │ │ - Database │ │
- Seafile        │ └───────────┘ │
- ┘                 │
- ┘

Testing Framework:
**┌─ Test Infrastructure ───────────────┐**
- ┌─ Cypress ──┐ ┌─ CI Pipeline ───┐ │
- E2E Tests  │ │ GitHub Actions  │ │
- Scenarios  │ │ Status Badges   │ │
- ┘ └────────────────┘  │
- ┘

##### Implementation Details

Technical annotations for:
- Docker image versions
- Platform versions
- Test suite organization
- Configuration paths

##### Architectural Patterns

Highlight:
- Microservices architecture (Docker containers)
- Test automation patterns
- Integration patterns for OCM
- Configuration management

##### Cross-cutting concerns on the sides

Key considerations:
- Clear separation between test environments
- Version compatibility matrices
- OCM protocol flows
- Test scenario coverage

This system design should emphasize the project's focus on testing interoperability between different EFSS platforms while maintaining a clear view of the infrastructure supporting these tests.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef infrastructure fill:#d1f7c4,stroke:#333
    classDef platform fill:#b3e0ff,stroke:#333
    classDef testing fill:#ffe6cc,stroke:#333
    classDef support fill:#ffeb99,stroke:#333
    classDef testcat fill:#e6ccff,stroke:#333

    %% Infrastructure Layer
    subgraph Infrastructure
        CI["GitHub Actions CI"]:::infrastructure
        Docker["Docker Environment"]:::infrastructure
        Cypress["Cypress Test Runner"]:::infrastructure
    end

    %% Platform Layer
    subgraph Platforms
        NC["Nextcloud"]:::platform
        OC["ownCloud"]:::platform
        OCIS["oCIS"]:::platform
        SF["Seafile"]:::platform
        Reva["Reva Middleware"]:::support
        OCMStub["OCM Stub"]:::support
    end

    %% Test Categories Layer
    subgraph TestCategories
        Login["Login Tests"]:::testcat
        ShareLink["Share Link Tests"]:::testcat
        ShareWith["Share With Tests"]:::testcat
        InviteLink["Invite Link Tests"]:::testcat
        Utils["Test Utils"]:::testcat
    end

    %% Relationships
    CI --> Docker
    Docker --> NC & OC & OCIS & SF
    Docker --> Reva
    Docker --> OCMStub
    Cypress --> Login & ShareLink & ShareWith & InviteLink
    Utils --> Login & ShareLink & ShareWith & InviteLink
    NC <--> OC
    NC <--> OCIS
    NC <--> SF
    OC <--> OCIS
    OC <--> SF
    OCIS <--> SF
    Reva --> NC & OC & OCIS & SF

    %% Click Events
    click CI "https://github.com/pondersource/dev-stock/tree/main//.github/workflows/"
    click Docker "https://github.com/pondersource/dev-stock/tree/main//docker/"
    click Cypress "https://github.com/pondersource/dev-stock/tree/main//cypress/ocm-test-suite/"
    click OCMStub "https://github.com/pondersource/dev-stock/blob/main//docker/dockerfiles/ocmstub.Dockerfile"
    click Reva "https://github.com/pondersource/dev-stock/tree/main//docker/scripts/reva/"
    click Login "https://github.com/pondersource/dev-stock/tree/main//cypress/ocm-test-suite/cypress/e2e/login/"
    click ShareLink "https://github.com/pondersource/dev-stock/tree/main//cypress/ocm-test-suite/cypress/e2e/share-link/"
    click ShareWith "https://github.com/pondersource/dev-stock/tree/main//cypress/ocm-test-suite/cypress/e2e/share-with/"
    click InviteLink "https://github.com/pondersource/dev-stock/tree/main//cypress/ocm-test-suite/cypress/e2e/invite-link/"
    click Utils "https://github.com/pondersource/dev-stock/tree/main//cypress/ocm-test-suite/cypress/e2e/utils/"

    %% Legend
    subgraph Legend
        L1["Infrastructure"]:::infrastructure
        L2["Platform"]:::platform
        L3["Testing"]:::testing
        L4["Support Services"]:::support
        L5["Test Categories"]:::testcat
    end
```
