Back to Faultline

Sources & build notes

Directed by Jayden Tran, age 12. AI-assisted implementation. The request was to build a website that live-tracks earthquakes and explains them.

What this website does

Faultline fetches the USGS past-hour, past-day, or past-week earthquake summary feed. It checks every 60 seconds while open and visible, offers magnitude, depth, region-text, and current-map-area filters, and links each observation to its USGS report. Map selection and the list share the same filtered results. The histogram uses 24 equal time bins. Unknown magnitude or depth remains unknown. An optional device-local explorer account or guest mode can save progress. No email or location permission is requested; hosting access is separate.

Sources

The decisions behind the build

A live label needs evidence. The interface shows both the feed generation time and the last successful check. Failed refreshes keep the last observations with a visible message; they never turn into invented earthquakes. The selected time period and loaded period can differ during a failed request, so the loaded period is identified in the error and counts.

Magnitude, depth, and local shaking are different concepts. A magnitude comparison and a conceptual fault-slip illustration provide ways to explore them without pretending to show live instrument measurements. The world background is a simplified geographic reference, not a fault or hazard map.

Jayden supplied the concept and asked to open the app. AI assisted with source checking, implementation, and validation. These observable requests are not measurements of private thoughts or learning outcomes. A future student can start with one official feed, show its update time, then add one filter and test it against known examples.

Watching earthquakes through time

Jayden asked to see earthquakes in time. The timeline replays the selected feed window in chronological order, with a scrubber, pause/resume, next-event stepping, and three speeds. The selected period takes 60 seconds at 1×. The map and event list include only observations up to the replay clock. Live refresh checks pause during replay so its end time stays fixed. Back to live restores the current view and the chosen auto-refresh setting.

Checks cover replay boundaries, time cutoffs, next-event stepping, playback speed, and stopping at the end. This is a replay of recorded timestamps, not a simulation of seismic waves or a prediction.

Historical catalog and trusted sources

Jayden requested older earthquakes, not just recent events, and asked for trusted sources. The app queries the official USGS catalog API directly. Its History tab accepts a date range or all catalog years and loads 1,000 records per page, oldest first. Additional pages are explicitly requested with Load next 1,000 catalog records. Counts identify loaded records versus matching catalog records when the count service responds; filters and replay cover loaded records only. A 1906 example links to the real San Francisco earthquake record.

All earthquake observations come from earthquake.usgs.gov. The Natural Earth map and Leaflet library are stored with this app; no external font service or third-party tracking script is used. Event report URLs are restricted to HTTPS on earthquake.usgs.gov. Source links go to official USGS, Natural Earth, and Leaflet sites. These checks establish provenance, not that every earthquake ever occurred is in the catalog.

Automatic live refresh

Jayden asked that the tracker refresh by itself. Recent views check USGS every 60 seconds while visible and show a countdown. If a check fails, the next automatic attempt remains scheduled and old observations are labeled. Returning to a visible page triggers an overdue check. Historical search and replay deliberately pause live checks; Live view returns to the past-day feed with automatic updates on. USGS reports can arrive late or be revised, so this is near-real-time reporting rather than instant earthquake detection.

From observatory to Earth Explorer

Jayden asked for a visually animated heatmap and a complete gamified experience where kids learn from real data. The implementation keeps the USGS pipeline and adds three interchangeable map views, twenty record-based and exploration discovery missions, six science checks, two exploration badges, and a browser-local explorer passport. Each unique discovery grants 50 XP once. Three discoveries advance a game level; labels are game ranks, not scientific qualifications. There are no purchases, rewards for disasters, or invented observations.

The heat overlay adds identical 28-pixel radial kernels at each visible, loaded epicenter, combining overlapping color additively. It is a relative screen-space density visualization: zoom, time window, replay, filters, and record coverage change its appearance. It is neither a calibrated density scale nor a measurement of energy, danger, damage, or shaking. Individual dots retain magnitude colors. Decorative rings repeat and do not mean that a quake just occurred. A separate illustrated globe is labeled as artwork. Motion can be paused, and the app respects reduced-motion preferences.

