A small instrument for clear ideas

Circuits, made legible.

9 distinct circuit topologies. One editable document. Drawing, not simulation.

Editing a local copy of Focus D1 · geist-print. The gallery source is unchanged.

Live figure / SVGReady to export
Focus D1Focus D1. C1: capacitor, 1 mF. D1: diode, Diode. D2: diode, Diode. D3: diode, Diode. D4: diode, Diode. RL: resistor, 1 kΩ. ac_a: A connected to D1.anode connected to D3.cathode. ac_b: B connected to D2.anode connected to D4.cathode. dc_positive: C1.a connected to D1.cathode connected to D2.cathode connected to RL.a connected to VDC. ground: C1.b connected to D3.anode connected to D4.anode connected to GND connected to RL.b. Topology illustration, not a device simulation. AC terminals A/B, full-wave diode bridge, parallel load and filter. No ripple or diode-drop simulation.. Focus components: D1. Focus nets: none.

One document. The same SVG in the browser, React, and CLI.

Source of truth

Figure document

Editing immediately pauses preview and export. Apply validates this exact text; invalid input stays here for correction. Selecting an example replaces the draft.

For authors & agents

The public contract

Discover the same schema and catalog through the local CLI. No accounts or generation service.

Document JSON schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "number",
      "const": 1
    },
    "circuit": {
      "type": "object",
      "properties": {
        "components": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[^.]+$"
          },
          "additionalProperties": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "resistor"
                  },
                  "resistance": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "type",
                  "resistance"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "capacitor"
                  },
                  "capacitance": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "type",
                  "capacitance"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "led"
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "diode"
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "npn"
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "op-amp"
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "dc-source"
                  },
                  "voltage": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "type",
                  "voltage"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "ports": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[^.]+$"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "terminal",
                  "ground"
                ]
              }
            },
            "required": [
              "kind"
            ],
            "additionalProperties": false
          }
        },
        "nets": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[^.]+$"
          },
          "additionalProperties": {
            "minItems": 2,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      },
      "required": [
        "components",
        "ports",
        "nets"
      ],
      "additionalProperties": false
    },
    "layout": {
      "type": "object",
      "properties": {
        "preset": {
          "type": "string",
          "enum": [
            "rc-lowpass",
            "voltage-divider",
            "led-series",
            "loaded-divider",
            "rc-ladder",
            "wheatstone-bridge",
            "bridge-rectifier",
            "transistor-switch",
            "inverting-amplifier"
          ]
        },
        "roles": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[^.]+$"
          },
          "additionalProperties": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[^.]+$"
          }
        }
      },
      "required": [
        "preset",
        "roles"
      ],
      "additionalProperties": false
    },
    "presentation": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "annotations": {
          "type": "object",
          "properties": {
            "nets": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "net": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tone": {
                    "type": "string",
                    "enum": [
                      "blue",
                      "amber",
                      "violet",
                      "green",
                      "rose",
                      "cyan"
                    ]
                  }
                },
                "required": [
                  "net",
                  "label",
                  "description",
                  "tone"
                ],
                "additionalProperties": false
              }
            },
            "legend": {
              "type": "boolean"
            },
            "caption": {
              "type": "string"
            }
          },
          "required": [
            "nets",
            "legend"
          ],
          "additionalProperties": false
        },
        "theme": {
          "type": "object",
          "properties": {
            "preset": {
              "type": "string",
              "enum": [
                "geist-light",
                "geist-dark",
                "geist-print"
              ]
            },
            "overrides": {
              "type": "object",
              "properties": {
                "background": {
                  "type": "string",
                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
                },
                "wire": {
                  "type": "string",
                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
                },
                "label": {
                  "type": "string",
                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
                },
                "muted": {
                  "type": "string",
                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
                },
                "border": {
                  "type": "string",
                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
                },
                "highlight": {
                  "type": "string",
                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
                },
                "strokeWidth": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "fontScale": {
                  "type": "number",
                  "exclusiveMinimum": 0
                }
              },
              "additionalProperties": false
            }
          },
          "required": [
            "preset"
          ],
          "additionalProperties": false
        },
        "highlight": {
          "type": "object",
          "properties": {
            "components": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "pattern": "^[^.]+$"
              }
            },
            "nets": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "pattern": "^[^.]+$"
              }
            }
          },
          "required": [
            "components",
            "nets"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "title",
        "theme"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "version",
    "circuit",
    "layout",
    "presentation"
  ],
  "additionalProperties": false,
  "x-component-pins": {
    "resistor": [
      "a",
      "b"
    ],
    "capacitor": [
      "a",
      "b"
    ],
    "led": [
      "anode",
      "cathode"
    ],
    "diode": [
      "anode",
      "cathode"
    ],
    "npn": [
      "base",
      "collector",
      "emitter"
    ],
    "op-amp": [
      "noninverting",
      "inverting",
      "output",
      "vplus",
      "vminus"
    ],
    "dc-source": [
      "positive",
      "negative"
    ]
  }
}
Recipes, pins & SI parameters
{
  "version": 1,
  "components": {
    "resistor": {
      "pins": [
        "a",
        "b"
      ],
      "parameters": {
        "resistance": {
          "unit": "Ω",
          "quantity": "resistance",
          "finite": true,
          "exclusiveMinimum": 0
        }
      },
      "convention": "IEC rectangular"
    },
    "capacitor": {
      "pins": [
        "a",
        "b"
      ],
      "parameters": {
        "capacitance": {
          "unit": "F",
          "quantity": "capacitance",
          "finite": true,
          "exclusiveMinimum": 0
        }
      }
    },
    "led": {
      "pins": [
        "anode",
        "cathode"
      ],
      "parameters": {}
    },
    "diode": {
      "pins": [
        "anode",
        "cathode"
      ],
      "parameters": {}
    },
    "npn": {
      "pins": [
        "base",
        "collector",
        "emitter"
      ],
      "parameters": {}
    },
    "op-amp": {
      "pins": [
        "noninverting",
        "inverting",
        "output",
        "vplus",
        "vminus"
      ],
      "parameters": {}
    },
    "dc-source": {
      "pins": [
        "positive",
        "negative"
      ],
      "parameters": {
        "voltage": {
          "unit": "V",
          "quantity": "voltage",
          "finite": true,
          "exclusiveMinimum": 0
        }
      }
    }
  },
  "ports": {
    "terminal": {
      "endpoint": "port ID"
    },
    "ground": {
      "endpoint": "port ID"
    }
  },
  "recipes": [
    {
      "id": "rc-lowpass",
      "title": "RC low-pass filter",
      "roles": {
        "series": "resistor",
        "shunt": "capacitor",
        "input": "terminal",
        "output": "terminal",
        "ground": "ground"
      },
      "nets": [
        [
          "input",
          "series.a"
        ],
        [
          "series.b",
          "shunt.a",
          "output"
        ],
        [
          "shunt.b",
          "ground"
        ]
      ],
      "derived": {
        "formula": "fc = 1/(2πRC)",
        "assumption": "Ideal RC model; not a simulation."
      },
      "example": "examples/rc-lowpass.json"
    },
    {
      "id": "voltage-divider",
      "title": "Voltage divider",
      "roles": {
        "top": "resistor",
        "bottom": "resistor",
        "input": "terminal",
        "output": "terminal",
        "ground": "ground"
      },
      "nets": [
        [
          "input",
          "top.a"
        ],
        [
          "top.b",
          "bottom.a",
          "output"
        ],
        [
          "bottom.b",
          "ground"
        ]
      ],
      "derived": {
        "formula": "VOUT/VIN = Rbottom/(Rtop+Rbottom)",
        "assumption": "Ideal unloaded divider."
      },
      "example": "examples/voltage-divider.json"
    },
    {
      "id": "led-series",
      "title": "LED series circuit",
      "roles": {
        "supply": "dc-source",
        "resistor": "resistor",
        "led": "led",
        "ground": "ground"
      },
      "nets": [
        [
          "supply.positive",
          "resistor.a"
        ],
        [
          "resistor.b",
          "led.anode"
        ],
        [
          "led.cathode",
          "supply.negative",
          "ground"
        ]
      ],
      "derived": {
        "formula": null,
        "assumption": "Drawing values only; no LED voltage drop or current assumed."
      },
      "example": "examples/led-series.json"
    },
    {
      "id": "loaded-divider",
      "title": "Loaded voltage divider",
      "roles": {
        "top": "resistor",
        "bottom": "resistor",
        "load": "resistor",
        "input": "terminal",
        "output": "terminal",
        "ground": "ground"
      },
      "nets": [
        [
          "input",
          "top.a"
        ],
        [
          "top.b",
          "bottom.a",
          "load.a",
          "output"
        ],
        [
          "bottom.b",
          "load.b",
          "ground"
        ]
      ],
      "derived": {
        "formula": "VOUT/VIN = (Rbottom || Rload)/(Rtop + (Rbottom || Rload))",
        "assumption": "Ideal resistors with an explicit parallel load; not an unloaded divider."
      },
      "example": "examples/loaded-divider.json"
    },
    {
      "id": "rc-ladder",
      "title": "Two-stage RC ladder",
      "roles": {
        "first": "resistor",
        "firstShunt": "capacitor",
        "second": "resistor",
        "secondShunt": "capacitor",
        "input": "terminal",
        "output": "terminal",
        "ground": "ground"
      },
      "nets": [
        [
          "input",
          "first.a"
        ],
        [
          "first.b",
          "firstShunt.a",
          "second.a"
        ],
        [
          "second.b",
          "secondShunt.a",
          "output"
        ],
        [
          "firstShunt.b",
          "secondShunt.b",
          "ground"
        ]
      ],
      "derived": {
        "formula": "H(s) = 1/[1 + s(R1 C1 + R1 C2 + R2 C2) + s² R1 R2 C1 C2]",
        "assumption": "Unbuffered stages interact. Ideal source and unloaded output; no independent cutoff product."
      },
      "example": "examples/rc-ladder.json"
    },
    {
      "id": "wheatstone-bridge",
      "title": "Wheatstone bridge",
      "roles": {
        "upperLeft": "resistor",
        "lowerLeft": "resistor",
        "upperRight": "resistor",
        "lowerRight": "resistor",
        "input": "terminal",
        "outputLeft": "terminal",
        "outputRight": "terminal",
        "ground": "ground"
      },
      "nets": [
        [
          "input",
          "upperLeft.a",
          "upperRight.a"
        ],
        [
          "upperLeft.b",
          "lowerLeft.a",
          "outputLeft"
        ],
        [
          "upperRight.b",
          "lowerRight.a",
          "outputRight"
        ],
        [
          "lowerLeft.b",
          "lowerRight.b",
          "ground"
        ]
      ],
      "derived": {
        "formula": "VLEFT - VRIGHT = VIN [R2/(R1+R2) - R4/(R3+R4)]",
        "assumption": "Open-circuit differential outputs; no wire or measuring load connects the two midpoints."
      },
      "example": "examples/wheatstone-bridge.json"
    },
    {
      "id": "bridge-rectifier",
      "title": "Full-wave bridge rectifier",
      "roles": {
        "positiveA": "diode",
        "positiveB": "diode",
        "negativeA": "diode",
        "negativeB": "diode",
        "load": "resistor",
        "filter": "capacitor",
        "inputA": "terminal",
        "inputB": "terminal",
        "output": "terminal",
        "ground": "ground"
      },
      "nets": [
        [
          "inputA",
          "positiveA.anode",
          "negativeA.cathode"
        ],
        [
          "inputB",
          "positiveB.anode",
          "negativeB.cathode"
        ],
        [
          "positiveA.cathode",
          "positiveB.cathode",
          "load.a",
          "filter.a",
          "output"
        ],
        [
          "negativeA.anode",
          "negativeB.anode",
          "load.b",
          "filter.b",
          "ground"
        ]
      ],
      "derived": {
        "formula": null,
        "assumption": "AC terminals A/B, full-wave diode bridge, parallel load and filter. No ripple or diode-drop simulation."
      },
      "example": "examples/bridge-rectifier.json"
    },
    {
      "id": "transistor-switch",
      "title": "NPN low-side LED switch",
      "roles": {
        "supply": "dc-source",
        "baseResistor": "resistor",
        "series": "resistor",
        "led": "led",
        "switch": "npn",
        "control": "terminal",
        "ground": "ground"
      },
      "nets": [
        [
          "supply.positive",
          "series.a"
        ],
        [
          "series.b",
          "led.anode"
        ],
        [
          "led.cathode",
          "switch.collector"
        ],
        [
          "control",
          "baseResistor.a"
        ],
        [
          "baseResistor.b",
          "switch.base"
        ],
        [
          "switch.emitter",
          "supply.negative",
          "ground"
        ]
      ],
      "derived": {
        "formula": null,
        "assumption": "Shared-ground low-side NPN topology. No gain, saturation, LED current or switching-time model."
      },
      "example": "examples/transistor-switch.json"
    },
    {
      "id": "inverting-amplifier",
      "title": "Inverting operational amplifier",
      "roles": {
        "inputResistor": "resistor",
        "feedback": "resistor",
        "amplifier": "op-amp",
        "input": "terminal",
        "output": "terminal",
        "positiveSupply": "terminal",
        "negativeSupply": "terminal",
        "ground": "ground"
      },
      "nets": [
        [
          "input",
          "inputResistor.a"
        ],
        [
          "inputResistor.b",
          "feedback.a",
          "amplifier.inverting"
        ],
        [
          "amplifier.output",
          "feedback.b",
          "output"
        ],
        [
          "amplifier.noninverting",
          "ground"
        ],
        [
          "amplifier.vplus",
          "positiveSupply"
        ],
        [
          "amplifier.vminus",
          "negativeSupply"
        ]
      ],
      "derived": {
        "formula": "VOUT/VIN = -Rfeedback/Rin",
        "assumption": "Ideal linear negative feedback only. Virtual ground is not wired to GND; rails, bandwidth and saturation are not simulated."
      },
      "example": "examples/inverting-amplifier.json"
    }
  ],
  "themes": {
    "presets": [
      "geist-light",
      "geist-dark",
      "geist-print"
    ],
    "overrides": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "background": {
          "type": "string",
          "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
        },
        "wire": {
          "type": "string",
          "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
        },
        "label": {
          "type": "string",
          "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
        },
        "muted": {
          "type": "string",
          "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
        },
        "border": {
          "type": "string",
          "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
        },
        "highlight": {
          "type": "string",
          "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
        },
        "strokeWidth": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "fontScale": {
          "type": "number",
          "exclusiveMinimum": 0
        }
      },
      "additionalProperties": false
    }
  },
  "endpoints": {
    "syntax": "componentId.pin or portId",
    "idConstraint": "Nonempty IDs; '.' is reserved for endpoint pin separation.",
    "membership": "Every declared endpoint must belong to exactly one net; each net has at least two endpoints.",
    "topology": "Exact role-resolved endpoint sets; net names are author-defined."
  },
  "limitations": [
    "No arbitrary topology, simulation, electrical-safety certification, or LED current estimate."
  ]
}