# catalancabbage/the-wall architecture

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

- Interactive diagram: https://gitdiagram.com/catalancabbage/the-wall
- Repository: https://github.com/catalancabbage/the-wall

## Overview

##### Project type and purpose
- This is a cross-platform desktop application built on Electron (Node.js) that uses HTML/CSS/JS (with Semantic UI) as its renderer.

##### File structure
- Top-level:
- package.json / package-lock.json – Node/Electron dependencies and scripts
- main.js – Electron’s main process entrypoint
- src/ – front-end code (HTML, CSS, JS) forming a single-page app
- semantic/ + semantic/tasks/ – local copy of Semantic UI source, definitions, and Gulp build tasks
- buildResources/ – assets and notes for packaging releases
- .gitlab-ci.yml – CI pipeline for building and packaging installers
- Patterns & configurations:
- Gulp tasks construct and customize Semantic UI, then assemble CSS/JS bundles
- Electron main process (main.js) launches BrowserWindow, points to src/html/index.html
- src/js/dataAccess.js abstracts storage (likely JSON or localStorage)
- CI triggers build scripts, produces platform installers, uploads to distribution links

##### Pulling insights from README
- Describes packaging for Linux, Windows, macOS (downloadable installers)
- Highlights UI views: About, Activity (cards), Wall (graphical bricks), Settings
- No external web services—purely local data, though code is hosted on GitLab and installers delivered via Google Drive links

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Runtime Layer
    subgraph "Runtime Layer"
        direction TB
        OS["User's OS (Windows/Mac/Linux)"]:::external
        Main["main.js"]:::runtime
        subgraph "Renderer Process"
            direction TB
            HTML["index.html"]:::runtime
            SplashHTML["splashScreen.html"]:::runtime
            CSS["CSS Bundles (src/css/)"]:::runtime
            SplashCSS["splashScreen.css"]:::runtime
            JS["JS Modules (src/js/)"]:::runtime
            DataAccess["dataAccess.js"]:::runtime
            DataStore[(Local JSON/File Storage)]:::db
        end
    end

    OS -->|launch application| Main
    Main -->|creates BrowserWindow| HTML
    Main -->|creates BrowserWindow| SplashHTML
    HTML -->|loads styles| CSS
    SplashHTML -->|loads styles| SplashCSS
    HTML -->|loads scripts| JS
    JS -->|uses| DataAccess
    DataAccess -->|reads/writes| DataStore
    JS -->|controls views| HTML

    %% Build & CI Layer
    subgraph "Build & Pipeline"
        direction TB
        NPM["package.json"]:::build
        SemanticSrc["semantic/src/"]:::build
        Gulpfile["semantic/gulpfile.js"]:::build
        Tasks["semantic/tasks/"]:::build
        BuildCSS["Gulp CSS Tasks"]:::build
        BuildJS["Gulp JS Tasks"]:::build
        BuildResources["buildResources/"]:::build
        README["README.md"]:::build
        GitAssets["gitAssets/"]:::build
        Env[".env"]:::build
        CI[".gitlab-ci.yml"]:::build
    end

    SemanticSrc & Tasks & Gulpfile -->|run| BuildCSS
    SemanticSrc & Tasks & Gulpfile -->|run| BuildJS
    BuildCSS -->|outputs| CSS
    BuildJS -->|outputs| JS
    NPM -->|scripts invoke| Gulpfile
    CI -->|runs| NPM
    CI -->|uses assets| BuildResources
    CI -->|references| README
    CI -->|includes| GitAssets
    CI -->|reads| Env

    %% Distribution Layer
    subgraph "Distribution"
        direction TB
        GitLabCI["GitLab CI"]:::external
        Drive["Google Drive Installers"]:::external
    end

    CI -->|uploads installers| Drive

    %% Click Events
    click Main "https://github.com/catalancabbage/the-wall/blob/master/main.js"
    click NPM "https://github.com/catalancabbage/the-wall/blob/master/package.json"
    click CI "https://github.com/catalancabbage/the-wall/blob/master/.gitlab-ci.yml"
    click BuildResources "https://github.com/catalancabbage/the-wall/tree/master/buildResources/"
    click SemanticSrc "https://github.com/catalancabbage/the-wall/tree/master/semantic/src/"
    click Gulpfile "https://github.com/catalancabbage/the-wall/blob/master/semantic/gulpfile.js"
    click Tasks "https://github.com/catalancabbage/the-wall/tree/master/semantic/tasks/"
    click HTML "https://github.com/catalancabbage/the-wall/blob/master/src/html/index.html"
    click CSS "https://github.com/catalancabbage/the-wall/tree/master/src/css/"
    click JS "https://github.com/catalancabbage/the-wall/tree/master/src/js/"
    click DataAccess "https://github.com/catalancabbage/the-wall/blob/master/src/js/dataAccess.js"
    click SplashHTML "https://github.com/catalancabbage/the-wall/blob/master/src/html/splashScreen.html"
    click SplashCSS "https://github.com/catalancabbage/the-wall/blob/master/src/css/splashScreen.css"
    click README "https://github.com/catalancabbage/the-wall/blob/master/README.md"
    click GitAssets "https://github.com/catalancabbage/the-wall/tree/master/gitAssets/"
    click Env "https://github.com/catalancabbage/the-wall/blob/master/.env"

    %% Styles
    classDef runtime fill:#BBDEFB,stroke:#1976D2
    classDef build fill:#C8E6C9,stroke:#388E3C
    classDef external fill:#ECEFF1,stroke:#607D8B
    classDef db fill:#FFE0B2,stroke:#FB8C00

    class OS,GitLabCI,Drive external
    class Main,HTML,SplashHTML,CSS,SplashCSS,JS,DataAccess runtime
    class NPM,SemanticSrc,Gulpfile,Tasks,BuildCSS,BuildJS,BuildResources,README,GitAssets,Env,CI build
    class DataStore db
```
