Architecture Overview

How Hippopotamoose All In One is built — from top-level structure to core subsystems.

Technology Stack

LayerTechnologyWhy
UI FrameworkPyQt6Native Windows look, robust widget toolkit, QThread for non-blocking I/O
LanguagePython 3.11+Rapid development, excellent library ecosystem
Browser PreviewPyQt6 QWebEngineViewChromium-based, embedded in the UI
AI DelegationClaude Code CLI / Gemini CLISpawned as child processes; handles long-running autonomous work outside the main process
Site DeploymentCloudflare Pages + Wrangler CLIFree tier, global CDN, custom domains, instant deploys
Site DownloadsCyotek WebCopyHandles auth, redirects, relative URL rewriting for offline viewing
Stock Photo DetectionPlaywright + ChromiumGoogle Lens requires a real browser; Playwright automates it
Credential StorageWindows Registry (winreg)Secure OS-level storage, not exposed in filesystem
State StorageFlat JSON filesSimple, portable, human-readable
Build/PackagingPyInstaller + Inno SetupProduces a self-contained Windows installer with all dependencies bundled

Application Layers

Entry Point

main.py — Detects frozen (packaged) vs. source context, sets APP_DIR, initializes configuration, creates the QApplication with the global dark stylesheet, and shows the MainWindow.

Main Window

main_window.py — A QMainWindow containing a vertical QSplitter. The top half holds a horizontal QSplitter with the Discovery Panel (left) and Swiper Panel (right). The bottom half is the Pipeline Panel. A toolbar at the top contains the Build from Scratch button, Add Existing Site button, and Settings gear.

Core Subsystems (core/)

ModuleRole
config.pyFrozen AppConfig dataclass. All filesystem paths derive from a single app_root. Singleton pattern — call init_config(app_root) once, then config() anywhere.
signals.pyAppSignals singleton (QObject). Cross-module signal bus. Emits queue_updated, pipeline_added/updated/removed, data_reset.
data_manager.pyCentral state store. Owns pipeline, queue, and rejected lists in memory. Atomic write to disk. Crash-safe step recovery on startup.
registry.pyRead/write Windows Registry under HKCU\Software\Hippopotamoose\AllInOne. Typed accessors for all keys.
ai_launcher.pyRoutes to claude_launcher or gemini_launcher based on USE_GEMINI_CLI registry flag.
claude_launcher.pyWrites prompt to temp file, spawns PowerShell window with claude --dangerously-skip-permissions. Returns (process, ProcessMonitor).
process_monitor.pyQThread. Calls proc.wait() and emits finished(exit_code) when the spawned process terminates.
webcopy_queue.pyBounded concurrency pool (max 3 concurrent WebCopy jobs). Two job types: pipeline (enqueue) and example (enqueue_example).
webcopy_worker.pyQThread wrapping wcopy.exe. Parses stdout for progress. 5-minute hard timeout.
deploy_worker.pyQThread running deploy-demo.ps1 hidden. 3-minute timeout. Returns demo URL on success.
cold_call_worker.pySilent Claude invocation to extract contact JSON from downloaded HTML files.
backup_worker.pyQThread. Copies edited_sites/<slug> → Site Backups/<slug>/Edition N.
discovery_worker.pyQThread. Calls Google Places API for each spiral tile.

UI Modules (ui/)

ModuleRole
pipeline_row_widget.pyThe core UI element. One row per lead. Contains step cells, action buttons, URL links, and note/folder/remove/delete controls.
discovery_panel.pyNiche/coordinates/radius/chunks inputs. Preset management. Queue/Rejected list toggle.
swiper_panel.pyQWebEngineView browser. Pass/Example/Copy buttons and keyboard shortcuts. Download progress display.
settings_dialog.pyFull settings management: API keys, AI models, export/import, clear data.
scratch_popup.pyBuild from Scratch dialog. Both path A (existing folder) and path B (AI build).
cold_call_popup.pyScrollable contact list with per-row copy buttons.
seo_window.pySEO audit results in per-page card layout.
note_popup.pyFree-text note editor per pipeline entry.
toast.pyNon-modal auto-dismiss notification overlays, stacked bottom-right.

Signal Flow

The app uses PyQt6 signals to communicate between layers without tight coupling:

Threading Model

The main thread runs the Qt event loop and all UI. Every blocking operation runs in a QThread worker:

AI work itself runs in separate spawned terminal windows, not in the app's process at all — this keeps the UI fully responsive during 10-minute AI builds.