# abatbeliever/internetstroller_project4_memoria_webbrowser architecture

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

- Interactive diagram: https://gitdiagram.com/abatbeliever/internetstroller_project4_memoria_webbrowser
- Repository: https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser

## Overview

##### Project Type & Purpose
- This is not a traditional full-stack web application but rather a lightweight, HSP-based web browser that leverages WebView2. The README makes it clear that ISMemoria is an HSP (Hot Soup Processor) project that creates a minimalistic browser with features such as RSS support, script integration, PDF output, and various UI functions.
- Its intended usage is “to take your USB stick for an internet stroll” – meaning it is portable, self-contained (all settings and history stored locally), and optimized for performance and light resource usage.

##### Analyzing the File Structure
- Top-Level Files:
- Files like InternetStroller.hsp, Build.ini, and TMPDeleter.bat indicate the application’s main entry point, build configuration, and cleanup routines.
- .pak files (e.g., hsc.pak, html.pak, iE.pak, etc.) likely bundle resources or modules required by the software.
- Source Directory (src):
- Two main subdirectories: “Dynamic” and “Static.”
- The “Dynamic” directory houses components that drive runtime behavior – modules such as Graphic.hsp, LoadWebView.hsp, MultiDialog.hsp, and others that suggest dynamic UI functions, event handling (SetEvent.hsp), and system dialogs.
- The “Static” directory is further broken down into:
▪ EVENT: Files like CMD.hsp, TAB.hsp, WM.hsp, and WebView.hsp denote predefined event handlers or messaging constructs.
▪ Extend: Files here (e.g., Execute6.hsp, IScript.hsp, ManaPAD.hsp, RSSer.hsp, URLPush.hsp) provide extension points to add functionality like script execution or RSS handling.
- Additionally, files like HSC.hsp and StatusBar32.hsp are also likely core components managing specific parts of the UI or configuration.

##### Key Components & Relationships
- Core Application Engine:
- InternetStroller.hsp serves as the main executable entry point.
- Build.ini orchestrates the build and configuration settings.
- Dynamic Modules (src/Dynamic):
- Responsible for runtime tasks such as graphics, dynamic event binding, loading the WebView, and managing dialogs (e.g., modTaskDialog, MultiDialog).
- Static Modules (src/Static):
- EVENT Subsystem: Manages static event handling which coordinates user actions with system responses (e.g., CMD, TAB, WM events).
- Extend Subsystem: Encapsulates extension functionalities such as executing scripts, managing a custom text editor component (ManaPAD), controlling RSS feeds, and URL push events.
- External Dependencies:
- The project leverages WebView2 (via WebView2Loader.dll) for rendering web content, ensuring modern browsing capabilities.
- Other external libraries such as hspinet.dll facilitate networking capabilities.

