# tomcl/issie architecture

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

## Overview

##### Main Components and Architecture

The system should be represented as an Electron-based application with these main components:

a. Process Layer:
- Main Process (Electron)
- Renderer Process (Chromium-based)

b. Core Application Components:
- Schematic Editor
- Circuit Simulator
- File Management System
- User Interface
- Verilog Component System

##### Detailed Component Breakdown

a. Main Process (Top Level):
- Electron Main Process
- Window Management
- Native OS Integration
- IPC Communication

b. Renderer Process (Application Core):
- UI Layer
- Main View
- Catalog View
- Simulation View
- Wave Simulation View
- Memory Editor
- Truth Table Interface

- Drawing System
- Sheet Management
- Symbol Management
- Bus Wire System
- Component Layout

- Simulation Engine
- Circuit Analysis
- Fast Simulation
- Wave Simulation
- Truth Table Processing

- File System Interface
- Project Management
- Design File Handling
- Backup System

##### Data Flow Representation

**User Input -> UI Layer -> Drawing System -> Simulation Engine**
**File System <-> Project Management <-> All Components**
**Main Process <-> Renderer Process (IPC)**

##### Technology Stack Layer (Bottom)

Underlying technologies:
- F# (Primary Language)
- Fable (F# to JS Compiler)
- Electron (Desktop Framework)
- Webpack (Module Bundler)
- Node.js (Runtime)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Process
        MP[Main Process]
        RP[Renderer Process]
    end

    subgraph UI
        MV[Main View]
        CV[Catalog View]
        SV[Simulation View]
        WV[Wave Simulation View]
        ME[Memory Editor]
        TT[Truth Table Interface]
    end

    subgraph Drawing
        SM[Sheet Management]
        SYM[Symbol Management]
        BWS[Bus Wire System]
        CL[Component Layout]
    end

    subgraph Simulation
        CA[Circuit Analysis]
        FS[Fast Simulation]
        WS[Wave Simulation]
        TTP[Truth Table Processing]
    end

    subgraph FileSystem
        PM[Project Management]
        DFH[Design File Handling]
        BS[Backup System]
    end

    subgraph TechStack
        FS1[F#]
        FB[Fable]
        EL[Electron]
        WP[Webpack]
        NJ[Node.js]
    end

    MP <--> RP
    RP --> UI
    UI --> Drawing
    Drawing --> Simulation
    FileSystem <--> PM
    PM <--> UI
    PM <--> Drawing
    PM <--> Simulation

    classDef ui fill:#a8d1ff
    classDef process fill:#ffb3ba
    classDef drawing fill:#baffc9
    classDef simulation fill:#ffffba
    classDef filesystem fill:#ffdfba
    classDef techstack fill:#e6e6e6

    class MV,CV,SV,WV,ME,TT ui
    class MP,RP process
    class SM,SYM,BWS,CL drawing
    class CA,FS,WS,TTP simulation
    class PM,DFH,BS filesystem
    class FS1,FB,EL,WP,NJ techstack

    click MP "https://github.com/tomcl/issie/blob/master/src/Main/Main.fs"
    click RP "https://github.com/tomcl/issie/blob/master/src/Renderer/Renderer.fs"
    click Drawing "https://github.com/tomcl/issie/tree/master/src/Renderer/DrawBlock/"
    click Simulation "https://github.com/tomcl/issie/tree/master/src/Renderer/Simulator/"
    click DFH "https://github.com/tomcl/issie/blob/master/src/Renderer/Interface/FilesIO.fs"
    click UI "https://github.com/tomcl/issie/tree/master/src/Renderer/UI/"
    click WV "https://github.com/tomcl/issie/tree/master/src/Renderer/UI/WaveSim/"
    click ME "https://github.com/tomcl/issie/blob/master/src/Renderer/UI/MemoryEditorView.fs"
    click TT "https://github.com/tomcl/issie/tree/master/src/Renderer/UI/TruthTable/"
    click SM "https://github.com/tomcl/issie/blob/master/src/Renderer/DrawBlock/Sheet.fs"
    click BWS "https://github.com/tomcl/issie/blob/master/src/Renderer/DrawBlock/BusWire.fs"
    click SYM "https://github.com/tomcl/issie/blob/master/src/Renderer/DrawBlock/Symbol.fs"
    click FS "https://github.com/tomcl/issie/tree/master/src/Renderer/Simulator/FastSim/"
    click PM "https://github.com/tomcl/issie/blob/master/src/Renderer/UI/FileUpdate.fs"

    %% Legend
    subgraph Legend
        UI_L[UI Components]:::ui
        PROC_L[Process Components]:::process
        DRAW_L[Drawing Components]:::drawing
        SIM_L[Simulation Components]:::simulation
        FS_L[File System Components]:::filesystem
        TECH_L[Technology Stack]:::techstack
    end
```
