About this project
A small tool demonstrating what can run directly in your browser: compare solar and battery options, adjust costs and download a PDF report. A demonstration of Chartlet, Open Grid and Lightweight PDF, built with Astro and Svelte.
What makes this demo different
- Independent and free
- The calculator sells nothing and brokers no offers: no sign-up, no paywall, no contact details, no commission from providers. It calculates with assumptions you can see and change, and the method is documented in full. The result is a transparent estimate, not a promise or a quote.
- Calculations run on your device
- The energy and financial model is written in TypeScript and runs as JavaScript in the browser. It matches generation and demand hour by hour and calculates battery performance, financing and payback. Changing inputs needs no server calculation request.
- WebAssembly for presentation and documents
- WASM brings compiled Rust components to the browser for charts, the table interface and PDF reports. The solar model itself uses JavaScript; a JavaScript data adapter also sorts the result tables in this demo.
- A small server with a defined role
- Astro serves prepared pages and public reference data. The Cloudflare endpoint validates confirmed location requests, queries PVGIS and caches yield profiles. The application does not send household or financial values to a calculation or PDF service.
The three projects in practice
- Chartlet · GitHub
- Renders changing SVG charts through WASM in the browser. The architecture diagram on this page is generated with the same library at build time.
- Open Grid · GitHub
- Presents monthly energy balances and cash flows as sortable tables. Its Web Components run through WASM, with Svelte connecting them to the calculated values.
- Lightweight PDF · GitHub
- Generates the report locally through WASM and loads only when exporting a PDF. No external PDF service is needed.
The source code of the calculator, including the model, tests and this page, is on GitHub: casoon/web-solarrechner
View architecture and data flows
How the solar calculator is built
The website serves the interface and public reference data. Inputs, hourly calculations and result exports are connected in the browser. Only a confirmed request for location-specific yield data requires the server.
- Start without a data request
- Astro serves the page with a bundled Berlin yield profile. Place search uses a locally served GeoNames snapshot. Changing household, cost or battery inputs does not trigger another PVGIS request.
- One shared result
- Svelte manages inputs. Pure TypeScript functions match generation and demand hour by hour and calculate battery performance, costs, financing and payback. Chartlet, Open Grid and the PDF report use the same calculated values.
- Location data on confirmation
- A confirmed request sends coordinates, tilt and orientation to the Cloudflare endpoint. It validates parameters, queries PVGIS and temporarily caches public yield profiles. The returned profile feeds into the local calculation.
- Take results with you locally
- Chartlet renders charts and Open Grid presents tables. Lightweight PDF loads only when creating a PDF download. PDF and JSON exports are generated in the browser; the application does not send household or financial values to a calculation or PDF service.
Data sources and modelling assumptions
- PVGIS / JRC
Yield and weather data: the 2023 hourly profile normalized to long-term monthly averages for 2005–2023. Berlin is bundled as the initial profile.
- GeoNames · CC BY 4.0
Locally served postal and place data, snapshot from 28 October 2026.
- Bundesnetzagentur
Published rates for commissioning from 1 August to 31 December 2026. As of 29 October 2026, EEG 2027 remains under parliamentary consideration; continuing the previous rules beyond 2026 is a scenario.
- EEG 2027 government draft · 21/7867
Separate draft scenario: calendar transition payments followed by direct marketing with a bonus or simplified market premium. A permanent 50% export limit and additional metering, control and marketing costs are modelled. Market prices and budgets are assumptions, not guaranteed offers.
- BDEW electricity price analysis
Average household electricity price 2026 (37.0 ct/kWh including a share of the standing charge) as a guide for the preset unit price.
- HTW Berlin
Independence calculator to cross-check self-sufficiency and self-consumption; the load-peak options mark the smooth hourly profile as an upper bound.
- HTW Berlin, Stromspeicher-Inspektion 2025
Lab measurements of home storage efficiency and stand-by draw (2 to 64 W with an empty battery) behind the three storage levels.
- Verbraucherzentrale NRW
Dated offer analysis informing the cost curve, not a live market index. Price levels and additional budgets are our estimates.
- Volt Energie
An additional supplier comparison for meter cabinet costs.
Household, car and heat pump demand profiles are synthetic assumptions. Historical quarter-hourly SMARD prices are not integrated. Unpaid export is an editable sensitivity: from the calendar year after assumed metering installation for fixed payments, or from the start of direct marketing. Statutory payment extensions, MiSpeL grid charging and bidirectional charging are not modelled.
An estimate to support a decision
Solar calculators rely on assumptions: sunlight, weather, shading and actual demand vary. This demo provides a rough estimate, not a prediction accurate to the cent or kilowatt-hour. Twelve editable templates help compare options and approximate payback times. Payback here means that the installation has earned back its costs in the model; a loan may still be outstanding.
Use it as a starting point, to quickly check your own plans or to understand a quotation and develop questions for an installer. It is not a quotation calculator and does not replace installation planning. Up to two roof surfaces on one inverter, one meter and simplified AC storage limit the model; payments and costs follow the selected calendar revenue phases. Measured demand, site assessments and actual quotations improve accuracy. It deliberately leaves out dynamic electricity tariffs and energy sharing with neighbours under § 42c EnWG: the question is whether the installation itself pays off. This demo needs no data purchase and does not guarantee yield or payback.