个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Your electricity bill, translated — bilingual LESCO bill decoder for Pakistan
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Know your bill before it lands. A free, private, offline-capable, bilingual (English / اردو) app for Pakistani domestic electricity consumers. It does four jobs:查看完整 README ↗
Know your bill before it lands.
A free, private, offline-capable, bilingual (English / اردو) app for Pakistani domestic electricity consumers. It does four jobs:
| Tab | What it does |
|---|---|
| Bill | Itemises your bill line by line (slabs, fixed charges, financing surcharge, QTA, FPA, duty, GST, TV fee, income tax) with a formula and source on every line. Shows where each rupee goes, the slab cliff, what other consumer classes would pay, a budget planner, and plain-English insights ("5 units from a Rs 1,556 jump"). |
| Track | A meter tracker. Log readings every few days; it charts the cycle against the slab lines, projects the month's units and bill, flags a heatwave in your recent pace, warns Protected/Lifeline consumers before a month tips them over the cap (and what losing it costs over six months), and tells you the units per day that keep you under the next cliff. Calendar reminders (.ics) to read the meter, no account needed. Close the cycle to log it, then follow your six-month Protected and twelve-month Lifeline progress, a seasonal outlook for the coming months and a year-on-year comparison. |
| Bill → Scan | Photograph your paper bill: it is read on the phone (Tesseract OCR, downloaded once from a CDN, the photo is never uploaded), and units, amount, billing month and sanctioned load are filled in after you confirm them. |
| Bill → Solar | "Is solar worth it?": compares 2-10 kW systems on net-billing terms for your usage, city (Global Solar Atlas yields) and installed cost, with bill, saving and payback for each. |
| Appliances | Pick what runs at home (or start from a preset). Each appliance is priced against the real tariff, cliffs included: what it costs per hour, what you save by switching it off, what one hour less a day is worth. One tap sends the total to the Bill tab. |
| Gas | Sui gas bill for SNGPL and SSGC: protected / non-protected slabs with the previous-slab benefit, fixed charges, meter rent and GST, priced per MMBtu from your bill's GCV, plus the next slab line and what crossing it costs. |
| Everywhere | Several homes/meters with their own data (Settings → Homes & meters), a "time to read the meter" banner when the last reading is 3+ days old, peak/off-peak (A-1(b)) meters, and shareable images of the bill breakdown and your year. |
| Learn | A searchable glossary of every bill line (linked from the bill), money-saving tips, and a step-by-step guide for disputing a bill. |
The audit on the Bill tab goes beyond a diff: enter the amount on your paper bill and it reports the units and FPA that amount implies, and whether a different sanctioned load, consumer class or filer status reproduces it.
source_url on every rate.#/bill?u=300&t=protected&d=lesco&k=5.npm start # serves on http://127.0.0.1:8080
# or: npx -y http-server -p 8080
# or: python -m http.server 8080
Opening index.html directly from disk will not work (ES modules + fetch
require HTTP).
index.html app shell + the Bill view's markup
js/main.js boot, hash router, view lifecycle
js/app.js, store.js shared context + one-document persistence (with v1 migration)
js/views/*.js bill, track, plan (appliances), learn, settings/welcome
js/tariff.js bill engine (pure)
js/insights.js insights, class comparison, bill diagnosis (pure)
js/tracker.js cycle projection, daily allowance, streaks (pure)
js/appliances.js appliance pricing (pure)
data/ tariffs, DISCOs, appliance catalog, learn content (all open JSON)
The js/ modules marked pure have no DOM access and are covered by node --test.
bijli-hisaab) and push this folder to main.main, / (root).https://<user>.github.io/bijli-hisaab/.Tests run automatically on every push/PR via .github/workflows/tests.yml.
npm test # node --test — zero dependencies
The suite pins the engine to published arithmetic (e.g. the SRO 279(I)/2026 examples: 200 unprotected units × Rs 28.91 = Rs 5,782; protected 200 units = 100 × 10.54 + 100 × 13.01 = Rs 2,355), guards the data schema (every tariff file must carry sources and effective dates), and covers the advice, tracker and appliance logic.
Each file in tests/fixtures/scans/ is the text OCR read off a bill plus the
numbers the bill really shows; npm test checks the parser against all of
them. The two there now are synthetic. To add a real one: scan your bill in the
app, tap Copy the text that was read, blank out your name, address and
reference number, and save it as { "source": "real", "company": "...", "ocr_text": "...", "expected": { "units": ..., "amount": ..., "month": "YYYY-MM", "loadKw": ... } }. Open a PR (or paste it in an issue).
The best regression tests are real bills. If you want to contribute: photograph
your bill, blank out name/address/reference number, transcribe the line items
into a test fixture (see tests/tariff.test.js → "audit fixture"), and open a
PR with the image under tests/fixtures/. Ground truth beats simulated data.
Rates change quarterly (base) and monthly (FPA), and a stale calculator is worse than none — so every number in the data files cites a source and the UI shows "rates in force since …" everywhere.
To update:
data/tariffs/exwapda/<period>.json (or add a new period file and bump
default in data/tariffs/exwapda/index.json).effective_date, verified_on, and add a sources entry linking the
NEPRA notification / SRO / credible news report.npm test — the schema test rejects uncited data.A scheduled workflow (.github/workflows/tariff-freshness.yml) runs on the 5th
of every month and opens a tariff-update issue with a checklist whenever a
tariff file was last verified more than five weeks ago.
Adding a DISCO: add an entry to data/discos.json (with its provincial
electricity duty), create data/tariffs/<id>/<period>.json, and add the id to
the DISCO picker in index.html. The engine is DISCO-agnostic.
Modelled: domestic single-phase for all nine ex-WAPDA DISCOs (LESCO, FESCO, GEPCO, MEPCO, IESCO, PESCO, HESCO, SEPCO, QESCO) and K-Electric - unprotected / protected / lifeline slabs, per-kW fixed charges, financing-cost surcharge, QTA, FPA (default + your bill's exact rate), provincial electricity duty, GST, TV licence fee, income tax for non-filers above Rs 25,000, minimum charge, the slab cliff, budget planner, paper-bill audit and diagnosis, and rooftop solar in both connection regimes:
Peak/off-peak meters (A-1(b), 5 kW and above) are modelled at the SRO 279 uniform rates with fixed charges on 50% of sanctioned load or the MDI; pick "Peak & off-peak" under Settings → Meter type.
Not modelled: arrears, meter rent, municipal taxes (MUCT etc.), estimated readings, commercial & agricultural tariffs, K-Electric's KMC municipal charge (MUCT). Electricity duty: the federal government stopped collecting it through ex-WAPDA bills from July 2025 (APP / The News, 30 Jun 2025), so it is off by default there and on for K-Electric (still remitted to Sindh in late 2025). Settings → Electricity duty switches it per meter if your bill says otherwise. A computed total within a few percent of the paper bill is the expected accuracy. The app says so on every screen - please keep it that way.
Tariff rates are uniform across ex-WAPDA DISCOs, so they live in ONE shared
set per period: data/tariffs/exwapda/<period>.json. Per-DISCO differences
(helpline, website, provincial electricity duty) live in data/discos.json.
A DISCO that ever gets its own rates again just points at its own tariff set.
tools/freshness.mjs)Current tariff file (data/tariffs/exwapda/2026-10.json) cites:
BijliBills — NEPRA Tariff 2026 Explained (SRO 279(I)/2026),
BillsCheckOnline — LESCO unit price,
MEPCO bill tax guide,
NEPRA, plus QTA/FCA determinations as reported by
Business Recorder. The authoritative source is always the NEPRA notification.
tools/fetch-icons.mjs rebuilds it)fonts/data/tariffs/MIT — see LICENSE. Rates data is public tariff information.