Major Changes
Full Rebrand: Nearsec to Nearcade
All references to Nearsec have been replaced with Nearcade across the entire project. This includes every UI string in the Electron app and Android app, all translation files (en, es, fr, de, ja, pt), locale images (logos and titles regenerated for all languages), documentation files (ADVANCED_LOGIC, API_AND_SETUP, GETTING_STARTED, VPS_SETUP, AUTOMATED_SETUP_LEGALITY, ERROR_CODES, HOST_USAGE, NEARSEC_ARCADE), desktop file, AppStream metainfo, Flatpak manifest, shell scripts, PowerShell scripts, batch files, Winget PS1, READMEs in all languages, the website files, favicon source, VPS router service, package name identifiers (org.cutefame.NearsecTogether to org.cutefame.Nearcade), and the icon set. Legacy asset files and screenshots with the old name are replaced.
WiVRn/VR Streaming Groundwork
Infrastructure and preparation for VR streaming via WiVRn on Linux, though the feature is not yet functional. Adds bin/setup_wivrn.sh and bin/build_wivrn.sh for automated WiVRn server setup and building from source. New src/sidecar/wivrn-integration.js provides the lifecycle scaffolding for launching wivrn-server, monitoring its health, and clean shutdown. New documentation in src/docs/WIVRN_INTEGRATION.md and src/docs/WIVRN_PIPELINE.md outlines the intended architecture and frame extraction pipeline. The VPS Cargo.toml includes preliminary wivrn-server dependency. The host UI adds VR streaming toggle placeholders in host-custom.html, host-minimal.html, and host-playground.html with overlay labels in all locales. This feature is still in progress and not yet ready for use.
HIDMaestro Input Backend (Windows)
New Windows gamepad emulation backend using HID Maestro, complementing the existing ViGEmBus driver. Adds src/sidecar/input_backends/windows_hidmaestro.py (the Python sidecar that communicates with the HID Maestro service). Adds src/sidecar/input_backends/HmBridge/ -- a C# .NET bridge (HmBridge.csproj, Program.cs) that provides a named-pipe interface between the Electron main process and the HID Maestro WinRT API. The pre-built binary HmBridge.exe (162 KB) is included in the repo. InputOrchestrator.js now can route gamepad reports through HmBridge as an alternative to ViGEmBus, selected automatically based on backend availability.
Main Process Refactor
electron-main.js was significantly restructured (714 lines removed, modularized). App setup logic extracted into src/main/ipc.js (493 lines added) which now centralizes all IPC handler registrations. Config management moved to src/main/config.js (103 lines added). The main process startup sequence was cleaned up with better error handling and separation of concerns. The electron-preload.js received 7 new lines for additional context bridge APIs.
Cloudflare Worker Arcade System
New server-side API for arcade session management running on Cloudflare Workers. wrangler.jsonc configures the worker at nearcade.cutefame.net. The worker provides endpoints for session ping (heartbeat), stop (teardown), sessions listing, and mod operations. Pusher integration for real-time arcade status updates. Ban checking is integrated into the ping path to reject banned hosts. Session lifecycle includes host-to-session deduplication mapping, 120-second TTL with automatic cleanup, and /api/arcade/stop cleanup.
Discord Webhook Integration
Two Discord webhooks for operational monitoring. ARCADE_WEBHOOK posts rich embed notifications when an arcade session starts, including host name, game, region, player count, OS, codec, and a session thumbnail. MOD_WEBHOOK posts ban and unban alerts with the affected IP and moderator identity. Embed styling uses proper Discord embed formatting with color coding (green for active sessions/unbans, red for bans), timestamps, and avatar/username branding. Webhook URLs are stored as Cloudflare Worker secrets.
Ban Management System
IP-based ban system with CRUD API. New /api/mod endpoint protected by Bearer token authentication. Supports ban IP (with reason, stored with timestamp), unban IP, and list all banned IPs. Bans are stored in Cloudflare KV with key prefix "ban:". The dashboard UI in src/pages/dashboard.html adds a ban management section with IP input field, ban/unban buttons, and a scrollable banned-IP list with unban per entry. The mod token is configured as a Cloudflare Worker secret.
VPS Streaming with PipeWire Capture
New src/sidecar/pipewire-capture.js for Linux screen capture using PipeWire's portal interface, providing hardware-accelerated frame capture on Wayland without X11 dependency. This replaces the previous X11-based capture approach for VPS streaming scenarios. Integration with the capture pipeline is handled through CaptureManager.js (updated with PipeWire source support). Docs updated in src/docs/VPS_SETUP.md to reflect PipeWire requirements.
Android App Rebuild
The Android app (dist-android/) received a comprehensive rebuild. New lobby system added (dist-android/js/lobby.js, src/scripts/lobby.js) with full gamepad-popup flow. Host and viewer JavaScript files substantially rewritten (host.js +1073 lines, viewer.js +873 lines, server.js +578 lines). The index.html was rebuilt with 692 lines added. Localization files regenerated with complete translation sets for all 6 locales. New screenshots for the rebranded app. Documentation files added to the Android asset bundle.
Detailed Changes
Packaging and Distribution
- AppImage setup script paths fixed in src/main/ipc.js run-setup handler -- checks for asar context and uses process.resourcesPath for bin/ directory (extraResources) and app.asar.unpacked/assets/ for icons
- First-run navigation fixed in electron-main.js -- app loads /setup route directly when firstRunComplete is false instead of flashing the dashboard first
- Accent-color D-Bus error suppression in src/main/ipc.js -- stdio set to ignore/stderr pipe for dbus-send execFileSync to suppress org.freedesktop.portal.Error.NotFound spam on non-Gnome desktops
- Native gamepad asar path fix in src/main/ipc.js -- basePath.replace('app.asar', 'app.asar.unpacked') so spawn() can find read_gamepads.py
- HIDMaestro LICENSE added to package.json extraResources as src/sidecar/hidmaestro/LICENSE, bundled as HIDMaestro-LICENSE in the release
- Auto-updater metadata files (latest.yml, latest-linux.yml, latest-mac.yml) now included in the GitHub release upload glob
- All itchio artifact filenames changed to dash-delimited format (no spaces): Nearcade-Linux.AppImage, Nearcade-Windows.exe, Nearcade-Mac.dmg, Nearcade-Mac.zip
- Flatpak build directory excluded from packaged files in package.json (flatpak-build added to files exclude list)
- ViGEmBus setup binary updated (9.6 MB to 6.2 MB, newer version)
- macOS 512px icon added for proper Retina display support
- CI workflow installs WDK (Windows Driver Kit) for HmBridge builds
- GitHub Actions workflow fix: git push origin HEAD:main instead of HEAD:master
Session and Host Features
- Arcade session categories now configurable from host UI
- Viewer join/leave chat messages displayed in session
- Username blacklist for arcade sessions
- PIN toggle disabled while an arcade session is active
- Host name displayed on arcade session cards and in Discord embeds
- Session host mapping deduplication to prevent duplicate entries
- 120-second session TTL with automatic stale session cleanup
- /api/arcade/stop endpoint for graceful session teardown
- Lobby system with full viewer join flow
Input System
- InputOrchestrator.js: backend selection logic updated to support HID Maestro alongside ViGEmBus
- Gamepad popup HTML updated with access to new backends
- Experimental input backends: Architecture Concept doc updated, SteamVR driver README references updated
- Windows Python sidecar: windows_hidmaestro.py (394 lines) for HID Maestro communication
- Windows Python sidecar: windows_vigem.py updated for compatibility
- Linux input driver and audio driver updated for consistency
Localization
- All 6 locale files (en, es, fr, de, ja, pt) updated with new strings for arcade, ban management, VR streaming, and rebranded terminology
- Translation index.json updated for new content structure
- All documentation files translated into each locale
- Logo and title images regenerated for each locale with the Nearcade branding
- Automated translation script (extract-text.js) updated
Website and Worker
- _worker.js rewritten for new arcade API routes and Pusher real-time updates
- arcade.js updated with new session management UI
- nearsec-arcade.html and nearsec-home.html updated with rebranded content
- build.sh updated for new asset paths
- New no-op-worker.js and source map for fallback worker
- Cloudflare worker secrets configuration (Pusher app ID, key, secret; webhook URLs; mod token)
- Favicon replaced with Nearcade branding (370 KB to 15 KB)
Documentation
- New src/docs/VR_FRAME_EXTRACTION_DECISION.md detailing VR frame extraction approach
- New src/docs/WIVRN_INTEGRATION.md documenting WiVRn architecture
- New src/docs/WIVRN_PIPELINE.md documenting the video pipeline for VR streaming
- Updated docs across all files for rebranded application name and new features
- Removed v3_0_1_release_notes.md from source tree
Bug Fixes and Polish
- HmBridge binary rebuild with minor fixes (multiple auto-build commits)
- Itchio rename step in CI hardened against self-rename failures (safe_mv helper, errexit suppression)
- Server.js: host.js, viewer.js, server.js fixes for session management edge cases
- Host-modals.html layout fix for ban management UI
- Audio daemon and audio driver references updated
- Caddyfile and deploy.sh updated for the renamed application
- Various minor CSS and HTML updates across all host pages for consistency