Details
Technical description of the Leptospirosis simulation web tool, development stack, exports, and deployment.
Leptospirosis simulation web tool
The Leptospirosis simulation is implemented as an interactive, browser-based decision-support dashboard. Users enter population, infection and program/control parameters; the application computes disease trajectories and key indicators and visualizes outputs as epidemic curves.
Development environment & tools
- Visual Studio Code — IDE for PHP/HTML/CSS/JS.
- XAMPP (Apache + PHP) — local server for testing .php pages.
- Browser dev tools — JS debugging, DOM inspection, performance profiling.
Languages & frameworks
- PHP — serving pages/headers/footers.
- HTML + CSS — layout and styling.
- JavaScript — simulation engine, indicators, charts, exports.
- Tailwind CSS (CDN) — responsive UI cards/grids/typography.
- Chart.js — plotting epidemic curves on canvas.
Implementation steps (end-to-end)
- UI + parameter entry: card-based input panel + validation + help bubbles.
- Simulation engine: client-side iterative update; re-run on input change; no page reloads.
- Visualization: Chart.js renders time series; synchronized with export arrays.
- Exports: results CSV, parameters CSV, chart+summary PNG, printable HTML report.
How it works in the browser
- Inputs → JS validation → derived computations.
- Simulation loop generates arrays (S[t], E[t], I[t], …).
- Chart.js renders arrays on canvas.
- Downloads via Blob (CSV), canvas export/compositing (PNG), generated HTML string (report).