DEV Community

Swayam Kothekar
Swayam Kothekar

Posted on

WildCraft AI: Voice-Guided Wilderness Survival Whisperer & Backcountry Risk Engine

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

Most modern AI apps keep you glued to your desk, staring into a glowing rectangular screen. WildCraft AI does the exact opposite: it is an open-source, edge-ready outdoor intelligence companion engineered specifically to get you off the couch, into the backcountry, and touching real grass safely.

When you are deep in a pine forest, climbing an alpine ridge, or setting up camp at sunset, your hands are busy pitching tents, tying ridge-line knots, purifying stream water, or striking ferrocerium rods. Looking down at a phone screen is dangerous and impractical.

WildCraft AI transforms the wilderness experience through:

  1. Audio-First Bushcraft Mentor (Push-to-Talk Voice & Spoken Narration): Powered by open-weights Google Gemma and ElevenLabs, WildCraft speaks survival guides directly into your earbuds with concise, voice-guided steps (firecraft, shelter designs, knot diagrams, water purification). You can use push-to-talk voice dictation or tap a topic, then pocket your phone and let the spoken narration guide you without staring at a screen.
  2. Prior Labs TabPFN Survival Risk Engine: An in-field tabular foundation model that ingests live environmental telemetry (elevation, ambient temperature, relative humidity, wind speed) and trek exertion data to predict real-time hypothermia risk, heat stroke index, dehydration rates, and sweat loss.
  3. Offline-First Zero-Signal Architecture: Cell towers disappear the moment you enter deep canyons. WildCraft features a Dual-Mode architecture: cloud-powered when connected, seamlessly switching to on-device quantized models (local Ollama Gemma 2B/9B, browser speech synthesis, edge Open-Meteo cache, and calibrated physics heuristics) when off the grid.
  4. Field Manual & Plant Safety Scanner: Instant offline RAG lookup for edible vs. toxic flora, berries, and fungi with high-contrast safety badges.
  5. Private Backcountry Logbook: Device-isolated field journal backed by MongoDB Atlas with automatic local cache synchronization to record campsites, trail observations, and water sources.
  6. Outdoor High-Contrast Sunlight & Mobile UX: Tailored mobile design with custom address-bar permission guides for iOS Safari and Android Chrome, plus an outdoor sunlight mode for maximum visibility in glaring daytime sun.

Demo

Quick Interactive Tour

  1. Live GPS Environmental Lock: Grants real-time coordinates, elevation, and mountain barometric weather via Open-Meteo.
  2. Physiological Risk Simulation: Slide trek duration to 4.5 hours in sub-zero wind chills to watch TabPFN project hypothermia probability curves.
  3. Push-to-Talk Voice Whisperer: Press the microphone button or select a topic like "How do I build a Dakota fire hole?" to receive spoken step-by-step guidance.
  4. Logbook: Save waypoint coordinates and gear notes privately linked to your device ID.

Code

🌲 WildCraft AI

Edge-Ready Wilderness Survival Whisperer & Backcountry Physiological Risk Engine
🌐 Live Demo: https://wildcraft.swayamk.tech


📖 Overview

WildCraft AI is an intelligent backcountry survival and physiological risk assistant. It is designed with a dual-mode architecture: fully feature-complete when cloud-connected, yet capable of running standalone in disconnected, zero-signal wilderness environments through local on-device fallbacks.

📶 Dual-Mode Architecture & Offline Resilience

Feature ☁️ Connected Mode (Full Cloud) 📵 Offline / Edge Mode Offline Trade-offs & Requirements
Survival LLM Google Gemma 2 (9B) Cloud API Local Ollama (gemma3:1b / gemma:2b) Requires local Ollama daemon; smaller model parameter size
Risk Prediction Prior Labs TabPFN Foundation Model Calibrated physiological physics engine Mathematical heuristic formulas instead of full tabular transformer weights
Plant & Field RAG MongoDB Atlas Cloud Database Bundled local JSON catalog Queries static local manual (~8–50 entries); no remote catalog expansion
Voice Narration ElevenLabs HD Audio Stream Browser Web SpeechSynthesis
…

The full project is open-source under the MIT license:

  • Frontend: React 19, Vite, responsive mobile drawer, SVG voice controls, and glassmorphic outdoor design system.
  • Backend: FastAPI running on Python 3.11 with asynchronous endpoints for TabPFN inference, Gemma prompt orchestration, ElevenLabs audio streaming, and MongoDB Atlas.
  • Deployment: Render web service for backend orchestration and Vercel for client edge delivery.

How I Built It

WildCraft AI is constructed around an ensemble of open-source AI models and durable cloud architectures:

flowchart TD
    subgraph Client["Outdoor Client - React 19 and Vite"]
        UI["High-Contrast Outdoor UI"]
        MIC["Push-to-Talk Voice Input"]
        AUDIO["Spoken Audio Player"]
    end

    subgraph Backend["Render Production Backend - FastAPI"]
        API["FastAPI Edge Gateway"]
        AGENT["Gemma Survival Agent"]
        TABPFN_ENG["TabPFN Risk Predictor"]
        TOOLS["Atlas Store and Tool Hub"]
    end

    subgraph Intelligence["AI Models and Cloud Services"]
        GEMMA["Google Gemma 2B / 9B - Ollama or Cloud"]
        TABPFN["Prior Labs TabPFN Foundation Model"]
        ELEVEN["ElevenLabs Voice Synthesis"]
        ATLAS[("MongoDB Atlas - Logs and Survival Catalog")]
        SERP["SerpApi - Live Ranger Advisories"]
    end

    UI -->|"HTTPS / JSON"| API
    MIC -->|"Transcribed Voice"| API
    API --> AGENT
    API --> TABPFN_ENG
    API --> TOOLS

    AGENT -->|"Survival Prompts"| GEMMA
    AGENT -->|"Text to Narrate"| ELEVEN
    ELEVEN -->|"Audio Stream"| AUDIO

    TABPFN_ENG -->|"Physiological Vectors"| TABPFN
    TOOLS -->|"Field Journal and RAG"| ATLAS
    TOOLS -->|"Trail Alerts"| SERP

1. Google Gemma Open-Weight Model Agent

We built a survival agent harness (gemma_survival_agent.py) utilizing Google's Gemma open-weight model family (Gemma 2B / 9B). The prompt pipeline enforces strict survival-first constraints:

  • Strict brevity (under 120 words for audio synthesis compatibility).
  • Actionable, numbered step-by-step physical actions.
  • Automatic zero-signal fallback support through a local Ollama daemon (gemma3:1b or gemma:2b).

2. Prior Labs TabPFN (Tabular Foundation Model)

Wilderness survival risk modeling has non-linear tabular factors: clothing insulation ($clo$), wind chill ($km/h$), ascent elevation ($m$), and fluid deficit ($L$). We integrated Prior Labs TabPFN (tabpfn_survival.py), treating in-situ trail variables as tabular vectors. TabPFN generates calibrated probability scores for hypothermia, dehydration, and heat exhaustion within milliseconds.

3. Render Production Backend Runtime

Our FastAPI backend is deployed on Render using a native Python Web Service container. Render provides:

  • Automated continuous deployment directly from the main GitHub branch.
  • Secure environment management for model keys and Atlas credentials.
  • Zero-downtime health checking (/healthz) and production ASGI concurrency with uvicorn.
  • Ready compatibility for GPU Droplet acceleration when hosting full-parameter Gemma checkpoints.

4. ElevenLabs Neural Audio Streaming

Text output is immediately routed to the ElevenLabs API (elevenlabs_voice.py) using low-latency streaming. In disconnected offline mode, the frontend automatically falls back to the native browser window.speechSynthesis API.

5. MongoDB Atlas & Search Grounding

Backcountry waypoints, private trail notes, and safety catalogs are hosted in a MongoDB Atlas Cloud Cluster (atlas_survival_store.py). Real-time park ranger advisories and wildfire alerts are ground-checked via SerpApi.


Why Does Open Innovation Matter?

Open innovation is not just an ideological preference for WildCraft AI—it is a life-saving necessity.

  1. Closed APIs Die at the Trailhead: Proprietary cloud LLMs and closed AI assistants are fundamentally useless the moment you walk past the cell tower's reach. Open-weight models like Google Gemma and local foundation models like TabPFN can be downloaded, packaged, and run entirely offline on an edge laptop, phone, or Raspberry Pi in a hiker's backpack.
  2. Backcountry Data Sovereignty: Hikers should not have to upload their exact real-time GPS coordinates, emergency camp locations, and physiological vulnerabilities to proprietary surveillance silos. Open weights and local databases ensure total user privacy.
  3. Zero Marginal Cost for Safety: Wilderness safety advice should not be locked behind subscription paywalls or metered API tokens. Open-source models democratize safety intelligence for backpackers, park rangers, and youth scouts worldwide.

Prize Categories

We are entering the following partner categories:

  • 🚀 Best Use of Render ($200): Deployed the production FastAPI backend on Render, providing automated GitHub deployments, secure secret management, containerized Python 3.11 execution, and production reliability for real-time survival inference.
  • 🌲 Best Use of Google Gemma ($200): Leveraged Google's open-weight Gemma architecture for spoken bushcraft guidance, formatted specifically for audio listening and capable of edge offline execution via Ollama.
  • 📊 Best Use of Prior Labs TabPFN ($200): Deployed TabPFN as a tabular foundation model to compute physiological survival risk scores (hypothermia, heat exhaustion, dehydration) from environmental telemetry.
  • 🎙️ Best Use of ElevenLabs ($100): Implemented an audio-first "Touch Grass" interface with realistic, low-latency survival guide voice synthesis so hikers can navigate nature without staring at screens.
  • 🍃 Best Use of MongoDB Atlas ($100): Engineered cloud field journals and plant safety databases with private device partitioning and offline fallback persistence.
  • 🔍 Best Use of SerpApi ($100): Grounded trail warnings with real-time Google search indexing for live US Forest Service and National Park ranger updates.

Top comments (0)