← All work

P&ID diagram editor

A browser-based editor for piping and instrumentation diagrams, built on React Flow with domain-specific nodes for engineering teams.

Status
Shipped
Role
[FILL]
Period
[FILL]

Problem

Engineers draw P&ID diagrams: pumps, valves, instruments and the pipes and signal lines between them. [FILL: what they used before (desktop CAD? Visio?) and why a web editor was needed.]

Scale: [FILL: typical diagram size in nodes and edges, number of users.]

My role

[FILL]

Architecture

React Flow owns the canvas; custom node and edge types encode P&ID symbols; the diagram model is serialised to the backend.UI: Symbol palette, Canvas, Inspector. Then MODEL: Diagram state. Then PERSISTENCE: [FILL: API / format].UISymbol paletteCanvasReact FlowInspectornode propertiesMODELDiagram state[FILL: store]PERSISTENCE[FILL: API / format]
React Flow owns the canvas; custom node and edge types encode P&ID symbols; the diagram model is serialised to the backend.

Key decisions and trade-offs

React Flow instead of a canvas or SVG engine from scratch

[FILL: why. React Flow gives pan, zoom, selection and edge routing for free and lets nodes be React components. The trade-off is DOM-based rendering, which gets slow at large node counts. Where was your limit and what did you do about it?]

Custom nodes

[FILL: which P&ID symbols became custom node types, how ports/handles were modelled (inlet, outlet, signal), and how you validated connections (e.g. a signal line cannot connect to a pipe port).]

Diagram model and persistence

[FILL: what the saved format looks like and whether the UI state is the source of truth or a projection of a domain model.]

Hard bug I fixed

[FILL: symptom → diagnosis → root cause → fix. React Flow candidates: re-render storms when node data changes, edges detaching after undo, coordinates drifting between zoom levels.]

Outcome / status

[FILL: shipped? used by whom? metric only if sourced.]

Stack

  • React
  • TypeScript
  • React Flow
  • [FILL: state management]