Code
Search code
Latest commit
Afogados desktop
The Afogados desktop app for Linux and Windows. It's an Electron shell around the stream_afogados web frontend. Going live uses a native helper (afogados-media, Rust) that captures the screen, encodes on the GPU and publishes over WHIP.
- Sign-in runs in the system browser (OAuth PKCE). Tokens stay in the main process.
- Go live with any screen or window plus system audio (minus the apps you exclude) and, if you want, your microphone.
- When a game is running, the stream's category is filled in from it.
- Closing the window keeps the app in the tray, like Discord. Updates download in the background.
How it all fits together, and what's verified so far: docs/ARCHITECTURE.md.
Layout
app/ Electron: main process, preload, desktop modules swapped into the web UI
native/ afogados-media, the capture/encode/WHIP helper (Rust)
ci/ release SDK image (toolchains, pinned FFmpeg, Node)
scripts/ release build: ci_build.sh (host, Docker), ci_compile.sh (in the SDK)
patches/ electron-builder: NSIS uninstaller without Wine
docs/ architecture, decisions, status
Build and run
You need Node 24+, pnpm, Rust stable, and system FFmpeg 8+ and PipeWire (Linux). The web frontend must be checked out next to this repo, or point AFOGADOS_WEB_DIR at it.
pnpm install
pnpm native:build # native/target/fast/afogados-media (native:build:dist: release profile)
pnpm app:build # app/out
pnpm --filter afogados-desktop start
pnpm app:dev # rebuild on change
Packaging and releases
pnpm dist:linux # app/dist: AppImage, tar.gz, unpacked dir
pnpm dist:win # app/dist: NSIS setup, zip (cross-builds the helper with cargo-xwin)
To release, bump version in app/package.json, commit to main, then tag:
git tag v0.2.0 && git push origin main v0.2.0
.forgejo/workflows/release.yml builds both systems on the ARM runner, inside a Docker SDK image (ci/). The media helper is cross-compiled for Linux x86_64 (cross gcc, BtbN's FFmpeg bundled next to it) and for Windows x86_64 (cargo-xwin). The UI comes from maot/afogados main. It then publishes the AppImage, tar.gz, NSIS installer, zip and latest*.yml. The same build runs locally with TAG=v0.2.0 sh scripts/ci_build.sh, which needs Docker and writes to dist/. Running the workflow by hand builds without publishing.
Installed apps read the feed at releases/download/latest/ of the repo that released them. AFOGADOS_UPDATE_FEED overrides it at build time.
Only the AppImage and the NSIS install update themselves. The tar.gz, the zip and unpacked builds say so in Settings → App.
Environment
| Variable | Use |
|---|---|
AFOGADOS_API_URL, AFOGADOS_APP_URL |
API and web origins (default: production) |
AFOGADOS_WEB_DIR |
stream_afogados checkout (default ../stream_afogados) |
AFOGADOS_USER_DATA |
separate profile, e.g. a second account or tests |
AFOGADOS_APP_PRIORITY=0 |
Windows: no CPU/GPU priority boost (A/B the game's FPS) |
AFOGADOS_UPDATE=0 |
turn updates off |
AFOGADOS_UPDATE_URL |
check another feed at runtime (a local server for testing) |
The full list, with the media helper's switches, is under Running.
License
Undecided, see License.