KHANH NGUYENENGINEERING · AI · PRODUCTS
EN

Lab

What I’m working on

Prototypes and open questions. Most of these will change shape, and some will be dropped. Each entry states the question, the stage it’s honestly at, and what I’ve learned so far, including the negative results.

Home Surveillance Hub

Prototype · Sep 2026

Can one PC give a single live view, PTZ control and remote access across consumer cameras from half a dozen brands, without any vendor cloud in the loop?

go2rtc does the streaming; a Fastify service on top owns camera configuration and generates go2rtc’s config itself. One brand requires a cloud login and sends H.265, so the hub transcodes to H.264. ONVIF handles discovery and PTZ, with compensation for camera clocks that drift. Remote viewing goes through Tailscale, so no ports are opened, even behind carrier-grade NAT.

Finding: go2rtc’s PUT /api/streams only changes in-memory state, so the hub has to be the source of truth and regenerate the config file. 46 unit tests and a 19-step end-to-end smoke test pass against real go2rtc; the next step is testing with the physical cameras.

Node · Fastify 5 · SQLite/Drizzle · go2rtc · ffmpeg · React 19 PWA · Tailscale

Live2D from a single image

Alpha · Sep 2026

Live2D models need a proprietary format that only one editor can produce. Can a fully automated pipeline build its own deformable model from one illustration instead?

The pipeline segments the image into named layers with an AI model, inpaints what’s hidden behind them, then builds meshes, 2D bones, parameters, physics and motion. The output is a new .puppet format (JSON plus a PNG atlas) played by its own runtime of about 24 kB with no dependencies.

Findings: rig sizes must be measured in head-widths, not canvas pixels, or motion amplitude depends on how the image was framed. Unclaimed pixels go to the nearest layer rather than the most common neighbour; otherwise long hair produces a ghost duplicate. A bend profile must average to zero, or it moves the layer instead of bending it.

Electron · TypeScript · WebGL · Gemini API · 385 tests

Translate once per room

Design · spike

Live meeting translation is usually priced per listener. Can the cost scale with minutes spoken × target languages instead?

A hidden translator bot joins a self-hosted LiveKit room, mixes all speakers into one stream, and runs one Gemini Live session per active target language. It publishes one translated audio track and subtitles per language that every listener shares. It builds on the core of my Live Translate app.

Estimate: about $1.60 for a 60-minute meeting with two target languages, whether 2 people listen or 15. A per-room cost cap defaults to $5.

LiveKit · @livekit/rtc-node · Fastify · Gemini Live · React 19

Editing Live2D models without the editor

Alpha · Sep 2026

Can existing Live2D models (expressions, outfits, motion, physics) be edited reliably in a GUI, and exported in the standard format, without the official editor?

Hard cases include models with no part hierarchy, which are grouped by mesh count instead, and outfit toggles detected automatically by measuring how many meshes appear or disappear as a parameter moves from 0 to 1. Every id in the output is validated against the real model before export.

Finding: the motion engine matches the official implementation to within 1e-4 over 500+ points per motion, and round-trips are lossless. Known debt: one end-to-end test is flaky about 1 run in 8.

Electron · Cubism Web Framework · WebGL2 · TypeScript · 168 tests · source

Sharing RAM over the network

Feasibility · Jun 2026

Can a weak laptop borrow memory and disk from larger Linux machines on the same LAN?

The answer for RAM is no. LAN round-trips are 1,000 to 10,000 times slower than memory, and gigabit Ethernet has about a three-hundredth of the bandwidth; even 10 GbE with RDMA stays 20 to 100 times slower than local RAM.

Redirection: move compute to the data instead. Pool disks into one drive letter, run jobs remotely, and stream GUIs. The next step is a real network benchmark before writing any code.

Planned: Go agent · ConnectRPC over mTLS · rclone + WinFsp · Docker

Last Ember

Prototype · Oct 2026

How do you playtest a game loop when you’re the only tester?

A small portrait-mode survival game in Godot 4: keep a fire alive, gather, and build a camp. The interesting part is the harness: an autopilot bot plays headless and checks a list of 15 features each run.

Finding: the autopilot plays eight in-game days in about a minute, which turns “does the loop still work?” into a command instead of an afternoon.

Godot 4.4 · GDScript · WebGL2 · CC0 assets

Working on a hard problem?

I’m happy to talk about retrieval, backend architecture, developer tools, or anything on this site.