# adskdev/projectlobotomy architecture

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

- Interactive diagram: https://gitdiagram.com/adskdev/projectlobotomy
- Repository: https://github.com/adskdev/projectlobotomy

## Overview

#### Purpose and runtime
Project Lobotomy is a local Windows/Linux desktop program that unexpectedly displays random images from the user’s folders, with tray-based control implied by the README. It is a native C++ Qt application; it neither uploads nor tracks user data.

Entry point: `src/main.cpp`.

#### Application bootstrap
`main.cpp` initializes the Qt process and starts the application event loop. The central application object is defined by:
- `src/LobotomyApp.h`
- `src/LobotomyApp.cpp`
- `src/main.cpp`

`LobotomyApp` is the architectural boundary for application lifecycle, UI/tray behavior, random-image activation, and shutdown handling.

#### User-visible behavior and control flow
The primary flow is event-driven:

1. Process startup constructs `LobotomyApp`.
2. Qt’s GUI/event loop remains active, likely without a conventional main window.
3. Tray interactions provide the user’s escape/control surface.
4. An application-triggered random selection reads image candidates from local personal folders.
5. A selected image is displayed on screen, potentially accompanied by packaged sound.
6. The application returns to its long-lived event-driven state for later triggers.

The main privacy boundary is local filesystem access: images originate from the user’s machine and are not sent to external services.

#### Media and resource boundary
Bundled assets are compiled into the Qt resource system:
- `res/resources.qrc`
- `res/sound.wav`
- `res/`

The resource manifest separates immutable, application-shipped media from user-selected filesystem images. Qt Multimedia is a required runtime dependency, indicating audio playback is material to the experience.

#### Build and platform packaging
CMake is the build-system entry point:
- `CMakeLists.txt`
- `CMakePresets.json`

Release-oriented platform wrappers are:
- `buildRelease.sh`
- `buildRelease.bat`

The project targets Windows and Linux. Windows deployment requires the executable to be distributed adjacent to required Qt DLLs and the Visual C++ Redistributable. Linux dependencies are Qt 5 base, tools, and multimedia packages.

#### External dependencies and infrastructure
The material framework/runtime is Qt 5, including GUI, resource compilation, system-tray capabilities, and multimedia support. CMake coordinates native compilation and Qt integration. There are no network APIs, server components, databases, cloud resources, or external operational services indicated by the repository.

