A lab-grade web application for analysing photovoltaic current–voltage (I-V) sweeps. Upload measured data, and Solavin extracts the standard figures of merit — short-circuit current (Isc), open-circuit voltage (Voc), maximum power (Pmax), fill factor (FF), series and shunt resistance (Rs, Rsh) and power-conversion efficiency (η) — with interactive I-V / P-V / radar visualisations and one-click CSV/Excel export.
Built with React 18 + Vite + Recharts. The scientific core is plain, dependency-free JavaScript covered by an automated test suite, so results are reproducible and verifiable.
Developed by John Myron Uy, under the guidance of Prof. Raymund Sarmiento — Research Laboratory, Solar Cell Characterization.
- Parameter extraction — Isc, Voc, Pmax, Vmp, Imp, FF, Rs, Rsh, η.
- Multi-channel — load many sweep conditions per dataset and compare them.
- Visualisations — I-V, P-V (with MPP markers), normalised radar profile, and ranked Pmax comparison; brush-to-zoom and a voltage cursor lookup.
- Data ingest — drag-and-drop
.xlsx/.xls/.csv; multi-sheet picker. - Export — CSV and XLSX of the full metrics table, including η when area and irradiance are supplied.
- Lab Assistant — an offline, deterministic analyser that answers from the extracted metrics (summaries, rankings, fill-factor interpretation, suggested experiments). No external API, no keys.
- Local operator profiles — name a session to keep a persistent dataset library in your browser, or work in demo mode. No passwords, no backend.
- Two build targets — a normal web app for hosting, and a single
self-contained
.htmlyou can email or run offline fromfile://.
Photovoltaic figures of merit are computed in
src/lib/ivAnalysis.js on the signed current
(generator convention: current is positive in the power-producing quadrant and
negative beyond Voc).
| Quantity | Definition used |
|---|---|
| Isc | Current at V = 0 (exact sample, else interpolated; extrapolated if the sweep starts above 0 V). |
| Voc | Voltage at the first I = 0 crossing (linear interpolation). Flagged if it lies beyond the sweep range. |
| Pmax, Vmp, Imp | Maximum of V·I, restricted to the power quadrant (V ≥ 0, I ≥ 0). |
| FF | Pmax / (Isc · Voc) — always < 1 for physical data. |
| Rs | |dV/dI| near Voc (slope estimate). |
| Rsh | |dV/dI| near Isc (slope estimate). |
| η | Pmax / (G · A), with cell area in cm² and irradiance G in W/m². |
Rs and Rsh are first-order slope estimates from a single light sweep; a dark I-V curve or a full single-diode fit gives more rigorous values.
The test suite (src/lib/ivAnalysis.test.js)
asserts these invariants on every build — including that the fill factor is
always between 0 and 100 % — so the extraction cannot silently regress.
Column A is voltage (volts); each subsequent column is one current sweep (amperes, signed). Row 1 holds headers, which become channel labels.
Voltage(V), Focused Laser, -2mm, +6mm Focus
0, 1.539e-6, 1.46e-6, 1.583e-6
0.05, 1.528e-6, 1.456e-6, 1.565e-6
...
2.5, -3.875e-6, -3.052e-6, -2.923e-6
A ready-to-upload example lives in
examples/sample_iv_data.csv (the same dataset
the app loads by default).
npm install
npm run dev # start the dev server (http://localhost:5173)
npm test # run the physics unit tests
npm run build # production build → dist/
npm run build:standalone # single self-contained file → dist-standalone/index.html
npm run build:all # both buildsnpm run build:standalone produces dist-standalone/index.html — a single file
with all JavaScript and CSS inlined. Open it directly (file://…) with no server;
it works offline (web fonts fall back to system fonts when there's no network).
This repo includes netlify.toml. To go live:
- Push the repository to GitHub.
- In the Netlify dashboard, Add new site → Import an existing project and pick this repo.
- Netlify reads
netlify.tomlautomatically (buildnpm run build, publishdist). No manual configuration needed.
Every push then redeploys. The continuous-integration workflow
(.github/workflows/ci.yml) runs the unit tests and
both builds, and uploads the standalone HTML as a downloadable artifact.
src/
lib/
ivAnalysis.js # parameter extraction + parsing + export helpers (pure)
ivAnalysis.test.js # physics invariants & reference-value tests
assistant.js # deterministic, offline dataset analyser
components/
ProfileGate.jsx # local operator gate (no passwords)
Tour.jsx # guided walkthrough overlay
Assistant.jsx # lab-assistant side panel
shared.jsx # chart tooltip, channel toggles, lookup, raw-data table
AboutPage.jsx
App.jsx # main application
theme.js icons.jsx persistence.js styles.css main.jsx
examples/sample_iv_data.csv
tests/e2e.smoke.mjs # optional browser smoke test (skips if no Chromium)
npm test— Vitest unit tests for the extraction math (run in CI).npm run test:e2e— optional Playwright smoke test that builds the standalone bundle, drives it in a real browser, and verifies the app mounts cleanly with physical fill factors. Playwright is not a default dependency; install it first withnpm i -D playwright && npx playwright install chromium. The test skips automatically (exit 0) if Playwright or a browser is unavailable, so it never blocks CI.
MIT © 2026 John Myron Uy.