# 00unkn0wn00/peteralert architecture

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

- Interactive diagram: https://gitdiagram.com/00unkn0wn00/peteralert
- Repository: https://github.com/00unkn0wn00/peteralert

## Overview

##### Project Type and Purpose
- This is a cross-platform “hello world” GUI demo called “Peter Alert,” implemented multiple ways to showcase how to pop up a simple alert dialog with an image and an OK button on different operating systems/toolkits.
- It is not one monolithic application but a suite of small, standalone implementations (Win32/VB6, Classic MacOS, X11/GTK, Haiku, Java Swing, etc.) all sharing the same high-level goal.

##### File Structure
- Top-level directories each correspond to a single implementation:
- BeterAlert – C++/Haiku using make, xres, gcc
- ClassicMacOS – CodeWarrior PPC/C++ targeting Mac OS 9 Toolbox
- GtkPeterAlert – C++/GTK+ (X11)
- Win32 – VB6 Form project files
- java-swing – Java Swing source
- xpeteralert – C++/raw X11 (peter.xbm + xpeter.cpp)
- Build/deployment artifacts: Makefiles, VB6 project files, CodeWarrior resource files.

##### Extract Insights from the README
- Each implementation is independent and uses the native GUI toolkit for its platform.
- Dependencies:
- VB6 runtime on Win
- CodeWarrior + MacOS ToolBox on Mac OS 9
- GTK+/X11 dev libraries on Linux/macOS/OpenBSD
- Haiku build tools (make, xres, gcc)
- Java SE for Swing

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Core Specification
    Spec["PeterAlert Spec"]:::spec

    %% Adapter Implementations
    subgraph "Adapter Implementations"
        Beter["BeterAlert\n(C++/Haiku)"]:::impl
        Classic["ClassicMacOS\n(C++/CodeWarrior)"]:::impl
        Gtk["GtkPeterAlert\n(C++/GTK)"]:::impl
        Win32["Win32-VB6\n(VB6)"]:::impl
        Java["java-swing\n(Java/Swing)"]:::impl
        Raw["xpeteralert\n(C++/X11)"]:::impl
    end

    %% Operating System / Runtime Layer
    subgraph "Operating System / Runtime"
        Haiku["Haiku API"]:::runtime
        MacOS9["MacOS 9 Toolbox"]:::runtime
        GTKX11["GTK+/X11"]:::runtime
        WinAPI["Win32 API"]:::runtime
        JavaVM["Java VM/Swing"]:::runtime
        X11API["X11 API"]:::runtime
    end

    %% Relationships
    Spec -->|"implements spec"| Beter
    Spec -->|"implements spec"| Classic
    Spec -->|"implements spec"| Gtk
    Spec -->|"implements spec"| Win32
    Spec -->|"implements spec"| Java
    Spec -->|"implements spec"| Raw

    Beter -->|"uses"| Haiku
    Classic -->|"uses"| MacOS9
    Gtk -->|"uses"| GTKX11
    Win32 -->|"uses"| WinAPI
    Java -->|"uses"| JavaVM
    Raw -->|"uses"| X11API

    %% Click Events
    click Beter "https://github.com/00unkn0wn00/peteralert/tree/main/BeterAlert/"
    click Classic "https://github.com/00unkn0wn00/peteralert/tree/main/ClassicMacOS/"
    click Gtk "https://github.com/00unkn0wn00/peteralert/tree/main/GtkPeterAlert/"
    click Win32 "https://github.com/00unkn0wn00/peteralert/tree/main/Win32/"
    click Java "https://github.com/00unkn0wn00/peteralert/tree/main/java-swing/"
    click Raw "https://github.com/00unkn0wn00/peteralert/tree/main/xpeteralert/"

    %% Styles
    classDef spec fill:#f9f,stroke:#333,stroke-width:2px
    classDef impl fill:#bbf,stroke:#333,stroke-width:1px
    classDef runtime fill:#bfb,stroke:#333,stroke-width:1px
```
