# newman5/aiken-pbl-examples architecture

> Architecture diagram of the GitHub repository newman5/aiken-pbl-examples, 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/newman5/aiken-pbl-examples
- Repository: https://github.com/newman5/aiken-pbl-examples

## Overview

##### Main Components

A. Learning Modules Structure
- Basic Concepts (Module 101)
- Validator Concepts (Module 102-103)
- Advanced Concepts (Module 201-202)

B. Code Components
- Library Components (lib/)
- Validator Components (validators/)
- Homework Components (homework/)
- Documentation Components (module-301/)

**┌─────────────────────────────────────────┐**
- Learning Pathway             │
- ┘
- ↓                 ↓
**┌─────────────┐    ┌──────────────┐**
- Basic      │ → │  Validator   │ → ...
- Concepts   │    │  Concepts    │
- ┘    └──────────────┘

**┌─────────────────────┐**
- Code Modules     │
- ┤
- Library (lib/)    │
- Validators        │
- Homework          │
- ┘

##### Specific Elements

A. Module Progression:
- Module 101 → Module 102 → Module 103 → Module 201 → Module 202

B. Component Relationships:
- How each homework corresponds to its module
- How validators relate to specific concepts
- Link documentation (module-301) to relevant components

##### Technical Details to Highlight

- Aiken Smart Contract Framework
- Testing Framework Integration
- Module Dependencies
- Validation Logic Flow

##### The documentation structure

Remember to maintain a balance between showing the educational structure and the technical implementation details, as this is both a learning tool and a smart contract development project.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Learning_Path
        M101[Module 101 - Basic Concepts]
        M102[Module 102 - Basic Validators]
        M103[Module 103 - Transaction Mocking]
        M201[Module 201 - Advanced Validators]
        M202[Module 202 - Complex Validation]
        M301[Module 301 - Documentation]

        M101 --> M102
        M102 --> M103
        M103 --> M201
        M201 --> M202
        M202 -.-> M301
    end

    subgraph Basic_Concepts
        BC["Basic Concepts Library"]:::module
        Bool["Boolean Operations"]:::component
        Int["Integer Operations"]:::component
        Data["Data Structures"]:::component

        BC --> Bool
        BC --> Int
        BC --> Data
    end

    subgraph Validator_Components
        BV["Basic Validators"]:::module
        TM["Transaction Mocking"]:::module
        AV["Advanced Validators"]:::module
        CV["Complex Validation"]:::module

        SucceedMint["Always Succeed Mint"]:::component
        SucceedSpend["Always Succeed Spend"]:::component
        MockTx["Mock Transactions"]:::component
        Params["Parameter Handling"]:::component
        Time["Time Constraints"]:::component
        ValueComp["Value Comparison"]:::component

        BV --> SucceedMint
        BV --> SucceedSpend
        TM --> MockTx
        AV --> Params
        AV --> Time
        CV --> ValueComp
    end

    subgraph Homework_Components
        HW101["Homework 101"]:::homework
        HW102["Homework 102"]:::homework
        HW103["Homework 103"]:::homework
        HW201["Homework 201"]:::homework
        HW202["Homework 202"]:::homework
    end

    subgraph Documentation
        Specs["Specifications"]:::doc
        ContractDesc["Contract Descriptions"]:::doc
        FlowDiag["Flow Diagrams"]:::doc
    end

    M101 --> BC
    M102 --> BV
    M103 --> TM
    M201 --> AV
    M202 --> CV

    M101 -.-> HW101
    M102 -.-> HW102
    M103 -.-> HW103
    M201 -.-> HW201
    M202 -.-> HW202

    M301 --> Specs
    M301 --> ContractDesc
    M301 --> FlowDiag

    %% Click events for component mapping
    click BC "https://github.com/Newman5/aiken-pbl-examples/tree/main/lib/module-101/"
    click Bool "https://github.com/Newman5/aiken-pbl-examples/blob/main/lib/module-101/p1-bool.ak"
    click Int "https://github.com/Newman5/aiken-pbl-examples/blob/main/lib/module-101/p3-int.ak"
    click Data "https://github.com/Newman5/aiken-pbl-examples/blob/main/lib/module-101/p8-data.ak"
    click BV "https://github.com/Newman5/aiken-pbl-examples/tree/main/validators/module-102/"
    click SucceedMint "https://github.com/Newman5/aiken-pbl-examples/blob/main/validators/module-102/always-succeed-mint.ak"
    click SucceedSpend "https://github.com/Newman5/aiken-pbl-examples/blob/main/validators/module-102/always-succeed-spend.ak"
    click TM "https://github.com/Newman5/aiken-pbl-examples/tree/main/validators/module-103/"
    click MockTx "https://github.com/Newman5/aiken-pbl-examples/blob/main/validators/module-103/l0-mock-tx.ak"
    click AV "https://github.com/Newman5/aiken-pbl-examples/tree/main/validators/module-201/"
    click Params "https://github.com/Newman5/aiken-pbl-examples/blob/main/validators/module-201/l3-parameters.ak"
    click Time "https://github.com/Newman5/aiken-pbl-examples/blob/main/validators/module-201/l6-time.ak"
    click CV "https://github.com/Newman5/aiken-pbl-examples/tree/main/validators/module-202/"
    click ValueComp "https://github.com/Newman5/aiken-pbl-examples/blob/main/validators/module-202/l2-1-comparing-value.ak"
    click HW101 "https://github.com/Newman5/aiken-pbl-examples/tree/main/homework/hw-101/"
    click HW102 "https://github.com/Newman5/aiken-pbl-examples/tree/main/homework/hw-102/"
    click HW103 "https://github.com/Newman5/aiken-pbl-examples/tree/main/homework/hw-103/"
    click HW201 "https://github.com/Newman5/aiken-pbl-examples/tree/main/homework/hw-201/"
    click HW202 "https://github.com/Newman5/aiken-pbl-examples/tree/main/homework/hw-202/"
    click Specs "https://github.com/Newman5/aiken-pbl-examples/blob/main/module-301/201-spec.md"
    click ContractDesc "https://github.com/Newman5/aiken-pbl-examples/blob/main/module-301/201.1-contracts-description.md"
    click FlowDiag "https://github.com/Newman5/aiken-pbl-examples/blob/main/module-301/201.7-flow-diagram.md"

    %% Styling
    classDef module fill:#a8d5e5
    classDef component fill:#d8f3dc
    classDef homework fill:#ffd6a5
    classDef doc fill:#ffadad
    
    %% Legend
    subgraph Legend
        L1[Module]:::module
        L2[Component]:::component
        L3[Homework]:::homework
        L4[Documentation]:::doc
    end
```
