How get-winfig/winfig-apps works
Project Type and Purpose
• This is a “Factory” full-stack tooling repository rather than a traditional frontend/backend app.
• Purpose: Automatically generate and release multiple native desktop applications (Windows, macOS, Linux) from a simple JSON config (scripts/apps.json).
• Key technologies:
• Node.js scripts (in scripts/) to read and manipulate JSON and assets
• Tauri (Rust) framework in src-tauri/ for building tiny native apps
• GitHub Actions in .github/workflows/release.yml for CI/CD and automated releases
High-Level File Structure Analysis
• Top-level:
• package.json / package-lock.json – Node.js project metadata, scripts, and dependencies
• src-tauri/ – Tauri (Rust) project with main.rs, build.rs, and tauri.conf.json defining the native wrapper logic and bundling instructions
• .github/workflows/release.yml – CI pipeline that triggers builds on push / tag and publishes artifacts to GitHub Releases
• src/index.html – basic HTML template loaded by Tauri
Key Components
a. Configuration Layer
b. Generator Layer (Node.js Scripts)
• Read apps.json
• Inject per-app settings into src-tauri/tauri.conf.json or environment variables
c. Build Layer (Tauri/Rust)
• src-tauri/build.rs: pre-build hooks (e.g., copy assets)
• src-tauri/src/main.rs: application entrypoint that loads the configured URL in a webview
• Tauri CLI & Rust toolchain invoke OS-specific native bundlers to produce .exe, .dmg, .deb
d. CI/CD Layer (GitHub Actions)
• .github/workflows/release.yml:
• On push/tag → Installs Node & Rust toolchains
• Runs Node scripts → config + assets generation
• Invokes npm run build / tauri build
• Collects artifacts and publishes to GitHub Releases
e. Outputs / Release Artifacts
• Native installers for each configured app published as GitHub Release assets
Relationships and Data Flow
1. Developer edits scripts/apps.json
3. Tauri build process compiles Rust + packages assets → native binaries
4. CI/CD workflow uploads outputs to GitHub Releases
Architectural Patterns & Principles
• “Factory” Pattern: Single codebase generates N desktop apps based on runtime configuration
• CI/CD as Code: Entire pipeline defined in GitHub Actions YAML
• Clear Separation of Concerns:
• Configuration (JSON)
• Generation (scripts/)
• Native build (Tauri/Rust)
• Deployment (Actions → Releases)