# markcbell/curver architecture

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

- Interactive diagram: https://gitdiagram.com/markcbell/curver
- Repository: https://github.com/markcbell/curver

## Overview

##### Main Components

a) Core Kernel Layer:
- Modules like triangulation.py, curve.py, and mappingclassgroup.py
- Related mathematical operations (homology.py, lamination.py)

b) Application Layer:
- This above the kernel layer
- Main.py, options.py, and vector.py components
- User interface elements

c) Loading/Interface Layer:
- Load.py as an intermediary between external input and the kernel
- How it interfaces with the core functionality

##### Component Relationships

- External Input → load.py
- load.py → Kernel Layer
- Kernel Layer → Application Layer
- Internal kernel dependencies (e.g., curve.py depending on triangulation.py)

##### Specific Implementation Details

**Kernel Layer:**

- Geometric Core   |
- triangulation  |
- curve          |
- arc            |

- Algebraic        |
- homology      |
- permutation   |

- Group Theory     |
- mappingclass  |
- encoding      |

##### Additional Elements

Include:
- Version compatibility (Python 3.8 - 3.12)
- External dependencies
- Documentation generation flow
- CI/CD pipeline connections

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Application Layer"
        Main["Main"]:::application
        Options["Options"]:::application
        Vector["Vector"]:::application
    end

    subgraph "Interface Layer"
        Load["Load"]:::interface
    end

    subgraph "Core Kernel Layer"
        subgraph "Geometric Core"
            Triangulation["Triangulation"]:::kernel
            Curve["Curve"]:::kernel
            Arc["Arc"]:::kernel
            Lamination["Lamination"]:::kernel
            CurveGraph["CurveGraph"]:::kernel
        end

        subgraph "Algebraic"
            Homology["Homology"]:::kernel
            Permutation["Permutation"]:::kernel
        end

        subgraph "Group Theory"
            MCG["Mapping Class Group"]:::kernel
            Encoding["Encoding"]:::kernel
            Moves["Moves"]:::kernel
            Twist["Twist"]:::kernel
        end
    end

    subgraph "Testing Framework"
        TestTriangulation["Test Triangulation"]:::test
        TestCurve["Test Curve"]:::test
        TestArc["Test Arc"]:::test
        TestHomology["Test Homology"]:::test
        TestPermutation["Test Permutation"]:::test
        TestMCG["Test MCG"]:::test
        TestEncoding["Test Encoding"]:::test
    end

    subgraph "Documentation"
        UserDocs["User Documentation"]:::docs
        APIDocs["API Documentation"]:::docs
        DevDocs["Developer Documentation"]:::docs
    end

    %% Relationships
    Load --> Main
    Load --> Triangulation
    Main --> Options
    Main --> Vector

    Triangulation --> Curve
    Curve --> Arc
    Arc --> Lamination
    Lamination --> CurveGraph

    Homology --> MCG
    Permutation --> MCG
    MCG --> Encoding
    MCG --> Moves
    MCG --> Twist

    TestTriangulation --> Triangulation
    TestCurve --> Curve
    TestArc --> Arc
    TestHomology --> Homology
    TestPermutation --> Permutation
    TestMCG --> MCG
    TestEncoding --> Encoding

    %% Click Events
    click Main "https://github.com/markcbell/curver/blob/master/curver/application/main.py"
    click Options "https://github.com/markcbell/curver/blob/master/curver/application/options.py"
    click Vector "https://github.com/markcbell/curver/blob/master/curver/application/vector.py"
    click Load "https://github.com/markcbell/curver/blob/master/curver/load.py"
    click Triangulation "https://github.com/markcbell/curver/blob/master/curver/kernel/triangulation.py"
    click Curve "https://github.com/markcbell/curver/blob/master/curver/kernel/curve.py"
    click Arc "https://github.com/markcbell/curver/blob/master/curver/kernel/arc.py"
    click Homology "https://github.com/markcbell/curver/blob/master/curver/kernel/homology.py"
    click Permutation "https://github.com/markcbell/curver/blob/master/curver/kernel/permutation.py"
    click MCG "https://github.com/markcbell/curver/blob/master/curver/kernel/mappingclassgroup.py"
    click Encoding "https://github.com/markcbell/curver/blob/master/curver/kernel/encoding.py"
    click Lamination "https://github.com/markcbell/curver/blob/master/curver/kernel/lamination.py"
    click CurveGraph "https://github.com/markcbell/curver/blob/master/curver/kernel/curvegraph.py"
    click Moves "https://github.com/markcbell/curver/blob/master/curver/kernel/moves.py"
    click Twist "https://github.com/markcbell/curver/blob/master/curver/kernel/twist.py"
    click TestTriangulation "https://github.com/markcbell/curver/blob/master/tests/triangulation.py"
    click TestCurve "https://github.com/markcbell/curver/blob/master/tests/curve.py"
    click TestArc "https://github.com/markcbell/curver/blob/master/tests/arc.py"
    click TestHomology "https://github.com/markcbell/curver/blob/master/tests/homology.py"
    click TestPermutation "https://github.com/markcbell/curver/blob/master/tests/permutation.py"
    click TestMCG "https://github.com/markcbell/curver/blob/master/tests/mappingclassgroup.py"
    click TestEncoding "https://github.com/markcbell/curver/blob/master/tests/encoding.py"
    click UserDocs "https://github.com/markcbell/curver/tree/master/docs/user"
    click APIDocs "https://github.com/markcbell/curver/tree/master/docs/api"
    click DevDocs "https://github.com/markcbell/curver/tree/master/docs/dev"

    %% Styles
    classDef kernel fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef application fill:#f9d79b,stroke:#333,stroke-width:2px
    classDef interface fill:#a8e6cf,stroke:#333,stroke-width:2px
    classDef test fill:#dcd6f7,stroke:#333,stroke-width:2px
    classDef docs fill:#f7d6e0,stroke:#333,stroke-width:2px
```