##### Architectural Patterns & Design Principles
- Separation of Concerns:
- Modular Design:
- The use of “Dynamic” and “Static” subdirectories indicates that functionalities are compartmentalized into self-contained modules. This makes it easier to extend or modify individual aspects of the browser.
- Portability:
- That all settings and history are stored locally—the design supports a portable solution without complex dependency on an external configuration or database system.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Main Application Engine
    MA["InternetStrollerMemoria (Main Application)"]:::main

    %% Build & Configuration Subgraph
    subgraph "Build & Configuration"
        B1["Build.ini"]:::config
        B2["hsc.pak"]:::config
        B3["html.pak"]:::config
        B4["iE.pak"]:::config
        B5["iJ.pak"]:::config
        B6["mswv.pak"]:::config
    end

    %% Dynamic Modules Subgraph
    subgraph "Dynamic Modules"
        DM1["Graphic Module"]:::dynamic
        DM2["WebView Loader"]:::dynamic
        DM3["Dialog Manager"]:::dynamic
        DM4["Event Setter"]:::dynamic
        DM5["Toast Notifications"]:::dynamic
        DM6["Window Color Manager"]:::dynamic
        DM7["Task Dialog Module"]:::dynamic
        DM8["HSP Inet Script"]:::dynamic
        DM9["INI System"]:::dynamic
    end

    %% Static Modules Subgraph
    subgraph "Static Modules"
        %% EVENT Subsystem
        subgraph "EVENT Subsystem"
            S_E1["CMD Event Handler"]:::event
            S_E2["TAB Event Handler"]:::event
            S_E3["WM Event Handler"]:::event
            S_E4["WebView Event Handler"]:::event
        end
        %% Extend Subsystem
        subgraph "Extend Subsystem"
            S_X1["Script Executor (Execute6)"]:::extend
            S_X2["Script Integration (IScript)"]:::extend
            S_X3["Custom Text Editor (ManaPAD)"]:::extend
            S_X4["RSS Handler (RSSer)"]:::extend
            S_X5["URL Pusher (URLPush)"]:::extend
        end
        %% Additional Static Core Components
        S_C1["HSC Module"]:::core
        S_C2["Status Bar Manager"]:::core
    end

    %% External Dependencies Subgraph
    subgraph "External Dependencies"
        EX1["WebView2 Rendering Engine"]:::external
        EX2["HSP Runtime & hspinet.dll"]:::external
    end

    %% Connections
    MA -->|"configures"| B1
    B1 -->|"initializes"| DM1
    MA -->|"starts"| DM1
    DM2 -->|"loads_into"| EX1
    MA -->|"renders_with"| EX1
    MA -->|"networks_via"| EX2

    DM3 -->|"triggers_event"| S_E1
    DM4 -->|"sets_event"| S_E2
    DM5 -->|"notifies"| S_E3
    DM6 -->|"updates_event"| S_E4
    DM7 -->|"prompts"| S_E1
    DM8 -->|"coexecutes_with"| DM9

    %% Interactions from Dynamic to Static Modules
    DM4 -->|"invokes"| S_X1
    S_E1 -->|"invokes_extension"| S_X4
    S_X3 -->|"updates_status"| S_C2

    %% Class Definitions
    classDef main fill:#ffe4b5,stroke:#333,stroke-width:2px;
    classDef config fill:#add8e6,stroke:#333,stroke-width:2px;
    classDef dynamic fill:#98fb98,stroke:#333,stroke-width:2px;
    classDef event fill:#d1e7dd,stroke:#333,stroke-width:2px;
    classDef extend fill:#cfe2f3,stroke:#333,stroke-width:2px;
    classDef core fill:#f9cb9c,stroke:#333,stroke-width:2px;
    classDef external fill:#f4cccc,stroke:#333,stroke-width:2px;

    %% Click Events - Main Application and Build & Config
    click MA "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/InternetStroller.hsp"
    click B1 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/Build.ini"
    click B2 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/hsc.pak"
    click B3 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/html.pak"
    click B4 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/iE.pak"
    click B5 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/iJ.pak"
    click B6 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/mswv.pak"

    %% Click Events - Dynamic Modules
    click DM1 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Dynamic/Graphic.hsp"
    click DM2 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Dynamic/LoadWebView.hsp"
    click DM3 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Dynamic/MultiDialog.hsp"
    click DM4 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Dynamic/SetEvent.hsp"
    click DM5 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Dynamic/Toast.hsp"
    click DM6 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Dynamic/WindowColor.hsp"
    click DM7 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Dynamic/modTaskDialog.hsp"
    click DM8 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Dynamic/hspinet.as"
    click DM9 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Dynamic/ini_system.hsp"

    %% Click Events - Static Modules: EVENT Subsystem
    click S_E1 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/EVENT/CMD.hsp"
    click S_E2 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/EVENT/TAB.hsp"
    click S_E3 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/EVENT/WM.hsp"
    click S_E4 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/EVENT/WebView.hsp"

    %% Click Events - Static Modules: Extend Subsystem
    click S_X1 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/Extend/Execute6.hsp"
    click S_X2 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/Extend/IScript.hsp"
    click S_X3 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/Extend/ManaPAD.hsp"
    click S_X4 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/Extend/RSSer.hsp"
    click S_X5 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/Extend/URLPush.hsp"

    %% Click Events - Additional Static Core Components
    click S_C1 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/HSC.hsp"
    click S_C2 "https://github.com/abatbeliever/internetstroller_project4_memoria_webbrowser/blob/main/src/Static/StatusBar32.hsp"
```
