tapflow
Self-hosted iOS & Android simulator streaming for the whole team
Lightning protection (SPDA) toolkit per ABNT NBR 5419:2026: risk assessment (Part 2), SPDA sizing (Part 3), surge protection (Part 4) and PDF report. 11-module wizard, zero dependencies.
Translation pending
Developer toolsJavaScript · HTMLGitHub @itsnetomasetOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Risk assessment under NBR 5419-2 requires combining dozens of normative tables and structural/environmental parameters into a multi-step probability calculation. Commercial software for this is expensive, generic, and not built around how Brazilian engineers actually move through the standard section by section. Most practitioners fall back on spreadsheets that are error-prone and hard to audit.
A guided 11-module wizard that walks through the full NBR 5419 workflow: risk assessment per Part 2 (structure characterization through final risk comparison, R ≤ R_T), physical SPDA sizing per Part 3, surge protection measures (MPS) per Part 4, calculation memory and the final PDF report:
| Feature | Description |
|---|---|
| 🗺️ Automatic N_G lookup | Lightning flash density for any of Brazil's ~5,570 municipalities, sourced from the standard's official Table F.1 (Annex F) |
| 🧮 Full calculation engine | Implements the standard's risk components (R1 to R4) and loss factors |
| 🏗️ SPDA sizing (Part 3) | Physical dimensioning of the lightning protection system based on the selected protection level |
| 🔌 Surge protection (Part 4) | Lightning protection zones (ZPR 0A, 0B, 1, 2) and SPD (DPS) specification |
| 📑 Calculation memory | Step-by-step record of every input, table lookup and intermediate result |
| ✏️ Auditable manual override | Any auto-calculated value can be manually adjusted. The original normative value is always preserved |
| 💾 Offline-first persistence | Data saved locally via localStorage, with JSON export/import |
| 🖨️ PDF report generation | Native browser print engine, no server round-trip |
Note: the tool's interface is in Portuguese, as it implements a Brazilian regulatory standard (NBR 5419) for the Brazilian engineering market. Code identifiers and comments inside the engine also follow the standard's Portuguese terminology (for example
calc_distanciaSeguranca,L_A,P_SPD), so each line can be checked against the clause it implements. Documentation is in English.
Vanilla HTML, CSS and JavaScript. No framework, no build step, no dependencies. The calculation engine is written as native ES modules that run unchanged in the browser and in Node; everything runs client-side.
The engine is separated from the interface. Every normative formula and table lives in src/engine, one module per part of the standard, and none of it touches the DOM. The interface reads the user's inputs, calls the engine and renders the results.
index.html markup and styles
src/
main.js browser entry: imports the engine and exposes it to the interface
engine/
nbr5419-2.js Part 2: Annexes A, B and C (N, P, L), risk components, tolerable risk
nbr5419-2-anexo-d.js Part 2, Annex D: economic risk R4 and cost-benefit of protection
nbr5419-3.js Part 3: protection angle, earth electrode, down conductors, k_c, separation distance
nbr5419-4.js Part 4: protection zones, Tables 1, A.1 and D.1, coordinated SPDs (Annex C)
nbr5419-4-anexo-a.js Part 4, Annex A: grid shields, magnetic field, induced loop voltages
analise-risco.js complete analysis (R1, R3, F) with its calculation memory, and R4
mps.js SPD points and field evaluations from the surge protection module
quantitativo-materiais.js estimated bill of materials for the sized SPDA
index.js single import point (used by the tests)
data/
municipios.js N_G for 5,572 municipalities (Annex F, Table F.1)
js/app.js interface: 11-module wizard, persistence, report
test/ node --test suites and the characterization baseline
flowchart LR
U[Engineer] -->|wizard inputs| APP[js/app.js<br/>interface]
APP -->|analysis state| AR[analise-risco.js]
AR --> P2[nbr5419-2.js<br/>N, P, L, R]
AR --> D[nbr5419-2-anexo-d.js<br/>R4, cost]
APP --> P3[nbr5419-3.js<br/>SPDA sizing]
APP --> MPS[mps.js]
MPS --> P4[nbr5419-4.js<br/>SPD, Annex C]
MPS --> A[nbr5419-4-anexo-a.js<br/>fields, Annex A]
AR -->|results + memory| APP
APP --> R[Report / PDF]
Design decisions
This is the beginning of the README. Read the rest at the original. Read the full README ↗