Skip to the content
4 layers25 × 15 mm4b2183a2-dd1e-42be-9764-910de50a3e22, the printed circuit board in 3D

4b2183a2-dd1e-42be-9764-910de50a3e22

Nandini-6126/Router_PCB_WEB_AI

Upload a KiCad .kicadpcb, parse it to JSON, run an A\ router, and download the results — all from a simple web UI (FastAPI backend + Vite/React frontend).

Size
25 × 15 mm
Copper layers
4
Thickness
1.6 mm
Parts
7
Nets
6
Pads
26
Tracks, vias
75, 4
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
9 Oct 2025
Updated
13 Oct 2025

Overview

4b2183a2-dd1e-42be-9764-910de50a3e22 is an open-source printed circuit board by Nandini-6126, from the Nandini-6126/Router_PCB_WEB_AI repository on GitHub. It is a 4-layer board of 25 × 15 mm with 7 parts on 6 nets, routed with 75 tracks and 4 vias.

It is built around the LM2574HVM-3.3. Its parts include 3 resistors, 1 capacitor, 1 IC, 1 diode and 1 connector.

Main components

1

README

README.md

PCB Routing UI

Upload a KiCad .kicad_pcb, parse it to JSON, run an A* router, and download the results — all from a simple web UI (FastAPI backend + Vite/React frontend).

Current status

  • ✅ Step 1–2 end-to-end: Upload → Parse → Route → Download
  • ⚠️ Step 3 “Inject into .kicad_pcb” is a stub (currently copies the original file). You can view routing from output.json, and later we’ll replace the stub with a real KiCad writer.

1) Prerequisites

  • Windows PowerShell
  • Python 3.11+ (or 3.10+)
    Verify: py --list or python --version
  • Node.js 18+ and npm
    Verify: node -v and npm -v

2) Quick Start

Backend (FastAPI)

powershell
cd backend-pcb-routing

# Create & activate venv
py -3.11 -m venv .venv    # or: python -m venv .venv
. .venv\Scripts\Activate.ps1

# Install deps
pip install fastapi uvicorn pydantic python-multipart

# Run API (http://127.0.0.1:8000)
uvicorn main:app --reload --port 8000

# Health check:
#   http://127.0.0.1:8000/health  -> {"ok": true}
# API docs:
#   http://127.0.0.1:8000/docs

Frontend (Vite + React)

powershell
cd frontend
npm install

# Configure backend URL and enable Inject UI:
# Preferred: create a file frontend/.env.local with:
#   VITE_API_BASE=http://127.0.0.1:8000
#   VITE_ENABLE_INJECT=true
#
# One-time session alternative (PowerShell):
$env:VITE_API_BASE="http://127.0.0.1:8000"
$env:VITE_ENABLE_INJECT="true"

npm run dev
# Open http://localhost:5173

3) How to Use

  1. Upload & Parse (Step 1)
    Upload your .kicad_pcb. The backend runs parser.py and creates jobs/<job_id>/parsed_input.json. A summary (bbox, pads, nets, footprints) appears.

  2. Route (Step 2)
    Adjust parameters (trace width, clearance, via cost/size/drill, grid step). Click Run A* Route. The backend runs astar.py, writes jobs/<job_id>/output.json, and returns a summary (segments, vias, length).

  3. Download
    Use the buttons to download parsed_input.json, output.json, and (optionally) routed.kicad_pcb.

  4. Inject (Step 3 – optional, stub)
    The “Inject to .kicad_pcb” button currently copies the original file to routed.kicad_pcb so the flow is end-to-end. Replace this with a real KiCad writer later.


4) Project Structure (suggested)

text
pcb-routing-ui/
  backend-pcb-routing/
    main.py         # FastAPI server (calls parser.py & astar.py)
    parser.py       # KiCad .kicad_pcb -> parsed_input.json
    astar.py        # parsed_input.json -> output.json (routes)
    jobs/           # per-run job folders (ignored in git)
  frontend/
    src/
      components/
        UploadCard.tsx
        ParamsForm.tsx
        Downloads.tsx
        StatusBar.tsx
      lib/
        api.ts
        types.ts
    index.html
    package.json
    .env.local      # VITE_API_BASE, VITE_ENABLE_INJECT

