跪拜 Guibai
← All articles
Frontend · Backend · GitHub

A Typhoon Tracker Built in One Sleepless Night Is Now Open for Anyone to Harden

By HiSt ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Disaster-information tools often fail exactly when they are needed most because they depend on databases, auth, or ad infrastructure that collapses under load or connectivity loss. This tracker’s architecture—a single stateless Worker, pure functions, and cache merging instead of overwriting—is a replicable pattern for any crisis dashboard where uptime is non-negotiable and the audience is panicked, mobile, and bandwidth-constrained.

Summary

Typhoon Bavi Tracker puts Chinese, Japanese, American, and Taiwanese forecast models on one MapLibre GL map so the convergence—or divergence—of predicted landfall is immediately visible. A city impact countdown estimates arrival time based on wind speed and vector math, while a shareable deep link focuses the map on a specific city. Real-time RSS news aggregation and a static emergency guide round out the tool, which runs entirely on a Cloudflare Worker with no database and a deliberate bias toward simplicity so it stays up when infrastructure around it fails.

The creator, HiSt, built it after finding no single source that answered three urgent questions during a typhoon: where it is, how long until it hits, and what to do now. The code is intentionally minimal—pure functions for normalization and impact calculation, a Worker that only proxies and caches, and a strict rule that a bad data fetch must never overwrite a good cache snapshot.

The repository is now open for contributions, with a task list prioritized by human impact over technical novelty. Adding a city is a one-line change; multi-typhoon support, localized shelter guides, PWA offline caching, and i18n are all on the roadmap. The project’s open-source rationale is blunt: disaster information should not be locked in anyone’s server, and a community can sustain what one person’s late-night burst of energy cannot.

Takeaways
Four agencies’ forecast tracks are overlaid on one map; toggling them independently reveals where models agree and where they diverge, which is itself actionable information.
A city impact countdown estimates arrival time using wind-speed and vector calculations, with a deep-link parameter that focuses the map on a specific city for sharing.
News aggregation merges new RSS results into a cached snapshot rather than overwriting it, preventing a single rate-limited or empty fetch from wiping out accumulated reports.
The entire stack is one Cloudflare Worker with no database—typhoon data is cached at the edge for five minutes, news for ten, and the origin APIs act as the source of truth.
Adding a new city requires only a one-line entry in a CITIES array; the contribution roadmap ranks tasks by human impact, not technical difficulty.
Conclusions

Overlaying multiple forecast models turns disagreement from a source of confusion into a signal: tightly clustered lines indicate high confidence, while scattered lines are a warning to prepare for a wider range of outcomes.

The cache-merge strategy—where new data is added to a historical snapshot rather than replacing it—is a small design decision with outsized reliability implications for any tool that must function during infrastructure degradation.

Choosing a serverless Worker with no database is framed not as a cost-saving measure but as a reliability strategy: fewer moving parts mean fewer failure modes when the surrounding network is under stress.

The project’s contribution model explicitly values adding a city over swapping a framework, which inverts the usual open-source incentive structure that rewards technical sophistication over real-world utility.

Concepts & terms
Pure function
A function whose output depends only on its input arguments and that produces no side effects (no database writes, no network calls, no mutation of global state). In this project, normalization and impact-calculation logic are written as pure functions so they are easy to test in isolation and safe to reuse across contexts.
Edge computing (Cloudflare Workers)
Running server-side logic on a globally distributed network of data centers rather than on a single origin server. A Worker intercepts HTTP requests close to the user, can cache responses, and eliminates the need to manage a traditional server or database.
Cache merge vs. cache overwrite
An overwrite strategy replaces the entire cached dataset with the latest fetch result, which can lose data if a fetch returns incomplete results. A merge strategy adds new items to the existing cache and deduplicates, ensuring a single bad fetch cannot destroy previously accumulated data.
From the discussion

A map style loading error is the main technical complaint, acknowledged by the author as a likely intermittent network glitch. Several people report the site failing to load or getting stuck fetching data. The speed of development draws curiosity about the underlying server setup and AI tooling, while a request for a technical deep-dive on the Cloudflare deployment template goes unanswered. One commenter notes a competing Zhejiang-based tracker but concedes this version packs more information.

A maplibre style-loading error crashes the map, which the author suspects is a sporadic network condition.
The live site fails for some users, hanging on a data-fetching message.
The project's rapid overnight build prompts questions about pre-existing infrastructure and the specific role of AI assistance.
A request for a technical breakdown of the Cloudflare Worker deployment template and engineering stack is made.
An existing Zhejiang typhoon tracker is mentioned as a reference point, though this new tool is acknowledged to offer richer information.
Featured comments
nuIi

Bug: Style is not done loading. at cn._checkLoaded (maplibre-wqmL2Hxp.js:796:86493) at cn.addSource (maplibre-wqmL2Hxp.js:796:91133) at Yo.addSource (maplibre-wqmL2Hxp.js:800:109763) at Gt.setupLayers (index-C1flaEsg.js:2:6218) at index-C1flaEsg.js:107:3324 at s (index-C1flaEsg.js:2:5974)

HiSt

Got it, I'll take a look after work. Probably a sporadic network issue. Gotta be a beast of burden for a while longer [downcast]

向日葵武士

There really is a bug crawling around [dog with eye-roll]

七仔哥们儿

OP is fast. Did you have a server before? How can you be this fast? Even with AI assistance, it's still incredibly fast.

申君健2486418277202

The above is an ops doc. Talk about the tech stack. What engineering template is this, and how to deploy it on Cloudflare?

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