caelum0x d56639a594
Some checks are pending
build-images / api (push) Waiting to run
build-images / worker-gpu (push) Waiting to run
build-images / web (push) Waiting to run
codeql / Analyze (javascript-typescript) (push) Waiting to run
codeql / Analyze (python) (push) Waiting to run
perf / API hot-path micro-smoke (budgeted) (push) Waiting to run
perf / Desktop engine crates (release build check) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Waiting to run
vision2026-ci / API phase modules (ruff + pytest) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Waiting to run
vision2026-ci / Python SDK resource tests (push) Waiting to run
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Waiting to run
vision2026-ci / Alembic upgrade + drift check (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Waiting to run
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

4.2 KiB

ReelForge Desktop

A native desktop client for ReelForge — a screen-recording UGC reel generator. Desktop is the ideal primary client because screen capture is native.

The app does not reimplement the pipeline. It records the screen, uploads the clip to R2 via the backend's presign endpoint, creates a job (POST /jobs), polls it, and shows the result. All heavy lifting (script → TTS → avatar → captions → compose) runs on the existing ReelForge FastAPI backend.

Stack

  • Electron (main process, native screen capture, secure config storage)
  • Vite + React 19 + TypeScript (renderer)
  • All dependencies are permissive-licensed (MIT / Apache-2.0)

Security model

This app follows Electron's hardening rules by default:

  • contextIsolation: true, nodeIntegration: false, sandbox: true
  • The renderer talks to main only through a typed preload contextBridge (window.reelforge). No raw ipcRenderer or Node APIs are exposed.
  • Only local/trusted content is loaded (the Vite dev server in dev, the bundled dist/index.html in production). External navigation and window.open are denied and routed to the OS browser.
  • No secrets in the renderer bundle. The API base URL and API token live in the main process (electron/config-store.ts), with the token encrypted at rest via Electron safeStorage. Authenticated requests are proxied through main (electron/api-proxy.ts), which attaches the token — the renderer never sees it.
  • Every IPC input is re-validated in the main process.

Preload contextBridge API (window.reelforge)

Method Signature Purpose
getConfig () => Promise<PublicConfig> Read the non-secret config (apiBase, tokenSet).
saveConfig (patch: ConfigPatch) => Promise<PublicConfig> Persist a validated { apiBase?, token? } patch.
request <T>(input: ApiRequestInput) => Promise<T> Authenticated API call, proxied + unwrapped by main.
getScreenSources () => Promise<ScreenSource[]> Enumerate capturable screens/windows for the recorder.

The token is write-only across the bridge: saveConfig accepts it, but no method ever returns it.

Project layout

desktop/
├── electron/                 # Main process (Node) — never bundled into the renderer
│   ├── main.ts               #   BrowserWindow + IPC handlers + hardening
│   ├── preload.ts            #   contextBridge — the ONLY renderer↔main surface
│   ├── ipc.ts                #   Shared channel names + payload/bridge types
│   ├── config-store.ts       #   Secure config (apiBase + encrypted token)
│   └── api-proxy.ts          #   Authenticated fetch + envelope unwrap
├── src/                      # Renderer (React)
│   ├── main.tsx              #   React entry
│   ├── App.tsx               #   Shell + view routing + settings
│   ├── global.d.ts           #   window.reelforge typing
│   ├── styles.css            #   Theme (mirrors web/app/globals.css)
│   ├── lib/                  #   api.ts, types.ts, recorder.ts
│   └── views/                #   Record / Generate / Library / Settings
├── index.html
├── vite.config.ts
├── tsconfig.json             # Renderer + shared typecheck (tsc --noEmit)
├── tsconfig.electron.json    # Compiles electron/ → dist-electron/ (CommonJS)
└── electron-builder.yml

Scripts

Script What it does
npm run dev Runs the Vite dev server and Electron together (via concurrently).
npm run typecheck tsc --noEmit over the whole project.
npm run build Typecheck, build the renderer, compile main, then package with electron-builder.
npm start Launch the packaged/compiled app (electron .).

Getting started

npm install
npm run typecheck    # must pass
npm run dev          # launches the app against the dev server

Open Settings and set your API base (default http://localhost:8080/api/v1) and API token before generating.

A full native packaged build (electron-builder) is a follow-up; this is the scaffold + core (record → upload → create job → poll → result).