datasheet2spice

Traceable datasheet-to-SPICE model generation for power MOSFETs and diodes, with validation benchmarks.

View the Project on GitHub lisiqi1983/datasheet2spice

Deployment Modes

The project supports a lightweight hosted workbench and a higher-fidelity local backend. Both should use the same project JSON and model-generation semantics.

Browser Pages Mode

Target: GitHub Pages.

Use this mode for:

Expected limits:

Local Python Backend

Target: the user’s workstation.

Use this mode for:

The current local HTTP server is intentionally small and calls datasheet2spice.service for backend work. A future FastAPI server can expose the same service functions through a cleaner REST API without changing the frontend contract.

Future Remote API

Target: optional hosted service.

Use this mode later for:

This mode requires privacy, cost, and API-key design, so it should not block the open-source local and GitHub Pages workflows.

Frontend Contract

The web app should depend on a small set of backend operations:

createProject
extractPdf
getEvidence
reviewFinding
digitizeCurve
fitModel
emitModelBundle
runValidation

Adapters can implement those operations through browser-only JavaScript/WASM, the local Python backend, or a future remote API. The formal operation list is exported by datasheet2spice.contracts.service_contract() and documented in Interface Contracts.

The lightweight frontend source lives under web/. GitHub Pages still publishes from docs/, so tools/sync_web_frontend.py copies the source frontend files into the deployable docs tree and tests verify the copies stay identical.

The browser workbench frontend is split into small ES modules:

Browser Pages mode must keep model-generation semantics aligned with the Python emitters. It can remain lighter on PDF extraction and simulator execution, but the generated starter netlists should use the same fitted parameters, nonlinear capacitance tables, parasitic handling, and starter-deck assumptions as the local backend whenever the project JSON contains those values.