# devenjarvis/sundew architecture

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

## Overview

##### Main Components

a) Core Framework Components (Primary Layer):
- Test Runner Module
- Test Writer Module
- Graph Module (for dependency management)
- Side Effects Handler
- Configuration System

b) Integration Layer:
- CLI Interface
- Example Integrations
- Test Generation System

**┌─ Framework Core Layer ─────────────────────┐**

- ┌─────────┐  ┌─────────┐   ┌─────────┐  │
- Graph  │──│  Test   │   │  Side   │  │
- Module  │  │ Runner  │   │ Effects │  │
- ┘  └─────────┘   └─────────┘  │

- ┼─────────────┘        │

- ┌─────────┐                  │
- Test   │                  │
- Writer  │                  │
- ┘                  │
- ┬───────────────────────┘

**┌───────────────────┼───────────────────────┐**
- Integration Layer                       │
- ┌─────────┐  ┌─────────┐   ┌─────────┐  │
- CLI    │  │ Example │   │  Test   │  │
- Interface│  │ Projects│   │Generator│  │
- ┘  └─────────┘   └─────────┘  │
- ┘

##### Key Elements to Highlight

- Core Components: Blue
- Integration Layer: Green
- External Interfaces: Orange

b) Component Relationships:
- Bidirectional communication between Graph Module and Test Runner
- How Side Effects Handler integrates with Test Runner
- Demonstrate Test Writer's relationship with other components

##### Important Details

a) File Organization:
- How the `sundew/` directory structure maps to components
- Where example integrations (boto3, fastapi, etc.) connect

b) Testing Flow:
- How test generation works
- Path from test writing to execution

##### Technical Specifications

A section showing supported integrations:
- FastAPI
- Boto3
- Async Support
- Simple Examples

##### Implementation Notes

- Version control and CI/CD workflow connections
- Documentation system integration

##### Specific Recommendations

- Center on the core testing framework components
- Clear separation between framework and examples
- Novel testing approach mentioned in README

- CI/CD pipeline integration

Remember to:
- Notes about the experimental nature of the project
- Clear extension points for future development

## Diagram (Mermaid)

```mermaid
graph TB
    %% Core Framework Layer
    subgraph Core
        Graph["Graph Module"]
        TestRunner["Test Runner"]
        SideEffects["Side Effects Handler"]
        TestWriter["Test Writer"]
        Config["Configuration System"]

        Graph --> TestRunner
        TestRunner --> Graph
        SideEffects --> TestRunner
        TestWriter --> TestRunner
        Config --> TestRunner
        Config --> TestWriter
    end

    %% Integration Layer
    subgraph Integration
        CLI["CLI Interface"]
        Examples["Example Integrations"]
        TestGen["Test Generation System"]

        subgraph Examples
            FastAPI["FastAPI Integration"]
            Boto3["Boto3 Integration"]
            Async["Async Integration"]
            SimpleEx["Simple Examples"]
        end

        CLI --> TestRunner
        Examples --> TestRunner
        TestGen --> TestWriter
    end

    %% Component Mappings
    click Graph "https://github.com/devenjarvis/sundew/blob/main/sundew/graph.py"
    click TestRunner "https://github.com/devenjarvis/sundew/blob/main/sundew/test_runner.py"
    click SideEffects "https://github.com/devenjarvis/sundew/blob/main/sundew/side_effects.py"
    click TestWriter "https://github.com/devenjarvis/sundew/blob/main/sundew/test_writer.py"
    click Config "https://github.com/devenjarvis/sundew/blob/main/sundew/config.py"
    click CLI "https://github.com/devenjarvis/sundew/blob/main/sundew/__main__.py"
    click FastAPI "https://github.com/devenjarvis/sundew/tree/main/examples/fastapi"
    click Boto3 "https://github.com/devenjarvis/sundew/tree/main/examples/boto3"
    click Async "https://github.com/devenjarvis/sundew/tree/main/examples/simple_async"
    click SimpleEx "https://github.com/devenjarvis/sundew/tree/main/examples/simple_example"
    click TestGen "https://github.com/devenjarvis/sundew/blob/main/examples/simple_example/tests/auto_test_quadratic.py"

    %% Styling
    classDef core fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef integration fill:#b7e3c0,stroke:#333,stroke-width:2px
    classDef example fill:#ffd8a8,stroke:#333,stroke-width:2px

    class Graph,TestRunner,SideEffects,TestWriter,Config core
    class CLI,TestGen integration
    class FastAPI,Boto3,Async,SimpleEx example

    %% Legend
    subgraph Legend
        CoreComp["Core Component"]:::core
        IntComp["Integration Component"]:::integration
        ExComp["Example Component"]:::example
    end
```
