SmartSLD

A free online editor for electrical single-line diagrams, with an AI assistant that can draw, modify, and read hand-drawn diagrams.

A browser-based editor for electrical single-line diagrams (SLDs). The base editor is open-source and runs entirely on the client — no install, no login, files saved locally. The hosted SaaS layer adds cloud projects, sharing, and an AI assistant that can generate diagrams from text descriptions, edit existing ones via natural language, and extract topology from photos of hand-drawn schematics.

What it does

  • Draw. Drag busbars, breakers, transformers, motors, panels onto a snap grid. Wires route themselves.
  • Ask. Tell the assistant “add a 200 A panel with six GFCI breakers off the main bus” — it edits the diagram in place.
  • Scan. Paste a photo of a hand-drawn one-line. The assistant extracts the topology and gives you a clean diagram to refine.

Stack

  • Editor: TypeScript, React, SVG canvas, Zustand. Pure client-side, no backend dependency.
  • SaaS: Cloudflare Workers + D1 + R2 + Pages. Better Auth for sessions, OpenRouter for LLM calls.
  • AI: 3-tool surface (read_diagram, read_library, apply_ops) with a discriminated-union Op type. Single dispatch per turn so the entire AI edit collapses to one undo entry.

Open source

The editor itself is published as the sldeditor library — embed it in your own app, or use it standalone with local file save/load.