# szkrd/springald architecture

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

- Interactive diagram: https://gitdiagram.com/szkrd/springald
- Repository: https://github.com/szkrd/springald

## Overview

Springald is an Electron desktop launcher. The main workflow loads configuration, indexes configured sources, filters and displays matching items, then launches the selected item; backend IPC controls the window and supports shortcuts and socket-based toggling. The graph preserves the documented Fluxbox, PATH, directory, custom-shortcut, and .desktop capabilities. Some subsystem links rely on SOURCE INDEX references or README documentation because their implementation excerpts were not provided.

Main entry points: [`src/renderer/runtime/parseAll.ts`](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parseAll.ts) (Parse coordinator), [`src/main.ts`](https://github.com/szkrd/springald/blob/master/src/main.ts) (Launcher UI), [`src/backend/initBackend.ts`](https://github.com/szkrd/springald/blob/master/src/backend/initBackend.ts) (Backend startup), [`src/backend/messaging/handleMesssage.ts`](https://github.com/szkrd/springald/blob/master/src/backend/messaging/handleMesssage.ts) (Message handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_renderer["Renderer launcher"]
  node_ui["Launcher UI<br/>[main.ts]"]
  node_search["Search filtering"]
  node_scoring["Match scoring<br/>[search.ts]"]
  node_results["Results rendering<br/>[renderResults.ts]"]
  node_runtime["Renderer runtime<br/>[runtime.ts]"]
  node_launch["App launching<br/>[openWithApp.ts]"]
end

subgraph group_indexing["Item indexing"]
  node_parse["Parse coordinator<br/>[parseAll.ts]"]
  node_fluxbox["Fluxbox menu"]
  node_path["PATH executables<br/>[parsePath.ts]"]
  node_directories["Configured folders<br/>[parseDirs.ts]"]
  node_shortcuts["Custom shortcuts"]
  node_searchtext["Searchable text"]
  node_desktop["Desktop-file hooks"]
end

subgraph group_backend["Electron backend"]
  node_backend["Backend startup<br/>[initBackend.ts]"]
  node_window["Window management<br/>[initWindow.ts]"]
  node_globalkeys["Global shortcuts"]
  node_tray["System tray<br/>[initTray.ts]"]
  node_messages["Message handlers<br/>[handleMesssage.ts]"]
  node_bus["Backend event bus<br/>[backendEventBus.ts]"]
  node_socket["Unix socket<br/>[unixSocket.ts]"]
end

subgraph group_shared["Shared services"]
  node_config["Configuration<br/>[config.ts]"]
  node_types["Config types<br/>[config.types.ts]"]
  node_fileutils["File utilities<br/>[file.ts]"]
  node_log["Buffered logging<br/>[log.ts]"]
end

node_user(("User"))
node_electron["Electron runtime"]

node_user -->|"enters query"| node_ui
node_ui -->|"loads items"| node_parse
node_ui -->|"filters query"| node_search
node_search -->|"scores matches"| node_scoring
node_ui -->|"renders matches"| node_results
node_ui -->|"launches selection"| node_launch
node_ui -->|"uses runtime"| node_runtime
node_runtime -->|"filters items"| node_search
node_runtime -->|"renders results"| node_results
node_parse -->|"parses menu"| node_fluxbox
node_parse -->|"parses PATH"| node_path
node_parse -->|"parses folders"| node_directories
node_parse -->|"parses shortcuts"| node_shortcuts
node_parse -->|"builds searchable text"| node_searchtext
node_parse -->|"runs post-parse hooks"| node_desktop
node_ui -->|"loads configuration"| node_config
node_config -->|"uses config type"| node_types
node_config -->|"reads JSON"| node_fileutils
node_backend -->|"loads configuration"| node_config
node_backend -->|"initializes window"| node_window
node_backend -->|"initializes shortcuts"| node_globalkeys
node_backend -->|"initializes tray"| node_tray
node_backend -->|"registers handlers"| node_messages
node_messages -->|"registers callbacks"| node_bus
node_socket -->|"dispatches messages"| node_messages
node_globalkeys -->|"sends commands"| node_messages
node_tray -->|"sends commands"| node_messages
node_ui -->|"uses IPC"| node_electron
node_backend -->|"controls app"| node_electron
node_launch -->|"uses parsed items"| node_parse
node_parse -->|"uses file helpers"| node_fileutils
node_backend -->|"records events"| node_log

click node_ui "https://github.com/szkrd/springald/blob/master/src/main.ts"
click node_search "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/filterSearchItems.ts"
click node_scoring "https://github.com/szkrd/springald/blob/master/src/renderer/utils/search.ts"
click node_results "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/renderResults.ts"
click node_runtime "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/runtime.ts"
click node_launch "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/openWithApp.ts"
click node_parse "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parseAll.ts"
click node_fluxbox "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/parseFluxboxMenu.ts"
click node_path "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/parsePath.ts"
click node_directories "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/parseDirs.ts"
click node_shortcuts "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/parseCustomShortcuts.ts"
click node_searchtext "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/getSearchableText.ts"
click node_desktop "https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/postParsingHooks/processXdgDesktopFile.ts"
click node_backend "https://github.com/szkrd/springald/blob/master/src/backend/initBackend.ts"
click node_window "https://github.com/szkrd/springald/blob/master/src/backend/initWindow.ts"
click node_globalkeys "https://github.com/szkrd/springald/blob/master/src/backend/initGlobalShortcuts.ts"
click node_tray "https://github.com/szkrd/springald/blob/master/src/backend/initTray.ts"
click node_messages "https://github.com/szkrd/springald/blob/master/src/backend/messaging/handleMesssage.ts"
click node_bus "https://github.com/szkrd/springald/blob/master/src/backend/messaging/backendEventBus.ts"
click node_socket "https://github.com/szkrd/springald/blob/master/src/backend/messaging/unixSocket.ts"
click node_config "https://github.com/szkrd/springald/blob/master/src/shared/config.ts"
click node_types "https://github.com/szkrd/springald/blob/master/src/shared/config.types.ts"
click node_fileutils "https://github.com/szkrd/springald/blob/master/src/renderer/utils/file.ts"
click node_log "https://github.com/szkrd/springald/blob/master/src/shared/log.ts"

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_ui,node_search,node_scoring,node_results,node_runtime,node_launch,node_user toneBlue
class node_parse,node_fluxbox,node_path,node_directories,node_shortcuts,node_searchtext,node_desktop toneAmber
class node_backend,node_window,node_globalkeys,node_tray,node_messages,node_bus,node_socket toneMint
class node_config,node_types,node_fileutils,node_log toneRose
class node_electron toneIndigo
```

## Components

### Renderer launcher

- [Launcher UI](https://github.com/szkrd/springald/blob/master/src/main.ts): `src/main.ts`
- [Search filtering](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/filterSearchItems.ts): `src/renderer/runtime/filterSearchItems.ts`
- [Match scoring](https://github.com/szkrd/springald/blob/master/src/renderer/utils/search.ts): `src/renderer/utils/search.ts`
- [Results rendering](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/renderResults.ts): `src/renderer/runtime/renderResults.ts`
- [Renderer runtime](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/runtime.ts): `src/renderer/runtime/runtime.ts`
- [App launching](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/openWithApp.ts): `src/renderer/runtime/openWithApp.ts`

### Item indexing

- [Parse coordinator](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parseAll.ts): `src/renderer/runtime/parseAll.ts`
- [Fluxbox menu](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/parseFluxboxMenu.ts): `src/renderer/runtime/parsing/parseFluxboxMenu.ts`
- [PATH executables](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/parsePath.ts): `src/renderer/runtime/parsing/parsePath.ts`
- [Configured folders](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/parseDirs.ts): `src/renderer/runtime/parsing/parseDirs.ts`
- [Custom shortcuts](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/parseCustomShortcuts.ts): `src/renderer/runtime/parsing/parseCustomShortcuts.ts`
- [Searchable text](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/getSearchableText.ts): `src/renderer/runtime/parsing/getSearchableText.ts`
- [Desktop-file hooks](https://github.com/szkrd/springald/blob/master/src/renderer/runtime/parsing/postParsingHooks/processXdgDesktopFile.ts): `src/renderer/runtime/parsing/postParsingHooks/processXdgDesktopFile.ts`

### Electron backend

- [Backend startup](https://github.com/szkrd/springald/blob/master/src/backend/initBackend.ts): `src/backend/initBackend.ts`
- [Window management](https://github.com/szkrd/springald/blob/master/src/backend/initWindow.ts): `src/backend/initWindow.ts`
- [Global shortcuts](https://github.com/szkrd/springald/blob/master/src/backend/initGlobalShortcuts.ts): `src/backend/initGlobalShortcuts.ts`
- [System tray](https://github.com/szkrd/springald/blob/master/src/backend/initTray.ts): `src/backend/initTray.ts`
- [Message handlers](https://github.com/szkrd/springald/blob/master/src/backend/messaging/handleMesssage.ts): `src/backend/messaging/handleMesssage.ts`
- [Backend event bus](https://github.com/szkrd/springald/blob/master/src/backend/messaging/backendEventBus.ts): `src/backend/messaging/backendEventBus.ts`
- [Unix socket](https://github.com/szkrd/springald/blob/master/src/backend/messaging/unixSocket.ts): `src/backend/messaging/unixSocket.ts`

### Shared services

- [Configuration](https://github.com/szkrd/springald/blob/master/src/shared/config.ts): `src/shared/config.ts`
- [Config types](https://github.com/szkrd/springald/blob/master/src/shared/config.types.ts): `src/shared/config.types.ts`
- [File utilities](https://github.com/szkrd/springald/blob/master/src/renderer/utils/file.ts): `src/renderer/utils/file.ts`
- [Buffered logging](https://github.com/szkrd/springald/blob/master/src/shared/log.ts): `src/shared/log.ts`

### Other components

- **User**
- **Electron runtime**

## Connections

- User → Launcher UI: enters query (evidence: `src/main.ts`)
- Launcher UI → Parse coordinator: loads items (evidence: `src/main.ts`)
- Launcher UI → Search filtering: filters query (evidence: `src/main.ts`)
- Search filtering → Match scoring: scores matches (evidence: `src/renderer/runtime/filterSearchItems.ts`)
- Launcher UI → Results rendering: renders matches (evidence: `src/renderer/runtime/renderResults.ts`)
- Launcher UI → App launching: launches selection (evidence: `src/main.ts`)
- Launcher UI → Renderer runtime: uses runtime (evidence: `src/main.ts`)
- Renderer runtime → Search filtering: filters items (evidence: `src/renderer/runtime/runtime.ts`)
- Renderer runtime → Results rendering: renders results (evidence: `src/renderer/runtime/runtime.ts`)
- Parse coordinator → Fluxbox menu: parses menu (evidence: `src/renderer/runtime/parseAll.ts`)
- Parse coordinator → PATH executables: parses PATH (evidence: `src/renderer/runtime/parseAll.ts`)
- Parse coordinator → Configured folders: parses folders (evidence: `src/renderer/runtime/parseAll.ts`)
- Parse coordinator → Custom shortcuts: parses shortcuts (evidence: `src/renderer/runtime/parseAll.ts`)
- Parse coordinator → Searchable text: builds searchable text (evidence: `src/renderer/runtime/parseAll.ts`)
- Parse coordinator → Desktop-file hooks: runs post-parse hooks (evidence: `src/renderer/runtime/parsing/postParsingHooks/processPostParseHooks.ts`)
- Launcher UI → Configuration: loads configuration (evidence: `src/main.ts`)
- Configuration → Config types: uses config type (evidence: `src/shared/config.ts`)
- Configuration → File utilities: reads JSON (evidence: `src/shared/config.ts`)
- Backend startup → Configuration: loads configuration (evidence: `src/backend/initBackend.ts`)
- Backend startup → Window management: initializes window (evidence: `src/backend/initBackend.ts`)
- Backend startup → Global shortcuts: initializes shortcuts (evidence: `src/backend/initBackend.ts`)
- Backend startup → System tray: initializes tray (evidence: `src/backend/initBackend.ts`)
- Backend startup → Message handlers: registers handlers (evidence: `src/backend/initBackend.ts`)
- Message handlers → Backend event bus: registers callbacks (evidence: `src/backend/messaging/handleMesssage.ts`)
- Unix socket → Message handlers: dispatches messages (evidence: `src/backend/messaging/unixSocket.ts`)
- Global shortcuts → Message handlers: sends commands (evidence: `src/backend/initGlobalShortcuts.ts`)
- System tray → Message handlers: sends commands (evidence: `src/backend/initTray.ts`)
- Launcher UI → Electron runtime: uses IPC (evidence: `src/main.ts`)
- Backend startup → Electron runtime: controls app (evidence: `src/backend/initBackend.ts`)
- App launching → Parse coordinator: uses parsed items (evidence: `src/renderer/runtime/openWithApp.ts`)
- Parse coordinator → File utilities: uses file helpers (evidence: `src/renderer/runtime/parsing/parsePath.ts`)
- Backend startup → Buffered logging: records events (evidence: `src/backend/initBackend.ts`)
