How nezaal/symsim works
SystemSim is a visual system-architecture editor and discrete-event simulator. Users assemble and configure a component graph, run it with chosen duration and seed, and inspect results; designs can also be autosaved, versioned, and shared. The graph separates editor state, simulation execution, project/auth services, and presentation. Sampled excerpts establish several key calls; some UI, persistence, and result relationships are included only where the source index names the dependency, so unsampled wiring is not inferred.
Main entry points: architectureStore.js Architecture state · projectStore.js Project state · useRunPersistence.js Run persistence · App.jsx App routing
Components 28
Product experience
- App routing
frontend/src/App.jsx - Landing and templates
frontend/src/pages/LandingPage.jsx - Editor page
frontend/src/pages/EditorPage.jsx - Run controls
frontend/src/components/RunControls.jsx - Results and charts
frontend/src/components/results/ResultsOverlay.jsx - Shared design page
frontend/src/pages/SharedPage.jsx
Design editing
- Canvas and palette
frontend/src/components/CanvasArea.jsx - Component settings
frontend/src/components/NodeSettings.jsx - Architecture state
frontend/src/store/architectureStore.js
Simulation engine
- Component definitions
packages/engine/src/componentTypes.ts - Graph validation
packages/engine/src/graphRules.ts - Simulation state
frontend/src/store/simulationStore.js - Simulation worker
frontend/src/worker/simulation.worker.js - Graph compilation
packages/engine/src/sim/compile.ts - Event simulation
packages/engine/src/sim/simulator.ts - Service models
packages/engine/src/sim/stations.ts - Resource queues
packages/engine/src/sim/resources.ts - Run metrics
packages/engine/src/sim/metrics.ts
Projects and identity
- Project state
frontend/src/store/projectStore.js - Projects API
frontend/src/lib/projectsApi.js - Authentication state
frontend/src/store/authStore.js - Supabase services
frontend/src/lib/supabase.js - Run storage API
frontend/src/lib/projectsApi.js
Design and run storage
- Editor session
frontend/src/hooks/useEditorSession.js - Browser draft
frontend/src/lib/draftStorage.js - Graph snapshots
frontend/src/lib/graphSnapshot.js - Run persistence
frontend/src/hooks/useRunPersistence.js
Other components
- Designer
Connections 35
- Designer → App routing: opens
frontend/src/App.jsx - App routing → Landing and templates: routes to
frontend/src/App.jsx - App routing → Editor page: routes to
frontend/src/App.jsx - App routing → Shared design page: routes to
frontend/src/App.jsx - Landing and templates → Component definitions: reads definitions
frontend/src/pages/LandingPage.jsx - Editor page → Canvas and palette: presents
- Canvas and palette → Architecture state: edits graph
- Component settings → Architecture state: updates config
- Architecture state → Component definitions: validates settings
frontend/src/store/architectureStore.js - Architecture state → Graph validation: checks connections
frontend/src/store/architectureStore.js - Designer → Run controls: starts run
frontend/src/components/RunControls.jsx - Run controls → Architecture state: reads graph
frontend/src/components/RunControls.jsx - Run controls → Simulation state: starts simulation
frontend/src/components/RunControls.jsx - Simulation state → Graph compilation: submits graph
frontend/src/store/simulationStore.js - Simulation worker → Graph compilation: uses engine
frontend/src/worker/simulation.worker.js - Graph compilation → Event simulation: builds model
- Event simulation → Service models: dispatches requests
packages/engine/src/sim/simulator.ts - Service models → Resource queues: uses resources
packages/engine/src/sim/stations.ts - Event simulation → Run metrics: collects metrics
packages/engine/src/sim/simulator.ts - Simulation state → Results and charts: provides run state
- Editor page → Editor session: restores session
- Editor session → Browser draft: loads and saves
frontend/src/hooks/useEditorSession.js - Browser draft → Graph snapshots: serializes graph
frontend/src/lib/draftStorage.js - Editor session → Project state: opens project
frontend/src/hooks/useEditorSession.js - Project state → Projects API: loads and saves
frontend/src/store/projectStore.js - Project state → Graph snapshots: serializes graph
frontend/src/store/projectStore.js - Project state → Architecture state: replaces graph
frontend/src/store/projectStore.js - Projects API → Supabase services: uses client
frontend/src/lib/projectsApi.js - Authentication state → Supabase services: authenticates
frontend/src/store/authStore.js - Shared design page → Projects API: loads shared design
frontend/src/pages/SharedPage.jsx - Shared design page → Graph snapshots: deserializes graph
frontend/src/pages/SharedPage.jsx - Run persistence → Projects API: saves completed run
frontend/src/hooks/useRunPersistence.js - Run persistence → Simulation state: reads run state
frontend/src/hooks/useRunPersistence.js - Run persistence → Project state: checks version
frontend/src/hooks/useRunPersistence.js - Run persistence → Authentication state: checks identity
frontend/src/hooks/useRunPersistence.js