Main entry points: [`src/LobotomyApp.cpp`](https://github.com/adskdev/projectlobotomy/blob/master/src/LobotomyApp.cpp) (LobotomyApp), [`CMakeLists.txt`](https://github.com/adskdev/projectlobotomy/blob/master/CMakeLists.txt) (CMake build), [`res/resources.qrc`](https://github.com/adskdev/projectlobotomy/blob/master/res/resources.qrc) (Qt resource bundle), [`buildRelease.sh`](https://github.com/adskdev/projectlobotomy/blob/master/buildRelease.sh) (Release wrappers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop application"]
  node_main["Process entry<br/>C++ entry point<br/>[main.cpp]"]
  node_lobotomy_app["LobotomyApp<br/>application lifecycle<br/>[LobotomyApp.cpp]"]
  node_lobotomy_app_api["LobotomyApp interface<br/>C++ header<br/>[LobotomyApp.h]"]
  node_qt_event_loop(("Qt GUI event loop<br/>Qt runtime"))
  node_tray_controls["Tray controls<br/>system tray UI"]
  node_random_trigger["Random image trigger<br/>event action"]
  node_image_display["On-screen image<br/>display surface"]
end

subgraph group_media["Media boundaries"]
  node_user_images[("Local user folders<br/>filesystem images")]
  node_qt_resources["Qt resource bundle<br/>compiled resources<br/>[resources.qrc]"]
  node_sound_asset["Bundled sound<br/>audio asset<br/>[sound.wav]"]
end

subgraph group_delivery["Build and release"]
  node_cmake["CMake build<br/>native build system<br/>[CMakeLists.txt]"]
  node_presets["CMake presets<br/>build presets<br/>[CMakePresets.json]"]
  node_release_scripts["Release wrappers<br/>platform packaging<br/>[buildRelease.sh]"]
  node_windows_release["Windows distribution<br/>desktop package<br/>[buildRelease.bat]"]
  node_linux_release["Linux distribution<br/>desktop package"]
end

node_qt5{{"Qt 5<br/>GUI and multimedia runtime"}}

node_main -->|"constructs"| node_lobotomy_app
node_main -->|"starts"| node_qt_event_loop
node_lobotomy_app_api -->|"declares"| node_lobotomy_app
node_qt_event_loop -->|"dispatches events to"| node_lobotomy_app
node_lobotomy_app -->|"provides"| node_tray_controls
node_tray_controls -->|"activates"| node_random_trigger
node_random_trigger -->|"selects from"| node_user_images
node_random_trigger -->|"displays selected image"| node_image_display
node_lobotomy_app -->|"uses"| node_qt_resources
node_qt_resources -->|"packages"| node_sound_asset
node_lobotomy_app -->|"runs on"| node_qt5
node_qt_resources -->|"compiled by"| node_qt5
node_cmake -->|"builds"| node_main
node_cmake -->|"integrates"| node_qt5
node_presets -->|"configures"| node_cmake
node_release_scripts -->|"invokes"| node_cmake
node_windows_release -->|"Windows wrapper"| node_release_scripts
node_release_scripts -->|"produces"| node_linux_release

click node_main "https://github.com/adskdev/projectlobotomy/blob/master/src/main.cpp"
click node_lobotomy_app "https://github.com/adskdev/projectlobotomy/blob/master/src/LobotomyApp.cpp"
click node_lobotomy_app_api "https://github.com/adskdev/projectlobotomy/blob/master/src/LobotomyApp.h"
click node_qt_resources "https://github.com/adskdev/projectlobotomy/blob/master/res/resources.qrc"
click node_sound_asset "https://github.com/adskdev/projectlobotomy/blob/master/res/sound.wav"
click node_cmake "https://github.com/adskdev/projectlobotomy/blob/master/CMakeLists.txt"
click node_presets "https://github.com/adskdev/projectlobotomy/blob/master/CMakePresets.json"
click node_release_scripts "https://github.com/adskdev/projectlobotomy/blob/master/buildRelease.sh"
click node_windows_release "https://github.com/adskdev/projectlobotomy/blob/master/buildRelease.bat"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_lobotomy_app,node_lobotomy_app_api,node_qt_event_loop,node_tray_controls,node_random_trigger,node_image_display toneBlue
class node_user_images,node_qt_resources,node_sound_asset toneAmber
class node_cmake,node_presets,node_release_scripts,node_windows_release,node_linux_release toneMint
class node_qt5 toneNeutral
```

## Components

### Desktop application

- [Process entry](https://github.com/adskdev/projectlobotomy/blob/master/src/main.cpp): C++ entry point · Initializes Qt and starts the event loop. · `src/main.cpp`
- [LobotomyApp](https://github.com/adskdev/projectlobotomy/blob/master/src/LobotomyApp.cpp): application lifecycle · Owns lifecycle, tray UI, random-image activation, and shutdown. · `src/LobotomyApp.cpp`
- [LobotomyApp interface](https://github.com/adskdev/projectlobotomy/blob/master/src/LobotomyApp.h): C++ header · `src/LobotomyApp.h`
- **Qt GUI event loop**: Qt runtime · Keeps the long-lived desktop application active.
- **Tray controls**: system tray UI · Provides the user's control and escape surface.
- **Random image trigger**: event action
- **On-screen image**: display surface

### Media boundaries

- **Local user folders**: filesystem images · Image candidates remain on the user's machine.
- [Qt resource bundle](https://github.com/adskdev/projectlobotomy/blob/master/res/resources.qrc): compiled resources · Immutable application-shipped media. · `res/resources.qrc`
- [Bundled sound](https://github.com/adskdev/projectlobotomy/blob/master/res/sound.wav): audio asset · `res/sound.wav`

### Build and release

- [CMake build](https://github.com/adskdev/projectlobotomy/blob/master/CMakeLists.txt): native build system · Coordinates compilation and Qt integration. · `CMakeLists.txt`
- [CMake presets](https://github.com/adskdev/projectlobotomy/blob/master/CMakePresets.json): build presets · `CMakePresets.json`
- [Release wrappers](https://github.com/adskdev/projectlobotomy/blob/master/buildRelease.sh): platform packaging · Windows and Linux release entry scripts. · `buildRelease.sh`
- [Windows distribution](https://github.com/adskdev/projectlobotomy/blob/master/buildRelease.bat): desktop package · Requires adjacent Qt DLLs and the Visual C++ Redistributable. · `buildRelease.bat`
- **Linux distribution**: desktop package · Requires Qt 5 base, tools, and multimedia packages.

### Other components

- **Qt 5**: GUI and multimedia runtime · Supplies GUI, tray, resources, and audio capabilities.

## Connections

- Process entry → LobotomyApp: constructs
- Process entry → Qt GUI event loop: starts
- LobotomyApp interface → LobotomyApp: declares
- Qt GUI event loop → LobotomyApp: dispatches events to
- LobotomyApp → Tray controls: provides
- Tray controls → Random image trigger: activates
- Random image trigger → Local user folders: selects from
- Random image trigger → On-screen image: displays selected image
- LobotomyApp → Qt resource bundle: uses
- Qt resource bundle → Bundled sound: packages
- LobotomyApp → Qt 5: runs on
- Qt resource bundle → Qt 5: compiled by
- CMake build → Process entry: builds
- CMake build → Qt 5: integrates
- CMake presets → CMake build: configures
- Release wrappers → CMake build: invokes
- Windows distribution → Release wrappers: Windows wrapper
- Release wrappers → Linux distribution: produces
