Interactive React + TypeScript app that visualizes what happens in a computer system when the user presses Enter.
The current UI is the original MVP view:
- 2D system flow board (SVG)
- Node-by-node activation
- Animated edge signal flow
- Simulated operations counter
- Tooltip explanations for each system node
- React 18
- TypeScript
- Vite
- SVG rendering (2D)
npm install
npm run devOpen the local URL shown in terminal (usually http://localhost:5173).
npm run build- User presses
Enteron keyboard. - The app starts an event-driven simulation queue.
- Signal passes through nodes in this order:
- Keyboard
- Keyboard Controller
- Hardware Interrupt
- Kernel Input Handler
- Scheduler
- Application Layer
- CPU Fetch
- CPU Decode
- CPU Execute
- Each node becomes active, then completed.
- Each edge animates during transfer latency.
- Operation counter increases with simulated cost.
src/
App.tsx # Main page + Enter key listener
main.tsx # React entrypoint
styles.css # UI styling
types.ts # Graph and simulation types
components/
ControlPanel.tsx # Run/reset/speed controls
MotherboardView.tsx # SVG board rendering + tooltips
simulation/
graphConfig.ts # Node and edge definitions + latencies
useSimulationEngine.ts # Event queue + propagation engine
Update these files to customize behavior:
src/simulation/graphConfig.ts- Node positions (
x,y) - Node descriptions (
tooltip) - Node costs (
opsCost) - Latencies (
baseLatencyMs,edge.latencyMs)
- Node positions (
src/simulation/useSimulationEngine.ts- Event processing behavior
- Random ops multiplier logic
- Speed scaling rules
Run Enter Signalbutton starts simulation.Resetclears state and counter.Speedslider changes propagation speed.- Physical
Enterkey also starts simulation.
- This is an educational simulation, not a real hardware monitor.
- Operation counts are simulated estimates.