Source code coming soon. The GitHub repository is private for now and opens to everyone very soon.
BetterSPICE Beta 0.8.0 Join the beta Download soon
Part VII  Files and integrationReferenceContentsIndex
51

The browser viewer

The viewer is a second build of the same interface for people who only need to look at a circuit and play with it. It runs in any current browser as plain static files and installs nothing.

51.1What a viewer user can do

  • Open a share link (…#c=<circuit>), or an .bsc file with Open file, or drop a file on the page. A file on another site opens with …#u=<address of the .bsc file> when that site allows it (it must send Access-Control-Allow-Origin, or sit on the same host as the viewer).
  • See the schematic, the live scope (the Scope, FFT, Logic, Console, Diagnostics and Modules tabs), Run / Pause, step, restart, the Timebase and the inspector.
  • Change values with the inspector fields and their sliders, move parts and change the timebase. All of it stays in the window. Revert edits opens the circuit again as it arrived, and reloading the page does the same. Nothing is saved or sent anywhere.
  • Press Ctrl+R to run or pause.

The viewer leaves out what needs the desktop app: the file system, the part library, the AI agent connection, updates, the accurate (ngspice) Simulate and the AC sweep.

51.2Vendor models

The viewer does not carry the vendor model library. A part with a vendor model runs in the viewer only when its live-view equivalent is stored in the circuit. BetterSPICE adds it when it opens a circuit that uses the model, and it goes into the saved file and into share links. Other vendor parts run as generic devices or not at all, and the viewer says which parts at the top of the canvas. Share does the same check and warns the sender.

51.3Where the viewer lives

Links start with the viewer address, which is one setting. The default is a placeholder until a host is chosen. To use another address, type it in the Share dialog (it is kept in the browser as bs.viewerUrl), or build the app with VITE_VIEWER_URL=https://example.org/view.

To build it, run npm run build:viewer in ui/. That writes ui/dist-viewer/, which is the whole viewer: index.html, an assets folder and viewer-single.html, the template Export interactive HTML fills. It uses relative paths, so it works from any folder of any static host, such as GitHub Pages, Netlify, Cloudflare Pages, an S3 bucket or an ordinary web server. No server code runs. Serve .wasm files as application/wasm.

51.4Privacy

The link holds the circuit after the #. Browsers do not send that part to the host. The viewer loads no outside fonts, scripts or analytics.