What broke, and what fixed it
Notes from projects I have built and run. Each one is a real problem, what I did, what went wrong and the one thing I would keep.
Why your webhook signature check fails in n8n
The signature covers the exact bytes the sender posted, and a parsed JSON body is not those bytes. The Raw Body option fixes it, and I wrote a node so nobody has to hand-roll the rest.
The air in Sarajevo was good, said a station 35 km away
A fallback that finds the nearest live air quality station sounds safe until the nearest one is another town. How BosniaAir ended up reporting Vareš as Sarajevo, and the one-line fix.
fetch kept failing with ETIMEDOUT and the code was fine
A Node server calling an API hosted in Tokyo, a 250 ms default timeout and an unreachable IPv6 address. What happy eyeballs is and the line that stopped the errors.
My air quality site lost its backend, so I moved the API next to the frontend
The host behind BosniaAir's .NET API stopped answering and the site showed no data. The API was a thin cache over someone else's API, so it became route handlers in the same deployment.
One model for every exchange, so a backtest and a live run see the same data
The design pattern behind a trading platform that talks to several exchanges, with a short sketch. Adapters absorb the mess, one internal model is all the rest of the system ever sees.
A live strip on a static site that never shows a wrong number
The home page of this site shows live numbers from the projects we run. Getting that right on a CDN meant deciding what fresh, stale and missing mean, and showing the difference.