This project aggregates public earthquake feeds. Information may be delayed, incomplete, or inaccurate. It is not an official emergency-warning channel and must not be the only source used for life-safety decisions.
The server connects to public earthquake data feeds, normalizes incoming events, and sends updates to browsers over WebSocket. The frontend provides dedicated desktop, mobile, and OBS views with maps, event history, wave-arrival estimates, voice alerts, and browser push notifications.
Click any screenshot to open the live application.
- Desktop, mobile, and OBS display modes.
- Multiple public WebSocket and REST earthquake feeds with normalization, deduplication, caching, and reconnection.
- Taiwan CWA text normalization from Traditional Chinese to Simplified Chinese before event processing.
- AMap, Tianditu, Google, Yandex, OpenStreetMap, and Esri map options.
- P-wave, S-wave, distance, and local-intensity estimates based on user-authorized location.
- Chinese and English interfaces, device time zones, and light/dark themes.
- Web Speech voice alerts and Web Push notifications.
- Unified push-worker handling with desktop/mobile presentation checks and device acknowledgements for test notifications.
- Password-protected debug tools, request rate limits, and WebSocket limits.
- Cookie consent and encrypted browser-side preference storage.
| Layer | Technology |
|---|---|
| Server | Node.js 18+, Express 4 |
| Realtime | WebSocket (ws) |
| Map | OpenLayers and configured map providers |
| Push | Web Push API and web-push |
| Frontend | HTML, CSS, and JavaScript |
| Localization | Chinese and English |
npm ci
cp .env.example .env
npm startWindows PowerShell:
npm ci
Copy-Item .env.example .env
npm startThe default listener is http://127.0.0.1:3000.
| View | Path |
|---|---|
| Desktop / automatic entry | / |
| Mobile | /mobile |
| OBS | /obs |
| Health check | /health |
Copy .env.example to .env and configure only the integrations you use. Never commit .env.
| Variable | Purpose |
|---|---|
PUBLIC_ORIGIN |
Public HTTPS origin in production |
DEBUG_PASSWORD |
Password for protected debug tools |
OBS_ENABLED |
Server-side OBS route switch; defaults to true |
AMAP_JS_KEY |
AMap Web JS key |
AMAP_SECURITY_JSCODE |
AMap security code |
YANDEX_MAPS_API_KEY |
Yandex Maps key |
GOOGLE_MAPS_API_KEY |
Optional Google Maps key |
TIANDITU_TK |
Optional Tianditu token |
ESRI_API_KEY |
Optional Esri key |
CWA_API_KEY |
Optional Taiwan CWA open-data token |
VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY |
Optional Web Push key pair |
WEB_PUSH_ENABLED |
Enables production validation for Web Push and requires VAPID settings |
PUSH_RELAY_URL, PUSH_RELAY_SECRET |
Optional push relay configuration |
PUSH_TEST_DEVICE_ACK_TIMEOUT_MS |
Device acknowledgement timeout for test notifications; default 20000 |
The service can start without map credentials, but providers that require keys will remain unavailable. Run the production configuration check after filling .env:
npm run config-checknpm run check
npm run feature-check
npm run security-check
npm run ui-checksecurity-check and ui-check start an isolated local server automatically. package.json is the single source for release and cache versions; use npm version <patch|minor|major> to synchronize HTML, the Service Worker cache, and release.json.
OBS is available automatically when the server starts. It is no longer controlled from browser settings; set OBS_ENABLED=false on the server to make /obs and /obs.html return 404.
Production deployment instructions and the included systemd workflow are documented in docs/DEPLOYMENT.md.
Publisher roles, relay endpoints, refresh behavior, and fallback rules are documented in docs/DATA_SOURCES.md.
.
├─ .github/ # CI and security-analysis workflows
├─ cloudflare/ # Optional push relay Worker
├─ data/.gitkeep # Empty runtime-data directory
├─ docs/ # Deployment guide and screenshots
├─ lib/ # Shared server-side helpers
├─ public/ # Desktop, mobile, OBS, workers, and assets
├─ scripts/ # Checks, deployment, and packaging scripts
├─ .env.example
├─ LICENSE
├─ README.md
├─ README_CN.md
├─ SECURITY.md
├─ package.json
├─ release.json
└─ server.js
Runtime files created under data/ are ignored by Git and must not be uploaded.
Keep production credentials in .env or a secret manager. Do not commit map keys, tokens, private keys, push subscriptions, audit records, or runtime data. See SECURITY.md.
This project is licensed under the MIT License.
Copyright (c) 2026 Zou Yutong



