quakewatch Svelte Themes

Quakewatch

Real-time earthquake monitoring dashboard. Go backend + Svelte frontend, powered by USGS data.

QuakeWatch

A real-time earthquake monitoring dashboard that visualizes seismic activity worldwide using live USGS data.

Stack: Go backend (REST API + background poller) · Svelte frontend (interactive map) · SQLite · No API keys required

Features

  • Live earthquake data from the USGS Earthquake Hazards Program
  • Interactive world map with magnitude-sized, color-coded markers
  • Filter by magnitude, time window, depth, and region
  • Sortable earthquake list with distance from your location
  • Statistics panel: totals, averages, magnitude brackets, per-day trends
  • Auto-refresh every 5 minutes (configurable)

Architecture

USGS API ──► Go Poller ──► SQLite ──► Go REST API ──► Svelte SPA

The Go backend runs as a single binary. It polls USGS feeds in the background, caches results in a local SQLite database, and serves a JSON REST API. The Svelte frontend is a static SPA — in production, Go serves it directly.

Getting Started

Prerequisites

  • Go 1.21+

Run the backend

cd backend
go run ./cmd/server

The server starts on http://localhost:8080.

API

GET  /api/health
GET  /api/earthquakes?timeWindow=day&minMagnitude=2.5
GET  /api/stats?timeWindow=week
POST /api/refresh

Configuration

Env Var Default Description
QUAKEWATCH_ADDR :8080 HTTP listen address
QUAKEWATCH_DB quakewatch.db SQLite database path

Data Source

USGS Earthquake Hazards Program — free, public, no API key required.

License

MIT

Top categories

Loading Svelte Themes