5) API (at a glance)

Base URL: http://127.0.0.1:8000

  • GET /health → { "ok": true }
  • POST /api/parse (multipart, field file: .kicad_pcb)
    → { ok, job_id, parsed_path, meta }
  • POST /api/route (JSON: { job_id, params })
    → { ok, output_path, summary } and writes output.json
  • POST /api/inject (JSON: { job_id })
    → { ok, routed_path } (currently copy of original)
  • GET /api/download?path=<abs_path_under_jobs> → file download

Notes

  • Backend enforces UTF-8 for child processes (avoids Windows emoji/encoding crashes).
  • All downloads are constrained to the jobs/ root.

6) File Formats

parsed_input.json (from parser.py)

json
{
  "board": {
    "boundary": [[x1,y1], [x2,y1], [x2,y2], [x1,y2] ],
    "layers": ["F.Cu", "B.Cu"]
  },
  "rules": {
    "trace_width": 0.25,
    "clearance": 0.30,
    "via_cost": 10,
    "grid_step": 0.25,
    "via_size": 0.8,
    "via_drill": 0.4
  },
  "obstacles": [ /* pads and polygon obstacles */ ],
  "tasks": [
    {
      "net": "Net-(U1-Pad1)",
      "net_id": 1,
      "start": { "x": 10.2, "y": 30.1, "layer": "F.Cu" },
      "goal":  { "x": 42.8, "y": 12.6, "layer": "F.Cu" }
    }
  ]
}

output.json (from astar.py)

json
{
  "summary": {
    "segments": 20,
    "vias": 3,
    "nets_routed": 8,
    "total_length_mm": 55.2
  },
  "segments": [
    { "net": "Net-(U1-Pad1)", "start": [x,y], "end": [x,y], "layer": "F.Cu", "width": 0.25 }
  ],
  "vias": [
    { "net": "Net-(U1-Pad1)", "at": [x,y], "from": "F.Cu", "to": "B.Cu", "size": 0.8, "drill": 0.4 }
  ],
  "routes": [ /* per-net grouping (for reference) */ ]
}

To visualize in KiCad, you’ll eventually implement an injector that writes these segments/vias as KiCad S-expressions back into a new .kicad_pcb. For now, the backend exposes a stub that copies the file so the pipeline is complete.


7) CLI (optional)

Run the tools by hand if needed:

powershell
# Parser
python parser.py path\to\board.kicad_pcb [parsed_output.json]

# Router (merges JSON params into parsed rules)
python astar.py parsed_input.json output.json "{\"trace_width\":0.25,\"clearance\":0.3}"

8) Troubleshooting

  • “Failed to fetch” in frontend
    Ensure backend is running and set frontend env:
    frontend/.env.local

    text
    VITE_API_BASE=http://127.0.0.1:8000
    VITE_ENABLE_INJECT=true

    Restart npm run dev.

  • Setting env vars on Windows
    Use PowerShell style (don’t paste VITE_...=... like in bash):

    powershell
    $env:VITE_API_BASE="http://127.0.0.1:8000"
    $env:VITE_ENABLE_INJECT="true"
  • CORS
    Backend allows http://localhost:5173 and http://127.0.0.1:5173 by default.
    Override with ALLOW_ORIGINS before starting uvicorn:

    powershell
    $env:ALLOW_ORIGINS="http://localhost:5173,http://127.0.0.1:5173"
    uvicorn main:app --reload --port 8000
  • “.kicad_pcb only” error on upload
    The filename must end with .kicad_pcb.

  • Unicode/emoji print crashes
    Backend forces UTF-8 for child processes. Avoid fancy emojis in subprocess prints on Windows consoles.

  • py -3.11 not found
    Install Python 3.11 or use python -m venv .venv. Check py --list.


