Developer builds 23 free UK energy cost calculators and finds keeping data current is the real challenge
A developer has created Home Running Costs, a free set of 23 calculators and 8 guides estimating UK household bills such as heater, heat pump, heating oil and energy price cap costs. The site is built with Next.js, React, TypeScript and Vitest and hosted on Cloudflare. The main difficulty was keeping figures current, since Ofgem's price cap changes quarterly, heating oil prices move weekly and water bills change each April. To handle this, every figure is stored in a single config file with its source and check date, and pages are generated from it rather than hard-coding values. Tests compare outputs against official published figures, so a mistyped rate fails the build instead of showing wrong bills.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in