# kiranvshah/little-man-computer architecture

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

- Interactive diagram: https://gitdiagram.com/kiranvshah/little-man-computer
- Repository: https://github.com/kiranvshah/little-man-computer

## Overview

##### Main Components Identification

a. Frontend (Client)
- Browser-based TypeScript application
- Static assets and styles
- Memory visualization components
- User interface elements

b. Backend (Server)
- Python-based server
- Assembly compilation service
- Computer simulation engine
- Testing components

**[Client Browser] <--HTTP/WebSocket--> [Web Server] <--> [LMC Simulator]**

##### Connection and Data Flow

- HTTP/WebSocket communications between frontend and backend
- Internal data flow between components
- Compilation pipeline flow
- Simulation state updates

##### Architectural Patterns to Highlight

- Client-server architecture
- Event-driven user interface
- Compilation pipeline
- Simulation engine architecture

##### Technical Details

Annotations for:
- TypeScript/Python stack
- WebSocket/HTTP communication
- Assembly language processing
- Memory visualization methods

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        UI["User Interface"]:::frontend
        MD["Memory Display"]:::frontend
        AN["Animation System"]:::frontend
        BC["Button Controls"]:::frontend
        MM["Memory Management"]:::frontend
        TI["Transfer Interface"]:::frontend
    end

    subgraph Backend
        WS["Web Server"]:::backend
        AC["Assembly Compiler"]:::backend
        CS["Computer Simulator"]:::backend
        TS["Test Suite"]:::backend
    end

    subgraph Prototypes
        AP["Assembly Prototypes"]:::prototype
    end

    subgraph "CI/CD"
        CI["Continuous Integration"]:::cicd
        NE["Netlify Deployment"]:::cicd
    end

    UI --> MD
    UI --> AN
    UI --> BC
    BC --> MM
    MM --> TI
    TI <--> WS
    WS --> AC
    AC --> CS
    CS --> WS
    AC --> TS
    AP --> AC

    CI --> NE

    %% Click Events
    click UI "https://github.com/kiranvshah/little-man-computer/blob/main/client/index.html"
    click MD "https://github.com/kiranvshah/little-man-computer/blob/main/client/src/addressDisplayUpdaters.ts"
    click AN "https://github.com/kiranvshah/little-man-computer/blob/main/client/src/animations.ts"
    click BC "https://github.com/kiranvshah/little-man-computer/blob/main/client/src/buttonResponders.ts"
    click MM "https://github.com/kiranvshah/little-man-computer/blob/main/client/src/memoryPopulation.ts"
    click TI "https://github.com/kiranvshah/little-man-computer/blob/main/client/src/transferInterface.ts"
    click WS "https://github.com/kiranvshah/little-man-computer/blob/main/server/server.py"
    click AC "https://github.com/kiranvshah/little-man-computer/blob/main/server/compile_assembly.py"
    click CS "https://github.com/kiranvshah/little-man-computer/blob/main/server/computer.py"
    click TS "https://github.com/kiranvshah/little-man-computer/blob/main/server/test_compile_assembly.py"
    click CI "https://github.com/kiranvshah/little-man-computer/blob/main/.github/workflows/continuous_integration.yaml"
    click AP "https://github.com/kiranvshah/little-man-computer/tree/main/prototypes"

    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef prototype fill:#f1c40f,stroke:#f39c12,color:black
    classDef cicd fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Legend
    subgraph Legend
        F[Frontend Component]:::frontend
        B[Backend Component]:::backend
        P[Prototype]:::prototype
        C[CI/CD]:::cicd
    end
```
