# silwings-git/one-click-launch architecture

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

- Interactive diagram: https://gitdiagram.com/silwings-git/one-click-launch
- Repository: https://github.com/silwings-git/one-click-launch

## Overview

一键启动 is a desktop resource-group launcher. Users create or choose a launcher group, add files, folders, or URLs, then launch its resources together; the README also documents startup automation, tray controls, drag-and-drop, settings, and remembered window behavior. The graph separates Vue screens, command handlers, SQLite persistence, and event/window lifecycle. Some screens and backend modules were not excerpted, so their internal links are omitted rather than inferred.

Main entry points: [`src-tauri/src/api/launcher_api.rs`](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/api/launcher_api.rs) (Group and launch commands), [`src-tauri/src/events/system_listeners.rs`](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/events/system_listeners.rs) (System listeners), [`src-tauri/src/lib.rs`](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/lib.rs) (Application runtime), [`src-tauri/src/api/window_api.rs`](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/api/window_api.rs) (Window and tray)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_app["App shell<br/>[App.vue]"]
  node_home["Launcher groups<br/>[home.vue]"]
  node_launcher["Launcher editor<br/>[launcher.vue]"]
  node_launcher_lite["Quick launcher<br/>[launcherLite.vue]"]
  node_drag_drop["Drop-to-add UI"]
  node_settings_ui["Settings screen<br/>[settings.vue]"]
end

subgraph group_commands["Command layer"]
  node_launcher_api["Group and launch commands<br/>[launcher_api.rs]"]
  node_setting_api["Settings commands<br/>[setting_api.rs]"]
end

subgraph group_storage["SQLite storage"]
  node_launcher_db[("Launcher records<br/>[launcher.rs]")]
  node_resource_db[("Resource records")]
  node_settings_db[("Settings records<br/>[settings.rs]")]
end

subgraph group_lifecycle["Events and window"]
  node_window_api["Window and tray<br/>[window_api.rs]"]
  node_events["Event dispatch<br/>[events.rs]"]
  node_listeners["System listeners"]
  node_runtime["Application runtime<br/>[lib.rs]"]
end

node_user(("User"))
node_resource_targets["Files, apps, and URLs"]
node_os["Operating system"]

node_user -->|"manages groups"| node_home
node_home -->|"edits groups"| node_launcher
node_user -->|"adds resources"| node_launcher
node_user -->|"starts groups"| node_launcher_lite
node_app -->|"renders"| node_home
node_home -->|"uses drop UI"| node_drag_drop
node_launcher_api -->|"reads and writes"| node_launcher_db
node_launcher_api -->|"reads and writes"| node_resource_db
node_launcher_api -->|"reads settings"| node_settings_db
node_launcher_api -->|"emits updates"| node_events
node_launcher_api -->|"opens resources"| node_resource_targets
node_setting_api -->|"reads and writes"| node_settings_db
node_setting_api -->|"emits updates"| node_events
node_window_api -->|"reads groups"| node_launcher_db
node_window_api -->|"dispatches drops"| node_events
node_window_api -->|"controls window and tray"| node_os
node_events -->|"registers listeners"| node_listeners
node_listeners -->|"launches groups"| node_launcher_api
node_listeners -->|"loads startup resources"| node_resource_db
node_listeners -->|"checks launch setting"| node_setting_api
node_listeners -->|"refreshes tray"| node_window_api
node_runtime -->|"registers"| node_listeners
node_runtime -->|"sets up tray"| node_window_api
node_runtime -->|"initializes"| node_launcher_db
node_runtime -->|"initializes"| node_resource_db
node_runtime -->|"initializes"| node_settings_db
node_settings_ui -.->|"uses settings commands"| node_setting_api
node_launcher_lite -.->|"requests group launch"| node_launcher_api

