# yam-1111/autominimizer architecture

> Architecture diagram of the GitHub repository yam-1111/autominimizer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yam-1111/autominimizer
- Repository: https://github.com/yam-1111/autominimizer

## Overview

##### Main Components

a. Frontend Architecture (Primary Layer):
- React Application Core
- UI Component Library
- DFA Visualization System
- State Management

b. Feature Modules:
- DFA Visualizer
- Myhill-Nerode Algorithm Implementation
- State Table Management

##### Component Relationships

**┌─ Frontend Application ──────────────────────────────┐**

- ┌─ Core Components ─────────┐                      │

- App.tsx               │                      │
- Main.tsx             │                      │
- ┘                      │

- ┌─ Feature Components ──────┐  ┌─ UI Library ────┐ │

- DFAVisualizer        │  │  - Button        │ │
- DFAGraph             │  │  - Dialog        │ │
- MyhillNerode         │  │  - Table         │ │
- StateTable           │  │  - ...           │ │
- ┘  └──────────────────┘ │

- ┌─ Utilities ──────────────┐  ┌─ Hooks ─────────┐ │

- pathUtils            │  │  - useMobile     │ │
- utils                │  │  - useToast      │ │
- ┘  └──────────────────┘ │

- ┘

##### Important Elements to Highlight

a. DFA-specific Components:
- Relationship between DFAVisualizer, DFAGraph, and StateTable
- Myhill-Nerode algorithm implementation
- State management flow

b. UI Component Library:
- Extensive UI component system
- Reusable component relationships

##### Implementation Details

- Use standardized UML or C4 model notation where appropriate
- Notes for key architectural decisions

Remember to include version information and any external service dependencies that might be present in the configuration files (package.json, vite.config.ts, etc.).

This visualization will help developers understand both the technical architecture and the domain-specific implementation of the DFA visualization system.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        subgraph Core["Core Application"]
            App["App"]:::core
            Main["Main Entry"]:::core
            Index["Index Page"]:::core
        end

        subgraph DFA["DFA System"]
            DFAVis["DFA Visualizer"]:::dfa
            DFAGraph["DFA Graph"]:::dfa
            StateTable["State Table"]:::dfa
            MyhillVis["Myhill-Nerode Visualizer"]:::dfa
            MyhillTable["Myhill State Table"]:::dfa
        end

        subgraph UI["UI Component Library"]
            Button["Button Component"]:::ui
            Dialog["Dialog Component"]:::ui
            Table["Table Component"]:::ui
            OtherUI["Other UI Components"]:::ui
        end

        subgraph Utils["Utilities & Hooks"]
            Utils["General Utils"]:::util
            PathUtils["Path Utils"]:::util
            MobileHook["Mobile Hook"]:::util
            ToastHook["Toast Hook"]:::util
        end

        subgraph Types["Type Definitions"]
            DFATypes["DFA Types"]:::type
        end
    end

    %% Core Relationships
    Main --> App
    App --> Index
    Index --> DFAVis

    %% DFA Component Relationships
    DFAVis --> DFAGraph
    DFAVis --> StateTable
    DFAVis --> MyhillVis
    MyhillVis --> MyhillTable
    
    %% UI Component Usage
    DFAVis -.-> Button
    DFAVis -.-> Dialog
    StateTable -.-> Table
    MyhillTable -.-> Table

    %% Utility Usage
    DFAVis -.-> Utils
    DFAGraph -.-> PathUtils
    DFAVis -.-> MobileHook
    DFAVis -.-> ToastHook

    %% Type Usage
    DFATypes -.-> DFAVis
    DFATypes -.-> DFAGraph
    DFATypes -.-> StateTable

    %% Styling
    classDef core fill:#2563eb,color:white
    classDef dfa fill:#16a34a,color:white
    classDef ui fill:#ea580c,color:white
    classDef util fill:#9333ea,color:white
    classDef type fill:#64748b,color:white

    %% Click Events
    click App "https://github.com/yam-1111/AutoMinimizer/blob/main/src/App.tsx"
    click Main "https://github.com/yam-1111/AutoMinimizer/blob/main/src/main.tsx"
    click Index "https://github.com/yam-1111/AutoMinimizer/blob/main/src/pages/Index.tsx"
    click DFAVis "https://github.com/yam-1111/AutoMinimizer/blob/main/src/components/DFAVisualizer.tsx"
    click DFAGraph "https://github.com/yam-1111/AutoMinimizer/blob/main/src/components/dfa/DFAGraph.tsx"
    click StateTable "https://github.com/yam-1111/AutoMinimizer/blob/main/src/components/dfa/StateTable.tsx"
    click MyhillVis "https://github.com/yam-1111/AutoMinimizer/blob/main/src/components/dfa/MyhillNerodeVisualizer.tsx"
    click MyhillTable "https://github.com/yam-1111/AutoMinimizer/blob/main/src/components/dfa/MyhillStateTable.tsx"
    click Button "https://github.com/yam-1111/AutoMinimizer/blob/main/src/components/ui/button.tsx"
    click Dialog "https://github.com/yam-1111/AutoMinimizer/blob/main/src/components/ui/dialog.tsx"
    click Table "https://github.com/yam-1111/AutoMinimizer/blob/main/src/components/ui/table.tsx"
    click Utils "https://github.com/yam-1111/AutoMinimizer/blob/main/src/lib/utils.ts"
    click PathUtils "https://github.com/yam-1111/AutoMinimizer/blob/main/src/utils/pathUtils.ts"
    click MobileHook "https://github.com/yam-1111/AutoMinimizer/blob/main/src/hooks/use-mobile.tsx"
    click ToastHook "https://github.com/yam-1111/AutoMinimizer/blob/main/src/hooks/use-toast.ts"
    click DFATypes "https://github.com/yam-1111/AutoMinimizer/blob/main/src/types/dfa.ts"
```
