# 787b-r26b/wails-applauncher-client architecture

> Architecture diagram of the GitHub repository 787b-r26b/wails-applauncher-client, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/787b-r26b/wails-applauncher-client
- Repository: https://github.com/787b-r26b/wails-applauncher-client

## Overview

##### Project type and purpose
- This is a desktop application built with the Wails framework, combining a Go backend with a React-TypeScript frontend.
- It’s intended to run as a native app on Windows and macOS, calling Go methods from the UI and optionally executing scripts (in server-files/).

##### File structure
Top-level:
- app.go, main.go, executor.go, config.go – Go entry points and business logic
- wails.json – Wails project configuration
- go.mod/go.sum – Go module dependencies
- frontend/ – React-TS application (Vite build, wailsjs bindings)
- build/ – Platform-specific packaging (darwin, windows installers)
- server-files/ – Example scripts and manifest for runtime execution
- package.json/package-lock.json – (If any JavaScript tooling at root; mostly managed in frontend/)

Patterns & hints:
- MVC-like split: frontend UI (View), Go code (Controller/Model), optional script executor
- Vite dev server for hot reloading; Wails runtime for production

##### README for additional insights
- Uses `wails dev` for local development: spins up Vite + Go RPC server
- Uses `wails build` to produce redistributable binaries for Windows/macOS

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        UI["React UI"]:::frontend
        Index["index.html"]:::frontend
        ViteConfig["Vite Configuration"]:::frontend
        Bindings["Wails JS Bindings"]:::frontend
    end

    %% Wails Runtime
    subgraph "Wails Runtime"
        IPC["JS<-->Go RPC Bridge"]:::backend
    end

    %% Go Backend
    subgraph "Go Backend"
        Main["main.go"]:::backend
        App["app.go"]:::backend
        Config["config.go"]:::backend
    end

    %% Script Execution Engine
    subgraph "Script Execution Engine"
        Executor["executor.go"]:::backend
        Manifest["manifest.json"]:::external
        CScript["hello.c"]:::external
        PyScript["hello.py"]:::external
        RbScript["hello.rb"]:::external
    end

    %% Build & Packaging
    subgraph "Build & Packaging"
        WailsJson["wails.json"]:::build
        subgraph "Development Mode"
            ViteDev["Vite Dev Server"]:::build
        end
        subgraph "Production Mode"
            ViteBuild["Vite Build (Static Assets)"]:::build
            WailsBuild["Wails Packaging"]:::build
            MacInfo["Info.plist"]:::build
            MacInfoDev["Info.dev.plist"]:::build
            WinNSI1["project.nsi"]:::build
            WinNSI2["wails_tools.nsh"]:::build
            WinInfo["info.json"]:::build
        end
    end

    %% Relationships
    ViteDev -->|serves UI| UI
    ViteBuild -->|builds assets| UI
    ViteBuild -->|embeds assets| Main
    WailsJson -->|configures| Main

    UI -->|calls RPC| IPC
    IPC -->|forwards to| Main
    Main -->|initializes| App
    App -->|loads config| Config
    App -->|executes| Executor
    Executor -->|reads manifest| Manifest
    Executor -->|executes| CScript
    Executor -->|executes| PyScript
    Executor -->|executes| RbScript

    WailsBuild -->|packages for macOS| MacInfo
    WailsBuild -->|packages for macOS| MacInfoDev
    WailsBuild -->|packages for Windows| WinNSI1
    WailsBuild -->|packages for Windows| WinNSI2
    WailsBuild -->|includes manifest| WinInfo

    %% Click Events
    click UI "https://github.com/787b-r26b/wails-applauncher-client/tree/main/frontend/src"
    click Index "https://github.com/787b-r26b/wails-applauncher-client/blob/main/frontend/index.html"
    click ViteConfig "https://github.com/787b-r26b/wails-applauncher-client/blob/main/frontend/vite.config.ts"
    click Bindings "https://github.com/787b-r26b/wails-applauncher-client/tree/main/frontend/wailsjs"
    click Main "https://github.com/787b-r26b/wails-applauncher-client/blob/main/main.go"
    click App "https://github.com/787b-r26b/wails-applauncher-client/blob/main/app.go"
    click Config "https://github.com/787b-r26b/wails-applauncher-client/blob/main/config.go"
    click Executor "https://github.com/787b-r26b/wails-applauncher-client/blob/main/executor.go"
    click WailsJson "https://github.com/787b-r26b/wails-applauncher-client/blob/main/wails.json"
    click Manifest "https://github.com/787b-r26b/wails-applauncher-client/blob/main/server-files/manifest.json"
    click CScript "https://github.com/787b-r26b/wails-applauncher-client/blob/main/server-files/hello.c"
    click PyScript "https://github.com/787b-r26b/wails-applauncher-client/blob/main/server-files/hello.py"
    click RbScript "https://github.com/787b-r26b/wails-applauncher-client/blob/main/server-files/hello.rb"
    click MacInfo "https://github.com/787b-r26b/wails-applauncher-client/blob/main/build/darwin/Info.plist"
    click MacInfoDev "https://github.com/787b-r26b/wails-applauncher-client/blob/main/build/darwin/Info.dev.plist"
    click WinNSI1 "https://github.com/787b-r26b/wails-applauncher-client/blob/main/build/windows/installer/project.nsi"
    click WinNSI2 "https://github.com/787b-r26b/wails-applauncher-client/blob/main/build/windows/installer/wails_tools.nsh"
    click WinInfo "https://github.com/787b-r26b/wails-applauncher-client/blob/main/build/windows/info.json"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef backend fill:#d4edda,stroke:#333,stroke-width:1px
    classDef build fill:#fff3cd,stroke:#333,stroke-width:1px
    classDef external fill:#e2e3e5,stroke:#333,stroke-width:1px
```
