theophilusjohn.com

Theophilus
John

Builds systems that have to agree with each other.

Work — 04

#enrg-0001/042026 · Sole engineer

Inference
in the browser

Browser-native LLM inference engine in WGSL compute shaders. Zero server cost.

43.1
tok/s at 2048 ctx
334.9 MiB
weights resident
5.63x
compression
0
server cost

Enargeia runs Qwen2.5-0.5B-Instruct entirely in the browser. The visitor’s GPU does the inference, so serving it costs nothing beyond static files — no server, no API key, no per-token cost. Every kernel is WGSL running on WebGPU. Generating a token is one pass up through the model’s layers, dispatched in order, and every one of those dispatches runs on the machine in front of you.

The model is quantized to int4, except the tied embedding and LM head which ship at int8 — 334.9 MiB resident against 1884.6 at fp32, for 13.5% worse perplexity. Decode runs at 45.5 tokens/second at 512 context and 43.1 at 2048, flat across context length. Time to first token is 219 ms on a short prompt. Cold load over the CDN is 14.6 seconds; warm is 1.4.

Measured on an Apple M2 with a 10-core GPU, headless and with nothing else on the GPU; a foreground tab shares it with the compositor and measures lower.

#hmna-0002/042026 · Sole engineer

Raft, made
visible

Raft consensus implemented from the paper and made visible in the browser.

15M
ticks fuzzed
0
invariant violations
128
tests
5
node cluster

Homonoia is an implementation of the Raft consensus algorithm, written from the paper and made visible in the browser. Five simulated nodes on a controllable network — you set latency, drop rate, duplication, partitions, and kill or revive nodes, then watch leader elections and log replication behave correctly under whatever you do to them. An election runs the same four beats every time: the leader stops being heard from, a follower’s timeout fires and it stands as a candidate, three votes out of five settle the term, and replication resumes from whoever won it.

The consensus core is pure: state in, state out, no I/O and no timers. The same code runs the visualization and the fuzz harness, so what you see on screen is the thing that was verified rather than a diagram of it. A 5,000-seed sweep covers 15M ticks, 41,879 leader changes, 447,766 entries committed and 9,974,273 messages sent, with no invariant violations.

Deleting a safety rule to check the tests catch it produced the more interesting result. With Raft’s commitment restriction removed, 5,000 seeds of random fuzzing found nothing — but a hand-written scenario fails at tick 1529. That class of bug isn’t reachable by fuzzing at all; you have to already know it exists and construct it.

TypeScript, React, 2D canvas. 128 tests.

#phli-0003/042026 · Sole engineer

Editing without
locks

Real-time collaborative editor where concurrent edits converge without a lock.

10-12ms
keydown to glyph
10
clients converging
343ms
cold document open

Philoi is a collaborative document editor. Several people edit the same document at once, see each other’s cursors, and leave comments anchored to the text — plus sharing with roles, version history, search, folders and export.

Concurrent edits converge without locking and without a server deciding who wins. Edits are CRDTs, so two people typing in the same paragraph both end up with the same document and nobody’s keystrokes are discarded. Convergence is tested at 10 simultaneous clients.

Measured on a production build: 10–12ms from keydown to glyph, ~343ms to open a document cold and ~327ms warm, 164–175ms from search to results. Documents soft-warn at ~1MB and are refused at ~10MB.

Next.js 15 and TipTap on the front, Yjs and Hocuspocus for sync, Postgres via Prisma, NextAuth with Argon2id, and Cloudflare R2 for storage. Running on a DigitalOcean droplet behind Caddy at philoi.net.

#bass-0004/042025 · Sole engineer

Boilerplate, shipped

TypeScript SaaS boilerplate, shipped to a live deployment with validated billing.

Basis is a full-stack SaaS starter — the parts every product needs and nobody wants to build again. Clone it and you have working auth, billing and email rather than an empty repository.

Auth is email and password with JWT access tokens and rotating refresh tokens stored httpOnly and hashed at rest, including reuse detection and family revocation. Billing is Stripe, covering subscriptions and one-time purchases, the Customer Portal, and pricing read live from Stripe rather than hardcoded. Transactional email runs through Resend, with optional S3 uploads and an admin panel for users and roles.

Node, Express and TypeScript on Postgres via Prisma; React, Vite and Tailwind on the front. Helmet, CORS, rate limiting and Zod validation throughout. Dockerized, single origin, migrations applied on deploy, and running on Railway.

About

I'm a computer science master's student at the University of Houston–Clear Lake, where I also administer the lab environment — a mixed Ubuntu and Windows Server estate used by students and faculty. Before that I spent three years at Tata Consultancy Services as a systems engineer, working on TCS BaNCS, a core banking platform.

Most of what I build ends up being about the same problem: getting separate things to agree. Raft is that problem stated formally. CRDTs are that problem without a referee. Migrating a directory service is that problem with a deadline and real users. Running inference in a browser is the one exception, and it's there because I wanted to know whether the arithmetic would fit.

I'm interested in systems and infrastructure work — the layer where the guarantees are made rather than assumed.

Based in Houston. Resume · GitHub · theophilusjohn@gmail.com

theophilusjohn.com

0%starting