Logigate
Our own prototype: a logic-circuit editor and simulator in the browser. It starts with a single NAND gate, and every circuit drawn with it becomes a part for a bigger one, up to a CPU. We built it in October 2026, in twelve days.
Challenge
The goal was to start from the smallest part there is and build up to a computer, in a browser tab. That sets hard requirements. The simulation has to run live while someone draws, through components nested inside components, and a loop that never settles must not freeze the tab. The work has to be safe: it must survive a reload, a second computer and a power cut at any moment, and nobody should have to sign up before drawing the first gate. By the fourth day we were designing with the editor ourselves, so every change after that had to keep old saves working. And a leaderboard ranked by fewest transistors is only worth something if nobody can post an invented score.
What we built
NAND is the only gate built in, and any circuit can become a component inside a bigger one. Transistors are counted as four per CMOS NAND at every depth, so scores compare across circuits. Nothing is shortcut: a finished part never gets a faster built-in version, so the CPU in the public library is 4,066 NAND gates for the simulator to run.
We do not simulate the drawing. Every structural edit compiles the open circuit, components included, into a flat list of NAND gates over numbered nets: union-find merges pins and component boundaries away, and the netlist sits in typed arrays. The simulator is event-driven: a net that changes queues only the gates that read it. Gate outputs are keyed by their path through the components, so what latches and flip-flops hold survives the recompile. That lets us recompile on every edit instead of patching the netlist in place.
Simulation time is separate from frame time. One frame advances a clock by at most 100 ms and toggles it at most 16 times, or for at most 10 ms at the Max speed, so a tab that comes back from the background does not replay minutes of ticks. Every settle stops after 300,000 gate evaluations. A circuit that stays unsettled for more than 30 frames in a row shows Oscillating in the top bar, and the tab stays usable.
The engine is plain TypeScript without a Vue import, and the server runs the same code. For a submitted puzzle solution it runs the checks and counts the transistors itself, within 200,000 gate evaluations per step and 20,000,000 per solution. No score is taken from the browser on trust.
No account is needed to start: each project has its own key in localStorage and is saved 300 ms after the last change, and when the browser refuses a save, the app asks for an export. A free account syncs projects between computers over plain HTTP. We left out a database so it would not take memory on the server. Accounts, share links and the library are JSON files, each written to a temporary file, forced to disk with fsync and renamed into place, with the last intact version kept as .bak. A power cut leaves either the old file or the new one. Savegames and a daily compressed backup come on top. They sit on the same disk as the data, so they protect against damaged files and mistakes, not against losing the disk.
Old saves are a contract. On 20 October, three days after the first commit, we froze a project and both browser-storage layouts written by the first day's release as test fixtures. A test checks that they still load and give the same truth tables, NAND counts and delays. Every new field is optional and has a default.
One oscillation looked like a simulator bug and was not. In one of our own CPU projects, an OR gate had its output wired back into one of its inputs. Every gate has the same delay, so a short glitch kept circling in that loop, where a real chip would settle. Replayed, the project oscillated in 8 of 8 runs as saved and in none of 1,600 random sequences with that wire moved. The app still has no check for an output wired back into its own gate, and the status tooltip only says that a loop keeps flipping.
Sync took two corrections. The first design kept a conflicting version as a second project marked '(other device)'. Two days later we changed it to one save per project everywhere: the newer one wins, the other becomes a savegame. Then the first version of saved circuit memory let a computer still running old bits write them over a newer save from another computer. We fixed that the same day: an incoming project now runs from its own bits, and tests drive the editor in a stand-in browser against an account server.
Stack
Nuxt 4 with Vue 3 and TypeScript, rendered only in the browser, Tailwind CSS 4, fonts and icons self-hosted through Nuxt Fonts and Nuxt Icon, Vitest for the tests and Web Audio for the sounds, so there are no sound files. Nitro server routes handle accounts (scrypt password hashes, an httpOnly session cookie), share links, the library and puzzles. For share links and library entries the server keeps only a SHA-256 hash of the edit key. No database, no tracking and no WebSocket: nothing in the simulation needs the server, so plain HTTP is enough. An open tab checks for a new release every 60 seconds. Logigate runs in Docker behind Traefik on our servers at Hetzner in Germany.
Result
Logigate is live at logicate.blax.at. It is our own prototype, not a finished product, and we use it ourselves. Its last release went live on 28 October 2026, and the code has 400 automated tests. The public library holds one part so far: a CPU of 4,066 NAND gates and 16,264 transistors that uses 27 components.
If you are building an interactive editor or a simulation in the browser, this carries over. Keep the engine free of the UI framework, so the server can run the same code instead of trusting the browser. Simulate a flat structure compiled from the drawing, and carry state across recompiles by stable keys. Give every frame and every settle a hard budget. Find out where your model differs from reality and make the app say so, or users will suspect a bug. Treat saved files as a contract from the first week. And check whether you need a database at all.
More case studies
All case studies
Want something like this for your business?
Tell us what you need. We will get back to you within one business day.

You talk to Fabian Wagner, founder
No sales desk in between: he reads every enquiry himself.
Prefer a call? +•• ••• ••• •• ••


