DEV Community

Mohit
Mohit

Posted on

NatureQuest — Anti-Retention Outdoor Companion Powered by Local Qwen2.5

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

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


What I Built

NatureQuest is a local-first outdoor adventure companion that turns a few free minutes into an offline nature mission.

Most applications aim to maximize screen retention. NatureQuest does the exact opposite: it functions as anti-retention software. It uses a local open-weight AI model to generate structured, safety-conscious outdoor micro-adventures, then prompts the user to put down their screen and step outside.

Key Features

  • Local AI Engine: Powered locally by Ollama running the qwen2.5-coder:7b model on localhost:11434.
  • Custom Mission Planner: Generates personalized mission checklists based on time available, weather conditions, and surroundings.
  • Leave-No-Trace Guardrails: System prompts actively enforce safety rules—no foraging unknown plants, disturbing wildlife, or trespassing.
  • In-Browser Nature Journal: A private space where users record observations, saved directly to browser localStorage.

Demo and Code

Generated Mission Preview

How NatureQuest Works

  1. The user selects available time (e.g., 20 mins) and surroundings in the UI.
  2. The Next.js API route (/api/plan/route.js) constructs a prompt enforcing structure and safety rules, sending it to Ollama on localhost:11434.
  3. qwen2.5-coder:7b processes the request locally and returns structured JSON with mission tasks and safety reminders.
  4. The client renders an interactive Field Guide checklist.
  5. The user completes the activity offline and logs a brief reflection in their private journal upon returning.

javascript
// Local prompt execution via Ollama daemon
const response = await fetch('[http://127.0.0.1:11434/api/generate](http://127.0.0.1:11434/api/generate)', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    model: 'qwen2.5-coder:7b',
    prompt: `<|im_start|>system\n${systemPrompt}<|im_end|>\n<|im_start|>user\n${userPrompt}<|im_end|>\n<|im_start|>assistant\n`,
    stream: false,
    format: 'json',
  }),
});
Enter fullscreen mode Exit fullscreen mode

Top comments (0)