ferment.js
Simulating the art of fermentation.
Solving microbial metabolism and population ecology mathematically.
A browser-native biochemical simulation engine.
Loving the slow, unhurried ripening process —
without rushing to conclusions.
Kamos embraces "fermentative thinking" — cherishing the deliberate, unhurried deepening of thought rather than optimizing solely for immediate speed.
This is far more than a poetic metaphor. It is rooted in deep reverence for natural fermentation: where microscopic life dialogues with matter, communities of organisms collaborate and compete, and rich aromas and flavors unfold across time.
We built a mathematical, browser-native biochemical engine to simulate this real-world phenomenon faithfully. That engine is ferment.js.
Three Core Computation Engines
Far beyond superficial animation — rigorous algorithms in biochemistry, mathematical ecology, and chemoinformatics work in seamless harmony.
Flux Balance Analysis
Metabolic Stoichiometry (FBA)
Under intracellular stoichiometric constraints (S cdot v = 0), sugar catabolism into ethanol and organic acids is solved using Linear Programming (Two-Phase Simplex). Mass conservation is strictly preserved at the molecular level.
Generalized Lotka-Volterra
Community Ecology (gLV)
Koji enzyme secretion, yeast proliferation, and lactic acid bacterial barriers. Multi-species symbiosis and competitive exclusion are numerically integrated using 4th-order Runge-Kutta (RK4).
Chemoinformatics
Sensory Mapping & OAV
Synthesized aroma compounds (ethyl caproate, isoamyl acetate) and organic acids are projected against human sensory thresholds (OAV) into perceptual coordinates: "Green Apple", "Umami", and "Crispness".
Inspecting 21 Days of Ripening
Adjust the timeline to see all three engines recalculate in real time, shifting broth clarity, color, and sensory notes.
Rice and brewing water have blended. Koji enzymes begin breaking down starches into glucose.
Glucose consumption ➔ Ethanol production flux: 14.2 mmol/gDW/h
Yeast share: 78% | Lactic barrier (pH 3.4)
Ethyl caproate 0.85ppm (4.2x sensory threshold) ➔ Green apple notes
"Sweet unfermented rice juice. Anticipating yeast activation in coming days."
Scripting Fermentation
// Define vessel, substrate, and microbial strains to execute fermentation
const vessel = new FERMENT.Bioreactor({ material: 'Cedar' });
vessel.setSubstrate(new FERMENT.Substrate({ type: 'RiceMash' }));
vessel.add(new FERMENT.SaccharomycesCerevisiae());
const solver = new FERMENT.MetabolicSolver();
const assay = new FERMENT.Assay();
solver.step(vessel, 24); // 24-hour fermentation step
const observation = assay.read(vessel); // Assay & Sensory Evaluation
console.log(observation.metrics.abv); // Alcohol by Volume
console.log(observation.sensory.tastingNote); // Sensory Profile
ferment.js
Bringing microbial metabolism and the passage of ripening time to your web environment.