This is a submission for Weekend Challenge: Earth Day Edition
What I Built
Terra Letters is a living atlas that lets you drop a pin on any place on Earth — and read what the place says back.
The app pulls real planetary data for that exact spot: climate trajectory from 1950 to 2050, species recently observed nearby, an actual bird field recording from the region, current weather, air quality, elevation, marine conditions, and seismic activity. Then Mistral AI weaves it all into a personal, poetic, data-grounded "Letter from Your Place" — written in the first person as the place itself.
Every letter ends with a concrete micro-action: not a vague plea to "save the planet," but something specific enough to do tomorrow.
All letters can be added to a public Wall of Places — a growing, community-built mosaic of the spots people love, across every continent.
The goal was simple: make environmental data feel personal, not preachy. Not a dashboard. Not a guilt trip. A letter from the ground you're standing on.
Demo
🔗 Live App
Code
How I Built It
The Data Pipeline (8 Free APIs, No Auth Keys Required*)
The backend is an Express server that orchestrates 8+ external APIs in parallel for every pin drop:
| Data Layer | Source | Auth |
|---|---|---|
| Climate trajectory 1950–2050 | Open-Meteo Climate API (CMIP6 downscaled) | None |
| Current weather | Open-Meteo Forecast | None |
| Air quality (AQI, PM2.5) | Open-Meteo Air Quality | None |
| Elevation | Open-Meteo Elevation | None |
| Marine conditions | Open-Meteo Marine | None |
| Species with photos | GBIF | None |
| Recent wildlife sightings | iNaturalist | None |
| Bird field recordings | xeno-canto | None |
| Nearby earthquakes | USGS Earthquake API | None |
| Place names & context | Nominatim (OSM) + Wikipedia REST | None |
| Letter generation | Mistral AI | API key* |
*Mistral is the only service requiring an API key. The app gracefully falls back to a data-driven template letter if the key isn't configured.
Architecture
React (Vite) ──▶ Express API ──▶ 8+ APIs in parallel
│
├── /api/letter/generate → orchestrates all data + Mistral
├── /api/wall → public letter gallery
├── /api/search → Nominatim geocoding
└── /api/reverse → reverse geocode pin drops
Key Technical Decisions
1. Every data source is wrapped with withFallback() — ocean pins, remote locations, and API timeouts never crash the experience. If species data is sparse, the radius widens automatically. If no bird recording exists, the audio panel gracefully says "the quiet is also part of my reply."
2. Grid-based caching — coordinates are rounded to a ~11 km grid, and results are cached for 24 hours to minimize redundant API calls and Mistral tokens.
3. The letter prompt is strictly data-grounded — Mistral receives structured JSON with real numbers (not prose), and the system prompt requires it to mention at least one actual species name and one real climate figure. No hallucinated facts.
4. Share as Image — letters can be exported as PNG via html-to-image, making them shareable on social media while preserving the editorial layout.
Frontend Stack
- React 18 with Vite for fast dev/build
- Leaflet + react-leaflet for the interactive map
- Recharts for the climate anomaly chart (1950→2050 area chart with baseline)
- Framer Motion for cinematic page transitions
- Lucide React for consistent iconography
- An editorial, warm-palette design (moss/earth/sky tones, serif for letters, sans for UI)
What Makes It Special
The loading experience says "the Earth is replying" — each step narrates what's happening ("Finding the nearest named ground," "Listening for a bird close enough to speak for the morning"). The result page layers a Wikipedia thumbnail, the letter in serif type, a temperature anomaly chart, species photo cards, an inline bird audio player, and live environmental signals — all from one pin drop.
The Wall of Places ships with 6 curated seed letters (Amazon Rainforest, Great Barrier Reef, a Brooklyn rooftop, a Tokyo park, Svalbard, a Nairobi suburb) so it never feels empty.

Top comments (0)