9) Next Steps

  • Replace inject stub with a real KiCad writer (tracks & vias).
  • Add per-netclass rule mapping UI (optional).
  • Improve obstacle parsing (zones, keepouts) and DRC.

Happy routing! 🧭✨

Parts

7
QtyValueFootprintReferences
3RResistor_SMD:R_0402_1005MetricR1, R2, R3
1CCapacitor_SMD:C_0805_2012MetricC1
1Conn_01x02_PinConnector_Wuerth:Wuerth_WR-WTB_64800211622_1x02_P1.50mm_VerticalJ1
1LEDLED_SMD:LED_0603_1608MetricD1
1LM2574HVM-3.3Package_SO:SOIC-14W_7.5x9mm_P1.27mmU1

More from Nandini-6126/Router_PCB_WEB_AI

1
  • 4 layers25 × 15 mmE304b803-63fb-4bbf b541-487a68e12ce0, the printed circuit board in 3D

    E304b803-63fb-4bbf b541-487a68e12ce0

    Nandini-6126/Router_PCB_WEB_AI

    Upload a KiCad .kicadpcb, parse it to JSON, run an A\ router, and download the results — all from a simple web UI (FastAPI backend + Vite/React frontend).

    4 parts

Similar boards

  • 2 layers87.6 × 81.5 mmESP32-C3-Booster, the printed circuit board in 3D

    ESP32-C3-Booster

    RobertPHeller/CommandStationsAndBoosters

    Command Stations and Boosters

    97 parts
  • 4 layers32.3 × 61 mmMCL6809 PCB, the printed circuit board in 3D

    MCL6809 PCB

    MicroCoreLabs/Projects

    Ted Fried's MicroCore Labs Projects - FPGA CPU cores and emulators for the 8088, 8086, 8051, 6502, 68000, Z80, Risc-V, and also Typewriter and EPROM Emulator projects.

    7 parts534
  • 4 layers17.8 × 41 mmABSIS Pro Micro, the printed circuit board in 3D

    ABSIS Pro Micro

    jrsteensen/OpenHornet

    OpenHornet 1:1 F/A-18C Simulator Repository

    7 parts431
  • 4 layers108 × 31.8 mmSimm72 ram 8M10, the printed circuit board in 3D

    Simm72 ram 8M10

    agranlund/raven

    Homemade MC68060 + DSP56303 Atari-compatible computer. Hardware, firmware, and software stack

    7 parts87
  • 4 layers100 × 80 mmDiffpair test, the printed circuit board in 3D

    Diffpair test

    rjwalters/kicad-tools

    Standalone Python tools for parsing and manipulating KiCad schematic and PCB files

    7 parts73MIT
  • 4 layers57.9 × 26 mmMegaCD, the printed circuit board in 3D

    MegaCD

    Board-Folk/MegaCD-Main-BD

    Reproductions of main board PCBs for Sega's Mega CD/Sega CD add-on for the Mega Drive/Genesis console.

    7 parts60
  • 4 layers60 × 40 mmDemo, the printed circuit board in 3D

    Demo

    shibukawa/bdf

    BDF is a browser document-preview suite: it combines converters for many formats (Go/WASM), a browser renderer of about 23 KB gzipped, and a compact intermediate format.

    7 parts51MIT

Questions

How big is the 4b2183a2-dd1e-42be-9764-910de50a3e22 PCB?

It measures 25 × 15 mm and has 4 copper layers, 1.6 mm thick.

What parts does the 4b2183a2-dd1e-42be-9764-910de50a3e22 use?

7 parts, built around the LM2574HVM-3.3. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the 4b2183a2-dd1e-42be-9764-910de50a3e22 KiCad files?

From the Nandini-6126/Router_PCB_WEB_AI repository on GitHub, at the commit this page was made from: the board is backend-pcb-routing/jobs/4b2183a2-dd1e-42be-9764-910de50a3e22/routed.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the 4b2183a2-dd1e-42be-9764-910de50a3e22 design in my own project?

Its repository states no licence, so its author keeps all rights: ask Nandini-6126 before reusing the design.