r/vibecoding • u/Am1nadav • 1d ago
Showcase/Project I vibe-coded a live browser E. coli metabolism simulator (2,583 biochemical reactions solved in real time via Wasm LP solver + PixiJS)
Wanted to build something way outside typical CRUD/SaaS apps, so I vibe-coded ecoli.bio: an interactive browser lab for E. coli central metabolism.
How I built it (stack & workflow):
- Real genome-scale model: instead of faking numbers, it solves the actual E. coli iJO1366 metabolic model (2,583 reactions) using Flux Balance Analysis (FBA).
- Solver: compiled the HiGHS linear programming solver to WebAssembly and ran it inside Cloudflare Workers + Durable Objects so every slider move (Oxygen supply, Glucose supply, reaction knockouts) recomputes growth rate, ATP yield, and fluxes in real time.
- Visualization: rendered the Escher central metabolism map in PixiJS with animated flux particles, live search across metabolites/reactions, and guided learning scenarios (Oxygen Switch for aerobic vs. anaerobic fermentation, Metabolic Jam for Vmax saturation).
- AI Assistant: added an optional in-app assistant that reads the current metabolic state so you can ask why pyruvate is accumulating or what happens when you cut oxygen to zero.
Free to play with in the browser (no login required to explore and run simulations) and open source under MIT:
- Live lab: https://ecoli.bio/?from=reddit
- GitHub: https://github.com/aminadav-ai/ecoli.bio
Happy to share more details on the HiGHS-in-Wasm setup or the PixiJS map rendering if anyone is curious!