Skip to content

bilbospocketses/control-menu

Repository files navigation

Control Menu

Control Menu

A web-based tool for managing Android devices, CCTV cameras, Jellyfin media server, and system utilities from one place.

.NET 10 Blazor Server SQLite


What It Does

Control Menu replaces a collection of PowerShell scripts with a cross-platform web UI. It manages:

  • Android Devices — Connect, reboot, toggle power/screensaver, manage ADB settings, and screen mirror Google TVs and Android phones via ws-scrcpy-web. mDNS-based network discovery with one-click Add for unregistered devices and auto-classification (phone / tablet / TV / watch) via an ADB shell probe.
  • Android Power Tools — ws-scrcpy-web's full home page embedded in an iframe at /android-power-tools. Direct access to the power-user workflows not duplicated in the Devices module: shell (xterm), file browser, stream configuration, network scan + manual-add, and dependency updater. Theme syncs bidirectionally with the iframe via postMessage (requires ws-scrcpy-web v0.1.24-beta.5+).
  • Cameras — View LTS/Hikvision CCTV cameras via go2rtc RTSP-to-browser streaming. Configurable camera count with encrypted credential storage. go2rtc is auto-installed and updated via the dependency manager.
  • Jellyfin Media Server — Database date updates, cast & crew image refresh (background worker with resume support), Docker container management, automated backups with configurable retention
  • Imaging Tools — Six image utilities backed by bundled ImageMagick, vtracer, and potrace plus the in-process Svg.Skia NuGet: Icon Converter (image → multi-size .ico), Format Converter (PNG/JPG/WEBP/AVIF/TIFF/BMP/GIF), Image Resize (pixel / percentage / max-fit), SVG Rasterize (SVG → PNG/ICO via Svg.Skia, in-process), Magic Wand (click-to-remove background with a live SkiaSharp preview and an authoritative ImageMagick render), and Tracing (raster → SVG: color via vtracer, monochrome via potrace).
  • Utilities — Windows Zone.Identifier file unblocker
  • Dependency Management — Auto-installs and updates ADB, sqlite3, go2rtc, ImageMagick, vtracer, and potrace to a self-contained dependencies/ folder. Configurable install paths per tool. Version checks via GitHub API and direct URL scraping. Every download is integrity-verified before it is extracted or run (pinned SHA-256 → upstream checksum → Authenticode, falling back to an explicit confirmation prompt for unsigned assets). Services are automatically stopped before binary updates and restarted after. Docker and ws-scrcpy-web are externally managed (configured in Settings → General).

Features

  • Modular architectureIToolModule interface with auto-discovery via reflection
  • First-run wizard — 7 steps: Welcome, Android Devices, Cameras, Jellyfin, Email, Dependencies, Done
  • Dark/light theme — OAO grey palette with two-state toggle
  • Cross-platformCommandExecutor strategy pattern abstracts Windows vs Linux commands
  • Encrypted secrets — ASP.NET Data Protection API for API keys and passwords
  • Background jobs — Long-running tasks with progress tracking, cancellation, and resume
  • Self-contained dependencies — Bundled tools folder resolved through an IDependencyPathResolver boundary (no system PATH resolution for bundled binaries); install/update buttons in UI; services auto-stop/restart during updates
  • Email notifications — Configurable SMTP with dedicated From address for provider authorization
  • File System Access API — Native OS file picker + save dialog for the Imaging Tools in Chrome/Edge

Quick Start

Install (Windows, end users)

Download the latest ControlMenu-*.msi from the Releases page and run it. It installs per-machine to C:\Program Files\ControlMenu\, manages its own runtime dependencies, and updates in place via Settings → General → Check for updates. The steps below are for running from source.

Prerequisites

Run

cd src/ControlMenu
dotnet run

Open http://localhost:5159 in your browser. The first-run wizard will guide you through setup.

Test

dotnet test

508 tests covering services, modules, the launcher, and integrations (across ControlMenu.Tests, ControlMenu.Common.Tests, and ControlMenuLauncher.Tests).

Architecture

src/ControlMenu/
  Components/           # Blazor pages and layouts
    Layout/             #   MainLayout, Sidebar, TopBar
    Pages/              #   Home, Settings, Setup Wizard
    Shared/             #   ScrcpyMirror component
  Data/                 # EF Core entities, enums, migrations
  Modules/              # Pluggable tool modules
    AndroidDevices/     #   ADB service, Google TV & Android Phone dashboards
    AndroidPowerTools/  #   ws-scrcpy-web home page iframe (shell, files, configure)
    Cameras/            #   CCTV camera streaming via go2rtc
    Jellyfin/           #   Docker ops, DB updates, Cast/Crew worker
    Imaging/            #   6 image tools (magick, Svg.Skia, vtracer, potrace)
    Utilities/          #   File unblocker
  Services/             # Core services (config, secrets, jobs, dependencies, email)
  wwwroot/              # Static assets, CSS, theme, JS interop
tests/ControlMenu.Tests/

Key Design Decisions

Decision Rationale
Blazor Server (not WASM) Needs direct access to ADB, Docker, filesystem
IDbContextFactory Prevents stale EF change tracker in long-lived Blazor circuits
IServiceScopeFactory for background work Workers outlive the Blazor circuit that started them
SQLite Single-file DB, no external database server needed
SkiaSharp for images Cross-platform replacement for System.Drawing.Common
ws-scrcpy-web via iframe Screen mirroring without native scrcpy binary dependency
File System Access API Native OS file dialogs for the Imaging Tools (Chrome/Edge)
Self-contained dependencies 6 auto-managed tools in dependencies/; 2 external (Docker, ws-scrcpy-web)

Dependencies

Control Menu manages two types of dependencies:

Auto-installable (downloaded to dependencies/ folder, pre-seeded into the MSI):

Tool Source Purpose
ADB Google (DirectUrl) Android device management
sqlite3 sqlite.org (DirectUrl) Jellyfin database operations
go2rtc GitHub (AlexxIT/go2rtc) RTSP-to-browser camera streaming
ImageMagick (magick) GitHub (ImageMagick/ImageMagick) Imaging Tools — format/resize/ICO/background-removal (portable Q8 x64, hardened policy.xml)
vtracer GitHub (visioncortex/vtracer) Imaging Tools — color raster → SVG tracing
potrace SourceForge (DirectUrl) Imaging Tools — monochrome raster → SVG tracing

External (installed separately):

Tool Purpose
Docker Jellyfin container management
ws-scrcpy-web Browser-based screen mirroring

Install paths are configurable per-tool in Settings > Dependencies.

Module System

Modules implement IToolModule and are discovered at startup:

public interface IToolModule
{
    string Id { get; }
    string DisplayName { get; }
    string Icon { get; }
    int SortOrder { get; }
    IEnumerable<ModuleDependency> Dependencies { get; }
    IEnumerable<ConfigRequirement> ConfigRequirements { get; }
    IEnumerable<NavEntry> GetNavEntries();
    IEnumerable<BackgroundJobDefinition> GetBackgroundJobs();
}

Modules must have parameterless constructors for auto-discovery.

License

GPL-3.0-only. See LICENSE for full terms. By contributing you agree your contributions are licensed under the same terms — see CONTRIBUTING.md for details.

Security

For vulnerability reports, see SECURITY.md. Do not open public issues for security problems.

About

A web-based tool for managing Android devices, CCTV cameras, Jellyfin media server, and system utilities from one place.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages