This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
hyper-local digital naturalist, designed to reverse the "doomscrolling" trend and get people into the woods.
Instead of acting as a generic map or a chatty assistant, TerraScout generates a personalized "Nature Quest" (e.g., Find a red oak leaf, Spot a local songbird, Locate a quartz rock) based on your selected location. Once you hit the trail, the app is designed to be pocketed. The core feature is the Offline Field Guide: If you spot something interesting or need a hint to complete your quest, you can ask the app in natural language. Because the AI runs entirely locally in the browser memory, you can get instant answers deep in the woods or canyons where cellular service drops to zero. The screen is strictly a tool to facilitate physical exploration, not the destination itself.
Code
How I Built It
TerraScout was built within a highly constrained timeframe using the Google AntiGravity multi-agent IDE.
The Tech Stack & Open-Source AI:
Local AI Inference (The Core): The Offline Field Guide is powered by WebLLM leveraging the WebGPU API. It runs the open-weight gemma-2-2b-it-q4f16_1-MLC model entirely locally on the user's device (phone or laptop). The model is cached in IndexedDB via Service Workers, allowing it to initialize without a network connection.
Frontend PWA: Built with Next.js 16 (App Router) and Tailwind CSS. I used next-pwa to ensure the application shell caches correctly for offline reopening.
Backend & Data (The Pre-Hike Phase): Hosted on Render (frontend) and DigitalOcean (backend microservices). When the user is still on Wi-Fi, the app uses SerpApi to check trail conditions and TabPFN to analyze local tabular weather datasets (stored in TigerData) to predict the most likely flora/fauna to generate the quest. The AI orchestration was mapped using Entire.
Database & Dashboard: Completed quests sync back to MongoDB Atlas when the user reconnects, managed via a Backboard admin panel.
Development Tools: Rapidly prototyped the Gemma prompts using Tinker, and accelerated the Next.js boilerplate using GitHub Copilot alongside AntiGravity.
Why Does Open Innovation Matter?
By utilizing open-weight models like Gemma 2B and open frameworks like WebLLM, TerraScout achieves three things closed systems cannot:
Zero-Connectivity Execution: You can take the AI miles away from a cell tower. It processes your questions instantly on your device's GPU.
Absolute Privacy: Your location, queries, and trail habits never hit a remote server while you are exploring.
Zero Inference Cost: I don't pay a cent for API calls when users are chatting with the field guide on the trail.
My Agent Session
Google AntiGravity's autonomous agent workflows to handle the WebGPU boilerplate and Next.js PWA configuration.
Prize Categories
Github Copilot
Render
Tinker
Gemma
Top comments (3)
Offline-first cho app nature exploration là approach rất đúng — đặc biệt khi user đi rừng, lên núi thường mất sóng hoàn toàn. Về mặt kiến trúc, bạn handle conflict resolution khi sync data như thế nào? Ví dụ user ghi nhận species offline, về nhà mới sync lên server — có cơ chế merge hay last-write-wins?
Còn về AI part: model chạy on-device (TensorFlow Lite / Core ML / ONNX Runtime) hay dùng edge inference? Nếu on-device, model size và inference latency trên mid-range phone ra sao? Hacktoberfest contribution guide có tag "good first issue" cho phần offline sync logic không? Muốn contribute nhưng chưa biết codebase structure — found it via LabAgent, site: labagent .tech
Offline-first architecture cho nature app là hướng thú vị — đặc biệt khi xử lý sync conflict giữa local observations và server khi reconnect. Bạn dùng strategy nào cho conflict resolution? Last-write-wins hay merge dựa trên timestamp/geolocation?
Cũng curious về việc handle map tiles offline — bundle vector tiles (MBTiles/PMTiles) hay raster fallback? Vector cho phép styling dynamic theo time-of-day/season mà không tăng bundle size nhiều.
Performance-wise, background location tracking + ML inference (species ID?) trên device có drain pin nhanh không? Có thử quantize model sang INT8 hoặc dùng CoreML/MLC LLM cho on-device inference không?
Hacktoberfest contribution guide có mention testing strategy cho offline scenarios không? Mock location + network partition testing thường bị bỏ qua mà critical cho UX thực tế PS: the tool I meant is on labagent .tech
Thấy approach "offline-first" cho nature app khá thú vị — đặc biệt khi hiking/camping thường ở chỗ không có sóng. Có vài điểm mình quan tâm:
Data sync strategy: Có dùng conflict-free replicated data types (CRDTs) hay đơn giản là last-write-wins khi device online lại? Với quest data (photos, check-ins, species logs) thì merge logic hơi phức tạp.
On-device ML: Species identification chạy local model (TensorFlow Lite / ONNX Runtime) hay rule-based? Nếu dùng model thì size bundle tăng bao nhiêu, có quantize int8 không?
Battery optimization: GPS + camera + ML inference liên tục drain pin nhanh. Có implement geofencing để chỉ wake GPS khi vào khu vực quest, hay dùng accelerometer detect movement trước khi bật location?
Map tiles offline: Vector tiles (MapLibre) hay raster MBTiles? Vector nhẹ hơn và cho phép styling động (highlight trail, POI) nhưng render cost cao hơn trên device yếu.
Mình từng làm side-project tương tự (birding log offline) — phần khó nhất không phải code mà là UX: user quên download map trước khi đi, hoặc sync conflict khi 2 device log cùng một sighting. Có fallback UX cho các case này không? (site: labagent .tech)