A web PCB viewer for board bringup. Reads the JSON export format used by InteractiveHtmlBom and serves boards from an NGINX container.
The viewer is heavily based on InteractiveHtmlBom — same data format, similar look. The BOM side is gone; this is built around net tracing instead. Two-pane net search, highlight on hover, layer filtering, inner layers visible from both sides, keyboard shortcuts.
Rendering runs in a Web Worker on an OffscreenCanvas, so pan and zoom stay smooth on large boards.
- Allegro PCB Designer, for the export
- Python 3
- Docker, if you want the server
Copy an ibomConfig.json next to the .brd file, then in Allegro:
set telskill
load("jsonDecode.il")
load("exportJson.il")
exportJson( ?config "ibomConfig.json" )
The SKILL scripts are in allegro-skills/.
Copy the exported JSON into a new folder under pcb-exports/, then:
python build_boards.py
This writes board payloads to pcb-viewer-data/. It skips files that have not
changed; --force rebuilds everything.
The Docker build makes the viewer shell itself. To build it by hand
(writes docker/viewer.html):
python generate.py --build-viewer
For a single file with the board data inlined and no server:
python generate.py board.json -o board.html
docker compose up -d --build
Or pull the published image (amd64 and arm64) instead of building:
docker run -p 1010:80 -v ./pcb-viewer-data:/usr/share/nginx/html/pcbs:ro ghcr.io/gherkin/htmlpcbviewer
CI publishes the image once all checks pass. Pushes to main publish
latest, a v* tag publishes its version (v1.2.3 as 1.2.3). Every
image is also tagged sha-<short commit>.
Boards come from the mounted pcb-viewer-data/ and open as
/viewer/?data=/pcbs/<board>.json. To update a running server, zip
pcb-viewer-data, copy it over and restart the container.
MIT, see LICENSE.
Derived from InteractiveHtmlBom (MIT) and includes code from it, from exportJson and from Split.js. NOTICE lists what came from where.
generate.py writes the license notices into every generated HTML file,
since that file contains the whole viewer. Leave that block in place.