Skip to content

sbay-dev/MagicMirror

Repository files navigation

Magic Mirror - المرآة السحرية

Magic Mirror is a Windows-first transparent overlay that turns any visible document or application into a translated reader surface. Place the glass over a window, translate the text behind it, and read the result in the target language while preserving document structure, typography, and reading direction.

Download latest release · Installation · Cloudflare gateway · User guide · Architecture · Specifications

What it does

  • Transparent always-on-top MAUI overlay for Windows.
  • Captures text behind the overlay while excluding the mirror itself from capture.
  • Reads exposed window text through UI Automation when available.
  • Falls back to OCR through Tesseract or Windows.Media.Ocr.
  • Translates through a deployed Sarmad / Cloudflare @cf/openai/gpt-oss-20b gateway and never silently mixes MT into a Sarmad result.
  • Provides native text-control reading surfaces: transparent mirror editor, detachable reader window, selection, copy, and right-click dictionary actions.
  • Renders Arabic-first document output with robust RTL/LTR handling for acronyms and scientific terms such as CNS, LCNS, and QKV.
  • Links selected translation text back to the measured OCR/source block and exposes a separate technical proof tab for local Merkle/OCR provenance.
  • Provides reader-page mode, configurable background/ink colors, copy actions, scrolling, live preview, and direct click-to-select dictionary analysis.

Quick start from release

  1. Download MagicMirror-v1.0.5-windows-x64.zip from https://github.com/sbay-dev/MagicMirror/releases/latest.
  2. Extract the ZIP.
  3. Run MagicMirror.Native.exe.
  4. Open the overlay, place it over text, and press ترجم.

See docs/INSTALLATION.md for requirements and OCR/AI configuration.

Build from source

Requirements:

  • Windows 10 1809 or newer.
  • .NET SDK 10.0.300 or newer compatible SDK.
  • .NET MAUI workload for Windows.
  • Cepha / NetWasmMvc.SDK package source configured.
git clone https://github.com/sbay-dev/MagicMirror.git
cd MagicMirror
.\scripts\verify.ps1

Run the native app:

dotnet run --project .\MagicMirror.Native\MagicMirror.Native.csproj `
  -f net10.0-windows10.0.19041.0

Create a release ZIP:

.\scripts\package-windows.ps1 -Version 1.0.5

Repository layout

MagicMirror/          Cepha / NetWasmMvc.SDK web layer and AI gateway contract
MagicMirror.Native/   MAUI native host, capture, OCR, translation, overlay UI
docs/                 Installation, architecture, release process, specs
scripts/              Verification and packaging scripts

Privacy and security

Magic Mirror captures only the overlay rectangle selected by the user. AI translation requests are sent to the configured Sarmad gateway. Free MT fallback is never executed by default; if Sarmad cannot provide a usable translation, the user must explicitly choose the MT option for that run because it sends text to Google gtx / MyMemory. Keep MT disabled for sensitive documents. See SECURITY.md.

License

MIT for repository source code. Third-party components retain their own licenses; see THIRD_PARTY_NOTICES.md.

About

Transparent AI translation mirror overlay built with Cepha, WasmMvcRuntime, and .NET MAUI

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors