跪拜 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

The project draws praise for its speed and utility, though several people point to existing official typhoon trackers as alternatives. A recurring technical concern is a map-style loading bug, while others ask about the Amap API cost, the news aggregation method, and the Cloudflare Worker deployment. The build time of 2-3 hours with AI assistance sparks a brief exchange on how AI is reshaping productivity.

An intermittent map-style loading error occurs, acknowledged by the author as likely network-related.
The Amap map API is used; a question is raised about whether it remains free.
News aggregation relies on third-party RSS feeds queried with keywords, not AI search.
The entire project runs on a serverless Cloudflare Worker with no traditional server, going from idea to live in 2-3 hours.
AI assistance is described as exponentially changing the relationship between people and productivity.
Several existing typhoon-tracking sites are cited as alternatives, challenging the premise that information is hard to find.
The UI needs improvement: click targets are too small, and collapsible panels would help full-screen viewing.
Some users report the site stuck on 'Fetching real-time observation data,' suggesting loading failures.
A request is made for a deeper technical write-up covering the engineering template and Cloudflare deployment steps.
Featured comments
nuIi

There's a 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 check after work. Probably an intermittent network issue. Gotta be a beast of burden for a while first [wilted]

向日葵武士

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

Tobbbbin

Nice idea, but I usually use https://zoom.earth/maps/wind-speed/ and https://typhoon.slt.zj.gov.cn/#/. It's not that you have no clue where the typhoon is, as you said. Can't people search anymore these days? Relying on AI is also a bad habit.

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