# mikelevins/folio2 architecture

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

## Overview

##### Main Architecture Overview

a) Core Components Layer:
- "as" and "make" subsystems at the foundation level as they are fundamental utilities
- Them as hexagonal ports/adapters since they're generic functions used across the system

b) Data Structures Layer:
- Their relationships with connecting lines

c) Advanced Features Layer:
- Series and taps at the top level
- Their dependencies on lower layers

##### Component Relationships

**External Dependencies (Bottom Layer)**
**[Alexandria] [FSet] [SERIES] [Closer-MOP]**
- ↑           ↑          ↑
**Core Utilities (Foundation)**
**[as] ←→ [make]**
- ↑
**Data Structures (Middle Layer)**
- ↑
**Advanced Features (Top Layer)**
**[series] → [taps]**

##### Additional Elements

Include:
- Version information
- External dependency versions
- Package naming conventions (net.bardcode.folio2)

##### Integration Points

Highlight:
- How the components integrate with Common Lisp's standard libraries
- Integration points with FSet and SERIES
- Extension points for custom implementations

##### Data Flow

Typical data flow patterns:
- Type conversion flows through 'as'
- Construction patterns through 'make'
- Series transformation chains
- Tap data source connections

Remember to include notes about the optional nature of various components and how they can be loaded independently, as this is a key feature of the system's design.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef core fill:#90EE90,stroke:#333,stroke-width:2px
    classDef data fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef advanced fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef external fill:#FFE4B5,stroke:#333,stroke-width:2px
    classDef syntax fill:#D3D3D3,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
    classDef test fill:#FFB6C6,stroke:#333,stroke-width:2px

    %% External Dependencies Layer
    subgraph Dependencies
        Alexandria["Alexandria"]:::external
        FSet["FSet"]:::external
        SERIES["SERIES"]:::external
        CloserMOP["Closer-MOP"]:::external
    end

    %% Core Utilities Layer
    subgraph CoreUtils
        AS["AS System"]:::core
        MAKE["MAKE System"]:::core
    end

    %% Data Structures Layer
    subgraph DataStructures
        BOXES["Boxes"]:::data
        PAIRS["Pairs"]:::data
        MAPS["Maps"]:::data
        SEQ["Sequences"]:::data
    end

    %% Advanced Features Layer
    subgraph AdvancedFeatures
        SERIES_F["Series"]:::advanced
        TAPS["Taps"]:::advanced
    end

    %% Syntax Extensions
    AS_SYNTAX["AS Syntax"]:::syntax
    MAPS_SYNTAX["Maps Syntax"]:::syntax
    SEQ_SYNTAX["Sequences Syntax"]:::syntax

    %% Test Components
    AS_TEST["AS Tests"]:::test
    MAKE_TEST["MAKE Tests"]:::test
    BOXES_TEST["Boxes Tests"]:::test
    PAIRS_TEST["Pairs Tests"]:::test
    MAPS_TEST["Maps Tests"]:::test
    SEQ_TEST["Sequences Tests"]:::test
    SERIES_TEST["Series Tests"]:::test
    TAPS_TEST["Taps Tests"]:::test

    %% Relationships
    Alexandria --> AS
    Alexandria --> MAKE
    FSet --> MAPS
    SERIES --> SERIES_F
    CloserMOP --> AS

    AS <--> MAKE
    MAKE --> BOXES
    MAKE --> PAIRS
    MAKE --> MAPS
    MAKE --> SEQ

    BOXES --> SERIES_F
    PAIRS --> SERIES_F
    MAPS --> SERIES_F
    SEQ --> SERIES_F

    SERIES_F --> TAPS

    %% Syntax Extension Relationships
    AS_SYNTAX -.-> AS
    MAPS_SYNTAX -.-> MAPS
    SEQ_SYNTAX -.-> SEQ

    %% Test Relationships
    AS --> AS_TEST
    MAKE --> MAKE_TEST
    BOXES --> BOXES_TEST
    PAIRS --> PAIRS_TEST
    MAPS --> MAPS_TEST
    SEQ --> SEQ_TEST
    SERIES_F --> SERIES_TEST
    TAPS --> TAPS_TEST

    %% Click Events
    click AS "https://github.com/mikelevins/folio2/blob/master/folio2-as.asd"
    click MAKE "https://github.com/mikelevins/folio2/blob/master/folio2-make.asd"
    click BOXES "https://github.com/mikelevins/folio2/blob/master/folio2-boxes.asd"
    click PAIRS "https://github.com/mikelevins/folio2/blob/master/folio2-pairs.asd"
    click MAPS "https://github.com/mikelevins/folio2/blob/master/folio2-maps.asd"
    click SEQ "https://github.com/mikelevins/folio2/blob/master/folio2-sequences.asd"
    click SERIES_F "https://github.com/mikelevins/folio2/blob/master/folio2-series.asd"
    click TAPS "https://github.com/mikelevins/folio2/blob/master/folio2-taps.asd"
    click AS_SYNTAX "https://github.com/mikelevins/folio2/blob/master/folio2-as-syntax.asd"
    click MAPS_SYNTAX "https://github.com/mikelevins/folio2/blob/master/folio2-maps-syntax.asd"
    click SEQ_SYNTAX "https://github.com/mikelevins/folio2/blob/master/folio2-sequences-syntax.asd"
    click AS_TEST "https://github.com/mikelevins/folio2/blob/master/folio2-as-tests.asd"
    click MAKE_TEST "https://github.com/mikelevins/folio2/blob/master/folio2-make-tests.asd"
    click BOXES_TEST "https://github.com/mikelevins/folio2/blob/master/folio2-boxes-tests.asd"
    click PAIRS_TEST "https://github.com/mikelevins/folio2/blob/master/folio2-pairs-tests.asd"
    click MAPS_TEST "https://github.com/mikelevins/folio2/blob/master/folio2-maps-tests.asd"
    click SEQ_TEST "https://github.com/mikelevins/folio2/blob/master/folio2-sequences-tests.asd"
    click SERIES_TEST "https://github.com/mikelevins/folio2/blob/master/folio2-series-tests.asd"
    click TAPS_TEST "https://github.com/mikelevins/folio2/blob/master/folio2-taps-tests.asd"
```
