Code

Software I've built and maintain, all of it written with AI coding agents (agentic coding). The libraries are listed first, and everything else is on GitHub.

Open source libraries

Libraries I've published to npm and PyPI, all of them MIT licensed so feel free to use them.

strata-react

A React and Tailwind framework for building app screens such as dashboards, tables and forms.

A dashboard for a pottery studio's kiln room: three readings, a firing chart and a table of members' work
The kiln-room screen from strata-react's Storybook, a made-up pottery studio its components are tested in.

The main idea is that loading, empty and error states are required by the types, so you can't forget to handle them. Accessibility (keyboard use, focus and screen readers) comes from React Aria.

Only the theme's own colours and sizes exist, so apps built with it stay consistent. The design rules are based on research I wrote up, which is public.

This website is built with it.

Built with: React 19, TypeScript, React Aria, Tailwind v4, TanStack Query and Table, Vite. Unit tests written the way a person uses the screen (Testing Library and MSW, no mocked modules), every component in Storybook in every state, over 1,100 screenshots compared in light and dark on every change, and an API reference for every export.

Source · npm · Components · Research

strata-python

strata-python is the shared server code for my Python apps, so each app doesn't have to carry its own copy.

A short Python file using strata-python beside a terminal running its doctor, health and settings commands
A small app on strata-python: its doctor command finding a missing module, and the health and settings routes it gets without writing them.

It covers settings, a FastAPI server with the standard health and system routes, and command-line tools. There's also support for background jobs with retries, and for pipelines that only redo the steps that have changed.

It pairs with strata-react, so the Python server and the React screens fit together.

Built with: Python 3.11+, FastAPI, pydantic, SQLAlchemy and Alembic (optional). Type-checked with pyright and ty, linted with ruff, and tested with pytest in random order and in parallel, with coverage; published to PyPI.

Source · PyPI

image-stitch

image-stitch joins lots of images together into one big image, in Node or in the browser.

Twelve mountain and coast photos in a four-by-three grid
Twelve of my race photos joined into one image by image-stitch.

Browsers limit how big a canvas can be and tend to run out of memory with very large images, so rather than drawing everything at once it streams the output a strip at a time.

It can lay the images out as a grid, in rows, as a masonry layout, or placed freely wherever you want them.

For JPEG output it uses my own WebAssembly build of a Rust JPEG encoder.

Built with: TypeScript, Rust compiled to WebAssembly, Node and browser. Ships ESM, CommonJS, a browser bundle and a Deno entry, each typed and source-mapped, with a live demo.

Source · npm · Demo

leaflet-node

leaflet-node runs the Leaflet map library in Node.js, without needing a browser.

A map of the Aosta Valley with the Tor des Géants loop drawn on it
The Tor des Géants route, drawn by leaflet-node in Node with no browser. Map © OpenStreetMap contributors.

This means the same map code can draw a PNG on a server, or be run as part of a test. Existing Leaflet code works unchanged, so there's nothing to rewrite to use it.

I use it myself to test the route map in strata-react.

Built with: TypeScript, jsdom, native canvas (@napi-rs/canvas). CI on every push, and an examples page that draws each map in the browser and from Node side by side.

Source · npm · Examples

rom-scout

rom-scout is for identifying retro game files and playing them in the browser.

Sonic the Hedgehog running through Green Hill Zone
Sonic the Hedgehog for the Master System, identified and playing in rom-scout's demo player.

Give it a ROM file and it works out which game it is from the file's hash. It then looks up the title, the platform and the box art for that game.

It can also play the game in the browser using an emulator, and any saves are kept in the browser. It works in Node and the browser.

Built with: TypeScript, Web Crypto, EmulatorJS. Ships ESM, CommonJS and browser bundles with full type definitions, with a live demo.

Source · npm · Demo

Projects

Bigger pieces of work, each with its own site showing what I tried and what I measured.

strata-stills

strata-stills develops my RAW photos automatically.

A park fountain split down the middle: cool and flat on the left, warm evening greens on the right
One of my photos developed neutrally (left) and with the learned look (right), in the swipe comparison on strata-stills' site.

It learns how I like photos to look from my past Lightroom edits, about 21,000 of them. I tested it on shoots it had never seen, and it roughly halves the error compared with a neutral develop.

The project's site shows what didn't work as well as what did.

Built with: Python, PyTorch (CUDA, Apple silicon or CPU), rawpy (LibRaw) and OpenCV, XGBoost, strata-python and strata-react. Unit, integration and database tests in CI with coverage gates, typed with pyright and ty; the GPU code is tested against the CPU code it must match. Every claim on the site links to the experiment log it comes from.

Source · Site and experiments

Fun

Projects I build for fun, mostly because I want to see whether they'll actually work.

quake2ts

Quake 2 ported to TypeScript, built using AI coding agents.

A first-person view of a dim Quake 2 warehouse with crates, a pillar and a guard in the distance
A frame of the demo's recorded playthrough, drawn by quake2ts.

It's a real reimplementation rather than the original C compiled to run in the browser. I ported it a piece at a time from id Software's source: file formats, physics, monsters, networking, and renderers for both WebGL and WebGPU. Each piece is tested against the original C code.

You can play the first level on this page. The quake2ts site also has interactive labs that take each part apart.

Built with: TypeScript, WebGL 2 and WebGPU, strata-react for the site. Differential tests against id's C, unit, integration and browser tests, and visual tests of both renderers, all in CI.

Source · Site and labs · Play