<pclass="lead">A local-first browser tool for reverse engineering, documenting, and inspecting printed circuit boards.</p>
<divclass="tip-box">
<strong>Privacy Note:</strong> This application runs 100% in your browser. All images and data are stored in your browser's local database (IndexedDB). No data is uploaded to any server.
</div>
<h2>1. Concept & Hierarchy</h2>
<p>ReTrace organizes data to match physical hardware:</p>
<ol>
<li><strong>Device:</strong> The physical unit (e.g., "Multimeter Model X").</li>
<li><strong>Board:</strong> A specific PCB inside the device (e.g., "Mainboard", "Power Supply").</li>
<li><strong>Images:</strong> Photos of the board (Top, Bottom, Angled shots).</li>
</ol>
<h2>2. The Workflow</h2>
<h3>Step 1: Setup</h3>
<p>Create a <strong>New Device</strong> and a <strong>New Board</strong> using the top menu. Then, upload your images. High-resolution, flat photos work best.</p>
<h3>Step 2: Mapping Components (BOM)</h3>
<p>Navigate to the <strong>Images</strong> tab. Click on a component in the photo to mark it.</p>
<ul>
<li>The app switches to the <strong>BOM</strong> list.</li>
<li>Enter the Reference (e.g., <code>R1</code>).</li>
<li>If identifying the value requires calculation, click the tool icon to open the built-in decoders (Resistor Bands, Inductors).</li>
<li><strong>Smart Naming:</strong> Click near a component to add a node. If the component is defined in the BOM, the tool <strong>auto-suggests the label</strong> (e.g., <code>R1.1</code>) using geometry (Angle & Distance). It automatically accounts for board rotation and flips pin logic for Bottom-side images.</li>
<li><strong>Pinout Help:</strong> Click the <buttonstyle="padding:0 5px; font-size:0.75rem; border-radius:50%; line-height:1;">?</button> button in the naming dialog to view standard conventions (e.g., "Stripe = Pin 1" for Tantalum).</li>
<li><strong>New Net:</strong> If no net is currently active, entering a name for a node will <strong>automatically start a new net</strong>.</li>
<li><strong>Export:</strong> In the Nets tab, you can export a <code>.net</code> (KiCad) and <code>.cir</code> (SPICE) file to help verify your reverse engineering in a professional EDA tool.</li>
<p>Switch to the <strong>Schema</strong> tab to automatically generate a schematic diagram from your traced nets.</p>
<ul>
<li><strong>Auto Layout:</strong> ReTrace uses a built-in routing engine to organize components and draw wires intelligently.</li>
<li><strong>Interactive Editing:</strong> Drag components to rearrange them. Right-click (or long-press on mobile) to rotate or replace the symbol.</li>
<li><strong>KiCad Libraries:</strong> Click "Libraries" to import actual <code>.kicad_sym</code> libraries (or ZIP files) and assign standard symbols to your components.</li>
<li><strong>Standalone Mode:</strong> You can use this tool independently by visiting <code>schema.html</code> to visualize any standard KiCad <code>.net</code> or SPICE <code>.cir</code> netlist.</li>
<p>ReTrace uses Computer Vision (CV) for <strong>Spatial Alignment</strong>. It allows you to synchronize the view across different images.</p>
<divclass="warn-box">
<strong>Important:</strong> The CV engine does <em>not</em> automatically recognize components (it won't read "10k" off a resistor). Its purpose is to mathematically align coordinates between images so you can see through the board.
</div>
<h3>Auto-Stitch (Same Side)</h3>
<p>When you upload a new image, ReTrace <strong>automatically attempts to stitch</strong> it against existing images on the board in the background. If features match (e.g., a close-up vs. a wide shot), connections are created automatically.</p>
<p>You can also run this manually:</p>
<ol>
<li>Open <strong>Image Settings</strong> on your Main image.</li>
<p>See this feature in action at the official <strong><ahref="https://dev-lab.github.io/pcb-retrace-examples/"target="_blank">PCB ReTrace Examples Gallery</a></strong>. All projects there are hosted on GitHub Pages and load via Deep Links.</p>