๐ TrueEarth: Real-Time Global Event Intelligence
๐ Inspiration
TrueEarth emerged from recognizing a critical gap: during natural disasters or global emergencies, scattered data floods in from multiple sources โ but turning this raw data into timely, understandable intelligence is still hard. I wanted an AI-powered system that automates this process end-to-end, so organizations and the public can respond faster and smarter.
๐ What it does
TrueEarth is a global event intelligence platform that continuously collects, processes, and enriches data about:
- ๐ Earthquakes (USGS)
- ๐ฅ Wildfires (FIRMS)
- ๐ Historical disasters (EM-DAT)
It goes beyond raw numbers: by combining a real-time Retrieval Augmented Generation (RAG) pipeline with Googleโs Gemini models, TrueEarth explains whatโs happening, where, and why it matters โ all in clear language via an interactive web interface and an AI-powered climate assistant.
๐๏ธ How I built it
TrueEarth runs as a scalable, secure, microservices stack on Google Cloud Run, with zero manual server maintenance. The architecture includes:
โ Next.js Frontend โ An interactive web app with dynamic maps, event feeds, and an AI chat UI. โ Rust Backend โ A fast, lightweight REST API that serves the frontend, handles validation, and coordinates the AI pipeline. โ Go AI Orchestrator โ The core intelligence service, handling data fetching, embeddings, vector search, and real-time calls to Google Vertex AI for answers.
โ๏ธ Technical details
Generative Model:
gemini-2.5-flash-preview-05-20โ used for fast, cost-effective RAG completions and conversational context.Embedding Model:
text-embedding-004โ used to embed raw event descriptions and queries, enabling similarity searches when context is sparse.Vector Database: MongoDB Atlas with custom rTree spatial indexing for geospatial lookups (country-level) to supplement embedding-based similarity.
Deployment: All services containerized and deployed on Cloud Run, with IAM-secured connections.
Data Sources:
- USGS for global seismic activity
- FIRMS for wildfire detection (satellite-based)
- EM-DAT for historical disaster data
APIs: REST/JSON for internal orchestration (due to gRPC + Cloud Run challenges), with future support for pure gRPC once networking issues are resolved.
โก๏ธ Technical challenges and learnings
โ Country-Level Mapping: FIRMS and USGS lack explicit country fields. Early attempts at embedding-based geolocation were imprecise. I solved this with an rTree spatial index, enabling fast point-in-polygon tests to classify coordinates by country on the fly.
โ ๏ธ State-Level Precision: Achieving state/province-level detail with local-only geo shape data wasnโt feasible within resource constraints. I plan to integrate a managed GIS API to close this gap.
โ ๏ธ VPC Connectors & gRPC on Cloud Run: Despite following best practices, I hit issues with VPC Connector quotas, cold starts, and networking timeouts, which complicated secure internal gRPC calls. I mitigated this by using REST for now, with a clear migration path to fully private gRPC in the future.
๐ Accomplishments Iโm proud of
โ Designed and deployed a resilient, autoscaling, multi-language microservices system solo. โ Integrated Gemini Pro/Flash for real-time RAG with high accuracy and speed. โ Combined embedding similarity and geometric spatial search for robust country-level mapping. โ Maintained strong performance and security with IAM, Secret Manager, and best-practice containerization. โ Learned to adapt quickly to infrastructure limits โ rethinking networking design to ensure reliability.
๐ What I learned
- Cloud Runโs strengths and gotchas: When VPC Connectors and gRPC are involved, serverless trade-offs get real.
- LLM prompt engineering: Crafting clear system and response instructions to enforce domain boundaries (climate-only answers).
- Combining embeddings + geometry: Knowing when to trust vector similarity vs. needing hard geo boundaries.
- Cross-language orchestration: Rust for safe, blazing-fast HTTP; Go for concurrency and AI workflows.
๐ฎ Whatโs next for TrueEarth
โ More data feeds: Live weather alerts, social media signals, local government APIs. โ Deeper visualizations: Richer timelines, historical trend analysis, and user-controlled overlays. โ Custom user alerts: Real-time notifications based on user-defined event types and regions. โ State-level geo accuracy: Integrate high-resolution GIS shape files or managed geo APIs to answer state/province-level queries robustly. โ Streamlined gRPC: Switch to Cloud Runโs gRPC support when VPC and cold start issues are ironed out.
โ Summary
TrueEarth bridges fragmented global event data and actionable insights through a practical blend of cutting-edge LLMs, embeddings, and efficient spatial search โ all in a secure, cloud-native microservice architecture. Iโm committed to pushing it forward and making real-time global event awareness accessible to everyone.
Built With
- Google Vertex AI Gemini Pro/Flash
- text-embedding-004
- Next.js
- Rust (Axum)
- Go (gRPC + MongoDB)
- MongoDB Atlas + rTree
- Google Cloud Run
- Google Secret Manager, IAM
Log in or sign up for Devpost to join the conversation.