Lastspitze
Lastspitze reads one year of 15-minute meter data from an industrial site and shows what the grid fee is, which quarter hour set it, and what a lower peak would save.
Try it: https://sametdemirtas.github.io/lastspitze/

It runs in the browser. Nothing is uploaded, and there is no language model in the app.
What it shows
- The annual peak, the energy and the full-load hours, and the grid fee they lead to. Prices are the published 2026 sheet of Stadtnetze Münster.
- What a cap on the peak would save per year, how many times the load went above it, and the saving for every cap between 60 % and 100 % of the peak.
- The smallest battery, in kW and kWh, that would hold a cap through the whole year. A quarter-hour simulation lets it recharge between events.
- Whether the site meets the conditions for atypical grid use (§ 19(2) StromNEV), and if it does not, what load level inside the operator’s high-load windows would.
- Where the peaks are: a load duration curve, a heatmap of day against time of day, and the ten highest peaks.
Example
The page opens with an invented metal-working plant on medium voltage:
|
|
| Annual peak |
1,891 kW, on a Wednesday at 07:00 |
| Grid fee |
324,145 EUR a year |
| Cap at 90 % of the peak |
would save 25,184 EUR a year, with a battery of 190 kW and 140 kWh |
| Atypical grid use |
not met: the peak inside the high-load windows is 10 % below the annual peak, and 20 % is required |
| What it would take |
8 quarter hours on 3 days were above the qualifying level; holding it would save about 50,000 EUR a year |
Run it
Needs Node 22.
npm ci
npm run dev # http://localhost:5173
npm test
npm run build
To use your own data, open a CSV with a timestamp and the mean power in kW per quarter hour. The separator can be ;, , or a tab. Timestamps can be ISO 8601 or local German time (31.12.2025 23:45), and decimal commas are read.
How it works
The grid fee is the annual peak times a demand price plus the energy times an energy price. Which pair of prices applies depends on the full-load hours (energy divided by peak), with the split at 2,500 hours. Capping the peak therefore lowers the demand charge and can also move the site across that split.
src/contract.ts types shared by everything
src/calc/ CSV parsing, fee, peaks, shaving, battery, atypical use
src/sample/ seeded generator for the sample year
src/data/ price sheet and high-load windows, validated on load
src/components/ Vue components
src/charts/ ECharts option builders
src/calc is plain functions with tests and no dependency on Vue. The rules, every price and the source of each are in docs/method.md, together with what was not verified.
Built with Claude Code in 30 minutes
This was a timed exercise: 30 minutes and Claude Code. It took 26, and TIMING.md is the log.
The session started with a shared contract, src/contract.ts, so that four agents could work in parallel on the calculation, the UI, the price-sheet research and the sample data. A review agent checked each one’s output, and the findings went back for fixing. Reviewers also recomputed the sample year’s fee and the battery sizes with their own loops, and the results match.
After the clock stopped there was one more review round, and its fixes are included.
Left out: the 7,000-hour rule, public holidays in the high-load windows, reactive power and metering charges, battery cost, a German UI.
Limits
- One operator and one year of prices. Net prices, without levies, taxes or metering charges.
- The sample site is invented.
- The conditions for atypical grid use (a 20 % or 30 % lower peak inside the windows, at least 100 kW) come from three operators’ sheets that restate the regulator’s decision BK4-13-739. The decision itself was not read, and the operator decides each case.
- Savings are before any cost of shifting load or of a battery.
Licence
MIT
评论