How ttqftech/ffbox works
Project type and purpose
• This is an Electron‐based full‑stack desktop application (“FFBox”) that provides a GUI shell over FFmpeg for local and remote media transcoding.
• It strictly separates frontend (renderer), backend (Node/Electron main), native OS helpers (C++ binary), and remote control (built‑in HTTP server).
File structure
• Top‐level config and scripts: custom Vite/Vue/Electron build and dev scripts (config/*.ts/js, scripts/*.mjs).
• Native helper: src/WindowsHelper/FFBoxHelper (C++ Visual Studio project producing FFBoxHelper.exe).
• Electron backend: src/main (main process code, OSBridge), src/preload (context‑bridge), src/backend (services, FFmpeg invocation, UI bridge, webui server).
• Shared code: src/common (types, constants, spawning utilities).
• Renderer: src/renderer (Vue 3 + TypeScript, UI components, nodeBridge/serviceBridge, public assets).
• Packaging config: electron-builder.json5, platform config in config/pkg.*.config.json, WindowsInstaller scripts.
Key README insights
• Versions 4.x: complete front/back separation, custom build scripts.
• Dev flow:
• dev-frontend.mjs → live‐reload renderer + watch preload/main
• build-backend.mjs → compiles & bundles backend
• build-frontend.mjs → builds main/preload/renderer
• VSCode tasks and npm scripts orchestrate these
• Package step triggers electron-builder to produce cross‑platform installers, using WindowsInstaller .iss scripts for Windows.
Final advice
• Be exhaustive: capture all significant modules and data flows.
• Both build/deploy flow (scripts → electron-builder → installers) and runtime flow.
• Keep labels clear and consistent with code folder names (e.g., FFBoxService, osBridge).