To reproduce the workflow: first establish trustworthy input and failure states; then define exactly what the visual encoding means; add missions that can be validated from recorded fields; keep unknown values unknown; store only minimal local progress; and check wrong answers, repeated discoveries, replay, filters, mobile layout, and data freshness. Jayden directed the requested product changes; AI assisted with the code, visual design, and checks. No claim is made about unobserved thoughts or learning gains.

Quest rewards and customization

Jayden next requested more quests and cosmetic rewards for completing them. The quest board now contains 20 quests: geography, depth, reviewed records, UTC timestamps, unique-record collections, map views, science checks, timeline exploration, and historical searches. Each quest unlocks one named cosmetic, for 20 earned rewards plus four starter items. The reward locker supports equipping an emblem, passport frame, explorer title, and heatmap palette independently. Locked rewards state their requirement and link to their quest. Old completed quests keep their XP and automatically qualify for their rewards.

Unique-record milestones count USGS IDs inspected after this update, capped at 250 retained IDs; the largest milestone requires 25. Reopening one ID does not add progress. Quest completions, equipment, viewed map styles, and this limited list of IDs save locally on this browser. They do not sync to another device or origin and are lost if the browser storage is cleared. If storage is unavailable, the interface states that progress lasts for the visit. Cosmetic palettes change only the decorative relative-density overlay and its legend. Magnitude colors, positions, timestamps, measured values, and eligibility do not change. There are no purchases or random paid rewards.

Checks cover old-save migration, unique-record deduplication, progress thresholds, one reward for every quest, locked-item enforcement, science/map-view milestones, equipment persistence, and browser interactions for earning and equipping cosmetics. This documents observable product decisions and verification, rather than attributing unobserved private thinking to the student.

Local accounts, guest play, and the decorated login

Jayden asked for login and create-account pages like Typing Lab, with a guest option. The inspected Typing Lab page describes accounts created on the current device. Faultline therefore offers browser-local explorer profiles rather than presenting device storage as a cloud account. Each username has a separate encrypted progress vault. Guests retain the existing guest save; signup can optionally copy it without removing it. Reloading locks an account and requires its password again. Passwords and encryption keys are not stored, emailed, or sent to an account server.

Each account derives a non-extractable AES-GCM key from its password using PBKDF2-SHA-256, 310,000 iterations, and a random 16-byte salt. Each save uses a new 12-byte nonce. Encrypted progress is stored in this origin’s browser storage; the key stays in page memory. This protects stored account progress but does not make the browser, device, or page immune to malicious code or a compromised device. There is no email recovery or cross-device synchronization. Losing the password or clearing storage can make the local save unavailable. Local preview and hosted Site are separate origins with separate saves.

Unit checks cover registration, login/logout, duplicate usernames, wrong passwords, tamper rejection, optional guest import, account/guest isolation, ordered saves, and browser-storage failures. Guest progress remains available in memory for the visit when storage is blocked. Jayden then requested a better-decorated login. The resulting illustrated globe, orbital rings, starfield, gradient card, and clear guest action use local vector/CSS artwork, not simulated live readings. Layout and guest navigation are checked in the browser. Site hosting remains owner-private as requested; guest mode inside the app does not bypass that separate hosting access policy.

Expanding beyond earthquakes

Jayden requested more natural disasters. Faultline now provides eight additional natural-hazard views: wildfires, severe storms, floods, volcanic events, landslides, drought, extreme snow, and temperature extremes. Earthquakes continue to use USGS. Other views query the NASA EONET v3 API by category and time window. No provider data is generated by AI.

NASA describes EONET as a curated visualization and information catalog with approximate event extents. It is selective, not a global real-time sensor or alert network. Each category requests open and closed reports from 7, 30, 90, or 365 days, or all available catalog years, with an explicit 1,000-record maximum. A limit notice appears when reached. Categories without recent records default to all available catalog years; a prominent historical label identifies old reports rather than describing them as current conditions. The map counts unique catalog events with valid dated point or polygon geometry. Each marker uses the latest geometry at or before the current time; polygon markers use a supplied vertex as a reference, not an invented epicenter. Dates identify reported geometry, not necessarily an exact disaster start time. A catalog’s open status is labeled separately from current real-world activity.

Storm detail can connect its dated reported positions. Segments are split when crossing the international date line to avoid an artificial line across the world. They are not forecasts. Magnitudes are not compared across hazard types: supplied values retain their units and earthquake filters stay in the earthquake view. Decorative icon motion can be paused with the global motion control and follows reduced-motion settings. Hazard reports do not earn earthquake-specific quests.

Each active NASA view checks for updates every 60 seconds while visible. Failed checks retain only that category and window’s last successful data, with a visible error; empty selections do not get invented reports. Category changes cancel obsolete requests. Event detail links are constructed on NASA’s official domain, rather than trusting arbitrary source URLs in the feed. The same locally stored Natural Earth map is reused.

Checks cover response validation, duplicates, invalid and future geometries, geometry ordering, polygons, category and status filters, safe NASA record links, date-line tracks, and preserving account and quest behavior. Browser checks exercise real NASA reports, category switching, detail panels, empty selections, refresh controls, and returning to USGS. The project remains private and keeps the previously requested device-local accounts and guest option.

Quests for every hazard and common-area exploration

Jayden asked for quests for every natural disaster, then requested a way to see common areas. The existing 20 earthquake quests are preserved. Each of the eight NASA-backed hazard types now adds four quests: inspect a real report, inspect three distinct reports, inspect a report and successfully load two different date windows, and answer that hazard’s science check. Historical reports count, so learning does not require waiting for a new disaster. There are 52 quests and 52 earned cosmetics, plus the four starter items. Every new category has its own emblem, passport frame, heatmap palette, and explorer title. Heatmap palettes continue to customize the earthquake heatmap only.

Progress is isolated by hazard category and explorer profile. Reopening a record or repeating a successful check never duplicates XP or rewards. Failed data requests do not count as explored windows; successful empty windows can count after a real report has been inspected, because absence from a selected catalog window is itself worth understanding. The quest board has a collection selector, direct exploration buttons, and per-category counters. NASA reports never satisfy earthquake-only quests. Existing completed quests, selected cosmetics, and encrypted local-account saves retain their prior data.

The common-areas panel separates a geography guide from clusters calculated from loaded reports. The guide links to primary sources from USGS, NOAA, NASA, NSIDC, and the Geological Survey of India. Its map tours illustrate examples such as Pacific plate margins, tropical cyclone basins, river floodplains, mountain slopes, and snowbelts. Tour frames are author-selected navigation aids, not official hazard boundaries or a ranked global frequency map. Drought is distinguished from a normally dry climate, and surface-temperature examples are distinguished from air temperatures and heatwave risk.

The cluster view groups the currently filtered locations into 20-degree latitude/longitude cells, counts one location per loaded record, and shows the top three cells with examples. Cells have unequal physical areas, and counts are not adjusted for population, detection, or source selection. They represent report counts in this selected window, not hazard probability, severity, or global occurrence rates. Changing filters, a date window, replay, or category updates the view. Geography and clusters can both be hidden without changing the underlying observations.

Checks cover all nine geography guides, coordinate validation and grid boundaries, cluster count totals, four quests and rewards for all eight new categories, record/window deduplication, old-save migration, category isolation, equipment persistence, and browser flows for report inspection, quizzes, map tours, clusters, and quests. These features follow the student’s observable requests; AI assisted with source research, implementation, and checks.

Limits

This is near-real-time monitoring of recorded events, not prediction, early warning, or emergency advice. Reports may be late, revised, or incomplete; network coverage varies worldwide. Map boundaries are cartographic references. Feed and map availability depend on network access. Check official sources for the latest information.

Return to the earthquake map

Observation Deck update

Jayden asked for a richer, more animated experience and more data to explore. The next revision adds nine distinct illustrated hazard scenes, filter-aware record charts, hemispheric counts, a guided map tour with a pause control, CSV downloads with source links, and the official USGS 30-day feed. Chart bars count loaded records by reported time; NASA records use the latest supplied geometry date. They do not measure damage, hazard probability, or worldwide event frequency. Guided tours do not automatically complete discovery quests. Motion can be turned off, and system reduced-motion preferences are respected.