How mrfanasina/rdp works
This React/TypeScript application presents and simulates Petri nets, with the principal workflow taking a user from the project overview into an editable net, then through transition firing and review of the resulting marking and history. The store owns net state, enabled-transition checks, conflict handling and simulation history; the interface exposes those capabilities through the canvas and supporting panels. Preset networks include the parcel-sorting and charging-station subjects as well as Mobile Money and traffic-light examples. The excerpts are partial, so uncertain component-to-store wiring is omitted.
Main entry points: PetriPage.tsx Simulator page · petriStore.ts Petri state and simulation · App.tsx View router · PresentationPage.tsx Project overview
Components 15
Entry and overview
- View router
src/App.tsx - Project overview
src/pages/PresentationPage.tsx
Net simulation
- Simulator page
src/pages/PetriPage.tsx - Interactive canvas
src/components/petri/PetriCanvas.tsx - Playback controls
src/components/petri/PetriControls.tsx - Steps and conflicts
src/components/petri/PetriStepsPanel.tsx
Editing and inspection
- JSON editor
src/components/petri/PetriEditor.tsx - Net legend
src/components/petri/PetriLegend.tsx - Incidence matrix
src/components/petri/PetriIncidenceMatrix.tsx - Add-node form
src/components/petri/AddPetriNodeForm.tsx
Net data and state
- Petri state and simulation
src/store/petriStore.ts - Preset networks
src/constants/petriConstants.ts - Net domain types
src/types/petri.ts
Other components
- User
- JSON net file
Connections 22
- User → View router: opens
- View router → Project overview: shows overview
- View router → Simulator page: opens simulator
- Project overview → Petri state and simulation: loads presets
- Project overview → Interactive canvas: embeds preview
- Simulator page → Interactive canvas: renders
- Simulator page → Playback controls: renders
- Simulator page → Steps and conflicts: renders
- Simulator page → JSON editor: renders
- Simulator page → Net legend: renders
- Simulator page → Incidence matrix: renders
- Simulator page → Add-node form: renders
- Simulator page → Petri state and simulation: imports and exports
- Simulator page → JSON net file: reads and writes
- Playback controls → Petri state and simulation: advances simulation
- Steps and conflicts → Petri state and simulation: selects and fires
- Interactive canvas → Petri state and simulation: edits and fires
- JSON editor → Petri state and simulation: edits net
- Net legend → Petri state and simulation: reads and updates statement
- Incidence matrix → Petri state and simulation: reads net
- Add-node form → Petri state and simulation: adds nodes
- Petri state and simulation → Preset networks: loads preset data