Case study

Desktop apps

A security toolkit for Electron apps, published on npm, and two complete Windows apps: an AI code editor and a video editor that cuts gameplay to music.

The problem

Electron lets you ship a desktop app with web technology, but its defaults leave a lot open: pages that can navigate anywhere, IPC that any script can call, and permissions nobody asked for. Fixing that window by window is easy to get wrong.

A desktop app also has to stay responsive on an ordinary PC while it does heavy work, like scanning hours of video or running an AI agent.

Project 01

electron-hardening

Secure-by-default building blocks for Electron apps, plus a static audit that finds what is already wrong.

  • MIT licensed, published on npm
  • Zero dependencies
  • 119 unit tests, 34 checks inside real Electron
The electron-hardening audit command reporting findings on a deliberately vulnerable Electron app
The audit CLI on a deliberately vulnerable Electron app.

What I built

  • One call locks down navigation, popups, <webview>, permissions and the Content-Security-Policy for every window and session the app creates, including ones created before the call.
  • An IPC router that checks who is calling and what they sent. Other origins, subframes, invalid arguments and rate-limit overruns are rejected before your handler runs.
  • A preload bridge that never hands the page ipcRenderer.
  • A static audit CLI with SARIF output: npx electron-hardening audit, no install needed.
  • Performance helpers for startup and high-frequency IPC, including a “show when ready” helper so windows never flash white or get stuck invisible.

The hard parts

Tested in real Electron, not just mocks

The end-to-end suite launches Electron 45 and attacks a hardened app from inside sandboxed renderers. It runs 34 checks on Windows, macOS and Linux in CI.

Security that costs almost nothing

An origin check costs about 0.1–0.3 µs. A guarded IPC call adds about 0.8 µs over a bare ipcMain.handle. Batched IPC cuts serialization about 40x for chatty channels.

Origin rules that resist tricks

Subdomain wildcards don’t match lookalikes, file URL rules resist ../ and encoded slashes, and URLs with embedded credentials never match. A malformed rule throws at startup instead of silently trusting nothing.

Project 02

Orbit IDE

An AI chat app and a full code editor in one Windows app. Point it at a project and its agent reads the code, fixes bugs, asks before each edit and runs the tests.

  • About 19,000 lines of TypeScript, React and CSS
  • Installs and runs on Windows 11
Orbit's agent finding and fixing two bugs in a practice project, then running the tests
A real run, sped up 12×. A free AI model running on a local PC (Qwen3 8B) finds two bugs in a small practice project, asks before each edit, then runs the tests.

A complete Windows app of about 19,000 lines: an editor with git, a real terminal and an AI agent, with API keys encrypted by Windows.

Read the full Orbit IDE write-up

Project 03

ClipForge AI

A Windows app that turns hours of gameplay into a finished kill montage, cut to the beat.

  • About 4,900 lines of JavaScript
  • 75 automated tests, all passing
Clip from a gameplay montage ClipForge made
Part of a montage ClipForge made from real Black Ops clips, cut down, without sound, and with other players’ names blurred.

What I built

  • It listens instead of watching. It goes through the sound 16 thousandths of a second at a time, picks out gunshots by comparing them with that recording’s own background noise, and throws out musical sounds such as menu clicks.
  • An optional AI check: the best 20 to 30 moments are cut into one short, numbered video and sent to Google’s Gemini in a single request, which says which are really your kills.
  • It reads each song’s tempo, beats, bars and drop, picks a track from your own folder or free Creative Commons music, and saves the credits next to the video.
  • Every cut lands on a beat and the best play goes last. If there aren’t enough good moments, you get a shorter video instead of filler.
  • It renders 1080p at 60 fps on the graphics card when it can, with zooms, slow motion, game sound evened out between recordings, final volume at −14 LUFS, and wide, vertical and square versions.

The hard parts

Telling a kill from a death

Sound alone can’t. The Gemini check marks which moments are really your kills, and each time is snapped to the nearest real gunshot. If the free limit runs out, ClipForge says so and carries on with what it found by itself.

Analysis written from scratch

The sound and beat analysis was written for this project, not taken from a library. Part of it is published as clipforge-audio on npm: gunshot detection against each recording’s own noise floor, beat and drop tracking, and a single-pass FFmpeg renderer for beat-synced edits.

Changes without rescanning

After the first cut you can reorder clips, swap one for the next best moment, or try another song. ClipForge remembers its analysis, so it doesn’t scan hours of footage again.

Testing

The tests make their own footage and music. They place gunshots at known times and build songs with a known tempo and drop, then check that ClipForge finds them. They also render real videos from start to finish.

Where it stands

Everything except the optional Gemini check runs on your own PC. It needs recordings with game sound. The app code is private; the showcase repo has the full write-up.

ClipForge AI screenshots

Need something like this?

If you need something like electron-hardening, Orbit IDE and ClipForge AI, tell me what you’re trying to build. I’ll reply with questions, then a scope and a price.

Get in touch