# lichess-org/mobile architecture

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

- Interactive diagram: https://gitdiagram.com/lichess-org/mobile
- Repository: https://github.com/lichess-org/mobile

## Overview

No explanation provided

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% User Node
    U["User"]:::external

    %% Frontend/UI Layer Subgraph
    subgraph "Frontend/UI Layer"
        A1["lib/src/view"]:::ui
        A2["lib/src/widgets"]:::ui
    end

    %% Business Logic / Domain Layer Subgraph
    subgraph "Business Logic / Domain Layer"
        B1["lib/src/app.dart"]:::business
        B2["lib/src/model"]:::business
        B3["lib/src/utils"]:::business
    end

    %% Data Layer Subgraph
    subgraph "Data Layer"
        C1["lib/src/db"]:::data
        C2["lib/src/network"]:::data
    end

    %% Platform-Specific Layers Subgraph
    subgraph "Platform-Specific Layers"
        D1["android"]:::platform
        D2["ios"]:::platform
    end

    %% External Services Subgraph
    subgraph "External Services"
        E1["lib/firebase_options.dart"]:::external
        E2["android/app/google-services.json"]:::external
        E3["ios/Runner/GoogleService-Info.plist"]:::external
    end

    %% Testing and CI/CD Subgraph
    subgraph "Testing and CI/CD"
        F1["test"]:::testing
        F2[".github/workflows"]:::testing
    end

    %% Arrows representing interactions
    U --> A1
    U --> A2

    %% UI to Business Logic
    A1 --> B1
    A2 --> B1

    %% Business Logic to Data Layer
    B1 --> C1
    B1 --> C2

    %% Business Logic to Platform-Specific Layers
    B1 --> D1
    B1 --> D2

    %% Data Layer to External Services
    C2 --> E2
    C2 --> E3
    C2 --> E1

    %% CI/CD interacts with External Services (deployment) and provides feedback
    F2 --> E1
    F1 --> B1

    %% Legend
    subgraph Legend [Legend]
        L1["UI Layer: Blue"]:::ui
        L2["Business Logic: Green"]:::business
        L3["Data Layer: Yellow"]:::data
        L4["Platform-Specific: Orange"]:::platform
        L5["External Services: Pink"]:::external
        L6["Testing/CI-CD: Grey"]:::testing
    end

    %% Class Definitions for Colour Styling
    classDef ui fill:#bbdefb,stroke:#0d47a1,stroke-width:2px,color:#000;
    classDef business fill:#c8e6c9,stroke:#1b5e20,stroke-width:2px,color:#000;
    classDef data fill:#fff9c4,stroke:#f57f17,stroke-width:2px,color:#000;
    classDef platform fill:#ffe0b2,stroke:#e65100,stroke-width:2px,color:#000;
    classDef external fill:#f8bbd0,stroke:#880e4f,stroke-width:2px,color:#000;
    classDef testing fill:#e0e0e0,stroke:#424242,stroke-width:2px,color:#000;

click A1 "https://github.com/lichess-org/mobile/tree/main/lib/src/view"
click A2 "https://github.com/lichess-org/mobile/tree/main/lib/src/widgets"
click B1 "https://github.com/lichess-org/mobile/blob/main/lib/src/app.dart"
click B2 "https://github.com/lichess-org/mobile/tree/main/lib/src/model"
click B3 "https://github.com/lichess-org/mobile/tree/main/lib/src/utils"
click C1 "https://github.com/lichess-org/mobile/tree/main/lib/src/db"
click C2 "https://github.com/lichess-org/mobile/tree/main/lib/src/network"
click D1 "https://github.com/lichess-org/mobile/tree/main/android"
click D2 "https://github.com/lichess-org/mobile/tree/main/ios"
click E1 "https://github.com/lichess-org/mobile/blob/main/lib/firebase_options.dart"
click E2 "https://github.com/lichess-org/mobile/blob/main/android/app/google-services.json"
click E3 "https://github.com/lichess-org/mobile/blob/main/ios/Runner/GoogleService-Info.plist"
click F1 "https://github.com/lichess-org/mobile/tree/main/test"
click F2 "https://github.com/lichess-org/mobile/tree/main/.github/workflows"
```
