CircuitBreve: a logic circuit simulator in the browser
You write a circuit in a language of its own, it compiles as you type and is drawn as a schematic. You can toggle the inputs to watch the signal propagate, get the truth table and export the result.
- Type
- Open source, team of two
- My part
- The React application. 9 of the 14 commits1 are mine; the Python image-scanning prototype was added by another contributor.
- Period
- May 2026
- Stack
- React 19, TypeScript, Vite 7, Tailwind 4
- License
- MIT
What it does
- A language of its own (HDL) with modules, gates, inputs, outputs and nested expressions.
- It compiles as you type, with a 400 ms debounce.
- It draws the schematic in SVG with zoom and drag. Click an input and the signal propagates.
- It generates the truth table for up to 10 inputs (1,024 rows)2 and extracts the Boolean expressions of the outputs.
- It exports to SVG, PNG at 3x and PDF.
Click A, B or Cin, or focus them and press Enter or Space.
1 + 1 + 0 = 10 (in binary)
| A | B | Cin | Sum | Cout |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |


How it's built
Everything happens in the browser, with no server. The code is split by stage: a compiler (lexer, parser and graph builder), a simulator, a Sugiyama-style layered layout engine and the interface components. It is about 4,500 lines of TypeScript3.
The only runtime dependencies are React, clsx, tailwind-merge and an icon package4. There are no graph or circuit libraries: the parser, the simulation and the schematic layout are project code.
Limits
- It has no automated tests and no continuous integration.
- The image-to-HDL scan is a prototype.
- The language requires every signal to be defined before it is used.
Sources for the figures
- 1
Commit authorship in CircuitBreve
git log of Albonire/CircuitBreve (public) · October 9, 2026
Fabian Gonzalez (my git user) 9, another contributor 4 (backend and a copy of the frontend) and ImgBot 1: 14 in total.
- 2
Declared capabilities of CircuitBreve
README of Albonire/CircuitBreve (public)
Truth tables for up to 10 inputs (1,024 rows) and export to SVG, PNG at 3x and PDF.
- 3
Size of the CircuitBreve code
.ts and .tsx files under src/ in Albonire/CircuitBreve (public) · October 9, 2026
4,544 lines.
- 4
Runtime dependencies of CircuitBreve
package.json of Albonire/CircuitBreve (public)
clsx, lucide-react, react, react-dom and tailwind-merge. No graph or circuit libraries.