# gonzaloea/clojure-path-finder architecture

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

- Interactive diagram: https://gitdiagram.com/gonzaloea/clojure-path-finder
- Repository: https://github.com/gonzaloea/clojure-path-finder

## Overview

##### Project Type Analysis
This is a web-based application built with ClojureScript that visualizes path-finding algorithms. It uses Shadow-CLJS for building and development, indicating it's a modern single-page application (SPA).

##### Main Components

A. Frontend Layer:
- ClojureScript Application Core
- UI Components
- State Management
- Path-finding Algorithm Visualizer

B. Build/Development Infrastructure:
- Shadow-CLJS Build System
- NPM Dependencies

- [Client Browser] → [ClojureScript Application] → [Build System]

##### Detailed Component Breakdown

ClojureScript Application (Main Focus):
- Core Module (core.cljs)
- State Management (state.cljs)
- UI Components
- Header Component (header.cljs)
- Path-finding Algorithm Engine

##### Data Flow Representation

- User interactions → UI Components
- UI Components → State Management
- State Management → Algorithm Visualization
- Algorithm Results → UI Update

##### Technical Details

- Shadow-CLJS compilation flow
- NPM dependency management
- Browser REPL connection (development mode)
- CSS styling integration
- JSON data loading path

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Browser
        Client[Client Browser]
        HTML[HTML Entry Point]:::html
        CSS[CSS Styling]:::css
    end

    subgraph "ClojureScript Application"
        Core[Application Core]:::core
        State[State Management]:::state
        
        subgraph "UI Layer"
            Header[Header Component]:::ui
            Visualizer[Algorithm Visualizer]:::ui
        end
        
        subgraph "Algorithm Engine"
            PathFinder[Path Finding Algorithm]:::algorithm
            InitialMap[Initial Map Data]:::data
        end
    end

    subgraph "Build Infrastructure"
        ShadowCLJS[Shadow-CLJS]:::build
        NPM[NPM Dependencies]:::build
    end

    %% Connections
    Client --> HTML
    HTML --> Core
    CSS --> Client
    Core --> State
    State --> Visualizer
    State --> Header
    PathFinder --> State
    InitialMap --> PathFinder
    ShadowCLJS --> Core
    NPM --> ShadowCLJS

    %% Development Connections
    ShadowCLJS -.-> |REPL| Core
    
    %% Styling
    classDef core fill:#4a90e2
    classDef state fill:#f5a623
    classDef ui fill:#7ed321
    classDef algorithm fill:#bd10e0
    classDef build fill:#50e3c2
    classDef data fill:#4a4a4a
    classDef css fill:#9013fe
    classDef html fill:#e6e6e6

    %% Click Events
    click Core "https://github.com/gonzaloea/clojure-path-finder/blob/main/src/clojure_path_finder/core.cljs"
    click State "https://github.com/gonzaloea/clojure-path-finder/blob/main/src/clojure_path_finder/state.cljs"
    click Header "https://github.com/gonzaloea/clojure-path-finder/blob/main/src/clojure_path_finder/components/header.cljs"
    click ShadowCLJS "https://github.com/gonzaloea/clojure-path-finder/blob/main/shadow-cljs.edn"
    click CSS "https://github.com/gonzaloea/clojure-path-finder/blob/main/public/css/site.css"
    click InitialMap "https://github.com/gonzaloea/clojure-path-finder/blob/main/src/initial-map.json"
    click HTML "https://github.com/gonzaloea/clojure-path-finder/blob/main/public/index.html"
    click NPM "https://github.com/gonzaloea/clojure-path-finder/blob/main/package.json"

    %% Legend
    subgraph Legend
        L1[Application Core]:::core
        L2[State Management]:::state
        L3[UI Components]:::ui
        L4[Algorithm]:::algorithm
        L5[Build Tools]:::build
        L6[Data Sources]:::data
        L7[Styling]:::css
        L8[HTML]:::html
    end
```