click node_app "https://github.com/silwings-git/one-click-launch/blob/main/src/App.vue"
click node_home "https://github.com/silwings-git/one-click-launch/blob/main/src/home.vue"
click node_launcher "https://github.com/silwings-git/one-click-launch/blob/main/src/launcher.vue"
click node_launcher_lite "https://github.com/silwings-git/one-click-launch/blob/main/src/launcherLite.vue"
click node_drag_drop "https://github.com/silwings-git/one-click-launch/blob/main/src/DragDropResource.vue"
click node_settings_ui "https://github.com/silwings-git/one-click-launch/blob/main/src/settings.vue"
click node_launcher_api "https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/api/launcher_api.rs"
click node_setting_api "https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/api/setting_api.rs"
click node_window_api "https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/api/window_api.rs"
click node_launcher_db "https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/db/launcher.rs"
click node_resource_db "https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/db/launcher_resource.rs"
click node_settings_db "https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/db/settings.rs"
click node_events "https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/events.rs"
click node_listeners "https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/events/system_listeners.rs"
click node_runtime "https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/lib.rs"

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_app,node_home,node_launcher,node_launcher_lite,node_drag_drop,node_settings_ui,node_user toneBlue
class node_launcher_api,node_setting_api toneAmber
class node_launcher_db,node_resource_db,node_settings_db toneMint
class node_window_api,node_events,node_listeners,node_runtime toneRose
class node_resource_targets,node_os toneIndigo
```

## Components

### User interface

- [App shell](https://github.com/silwings-git/one-click-launch/blob/main/src/App.vue): `src/App.vue`
- [Launcher groups](https://github.com/silwings-git/one-click-launch/blob/main/src/home.vue): `src/home.vue`
- [Launcher editor](https://github.com/silwings-git/one-click-launch/blob/main/src/launcher.vue): `src/launcher.vue`
- [Quick launcher](https://github.com/silwings-git/one-click-launch/blob/main/src/launcherLite.vue): `src/launcherLite.vue`
- [Drop-to-add UI](https://github.com/silwings-git/one-click-launch/blob/main/src/DragDropResource.vue): `src/DragDropResource.vue`
- [Settings screen](https://github.com/silwings-git/one-click-launch/blob/main/src/settings.vue): `src/settings.vue`

### Command layer

- [Group and launch commands](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/api/launcher_api.rs): `src-tauri/src/api/launcher_api.rs`
- [Settings commands](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/api/setting_api.rs): `src-tauri/src/api/setting_api.rs`

### SQLite storage

- [Launcher records](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/db/launcher.rs): `src-tauri/src/db/launcher.rs`
- [Resource records](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/db/launcher_resource.rs): `src-tauri/src/db/launcher_resource.rs`
- [Settings records](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/db/settings.rs): `src-tauri/src/db/settings.rs`

### Events and window

- [Window and tray](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/api/window_api.rs): `src-tauri/src/api/window_api.rs`
- [Event dispatch](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/events.rs): `src-tauri/src/events.rs`
- [System listeners](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/events/system_listeners.rs): `src-tauri/src/events/system_listeners.rs`
- [Application runtime](https://github.com/silwings-git/one-click-launch/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Other components

- **User**
- **Files, apps, and URLs**
- **Operating system**

## Connections

- User → Launcher groups: manages groups (evidence: `README.md`)
- Launcher groups → Launcher editor: edits groups (evidence: `README.md`)
- User → Launcher editor: adds resources (evidence: `README.md`)
- User → Quick launcher: starts groups (evidence: `README.md`)
- App shell → Launcher groups: renders (evidence: `src/App.vue`)
- Launcher groups → Drop-to-add UI: uses drop UI (evidence: `src/home.vue`)
- Group and launch commands → Launcher records: reads and writes (evidence: `src-tauri/src/api/launcher_api.rs`)
- Group and launch commands → Resource records: reads and writes (evidence: `src-tauri/src/api/launcher_api.rs`)
- Group and launch commands → Settings records: reads settings (evidence: `src-tauri/src/api/launcher_api.rs`)
- Group and launch commands → Event dispatch: emits updates (evidence: `src-tauri/src/api/launcher_api.rs`)
- Group and launch commands → Files, apps, and URLs: opens resources (evidence: `src-tauri/src/api/launcher_api.rs`)
- Settings commands → Settings records: reads and writes (evidence: `src-tauri/src/api/setting_api.rs`)
- Settings commands → Event dispatch: emits updates (evidence: `src-tauri/src/api/setting_api.rs`)
- Window and tray → Launcher records: reads groups (evidence: `src-tauri/src/api/window_api.rs`)
- Window and tray → Event dispatch: dispatches drops (evidence: `src-tauri/src/api/window_api.rs`)
- Window and tray → Operating system: controls window and tray (evidence: `src-tauri/src/api/window_api.rs`)
- Event dispatch → System listeners: registers listeners (evidence: `src-tauri/src/events.rs`)
- System listeners → Group and launch commands: launches groups (evidence: `src-tauri/src/events/system_listeners.rs`)
- System listeners → Resource records: loads startup resources (evidence: `src-tauri/src/events/system_listeners.rs`)
- System listeners → Settings commands: checks launch setting (evidence: `src-tauri/src/events/system_listeners.rs`)
- System listeners → Window and tray: refreshes tray (evidence: `src-tauri/src/events/system_listeners.rs`)
- Application runtime → System listeners: registers (evidence: `src-tauri/src/lib.rs`)
- Application runtime → Window and tray: sets up tray (evidence: `src-tauri/src/lib.rs`)
- Application runtime → Launcher records: initializes (evidence: `src-tauri/src/lib.rs`)
- Application runtime → Resource records: initializes (evidence: `src-tauri/src/lib.rs`)
- Application runtime → Settings records: initializes (evidence: `src-tauri/src/lib.rs`)
- Settings screen → Settings commands: uses settings commands
- Quick launcher → Group and launch commands: requests group launch
