This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
πΏ NatureLeft β The Offline Natural Horizon Clock & Biophilic Scavenger
"Your terminal will still be back tomorrow. This specific warm amber horizon light will not."
π What I Built
As software engineers, designers, and digital builders, we routinely spend 10 to 14 hours every single day bathing our retinas in artificial, high-energy visible (HEV) blue light from liquid crystal displays. Our circadian biology degrades, screen fatigue accumulates, and we miss the single most restorative daily phenomenon: natural sunlight, golden hour, and twilight.
NatureLeft is a high-end, Silicon Valley-grade anti-screen intervention disguised as a luxury solar horology timepiece and tactical outdoor scavenger directive engine.
π How It Works & Gets People Off Screens:
-
Mathematical Solar Horizon Engine: Using pure spherical trigonometry (via the open-source
astrallibrary), NatureLeft computes exact sunrise, solar noon, golden hour, sunset, and blue hour (civil twilight) coordinates right on your device. -
Anti-Screen AI Directive Core: It triggers tiny open-weight models (like
phi3:miniorgemma:2bvia local Ollama) to generate urgent, witty, poetic, or aggressive outdoor scavenger missions tailored to the remaining daylight minutes. -
Biophilic Photometer & Circadian HUD: Displays an estimated natural lux rating (e.g.,
~75,000 Luxat midday down to~1,800 Luxat golden hour) contrasted against artificial monitor glare (~250-350 Lux), showing when natural melatonin pathways begin waking up. - "I Touched Grass β Log Escape": A pulsing primary action button that triggers a celebratory multi-cannon confetti explosion, synthesized pentatonic bell chimes (built directly into the browser via Web Audio APIβzero external audio files needed), increments your outdoor streak, and logs your verified escapes into a local JSON ledger.
- Interactive Time-Travel Sandbox Slider: An interactive 24-hour scrubber at the bottom allowing judges and users to drag between Dawn, Solar Noon, Golden Hour, and Night Curfew to watch all lighting and directives adapt in real time.
π₯ Demo
- π Live Deployed App (Streamlit Community Cloud): https://natureleft-vbekgfcd5euhlxph2waj3x.streamlit.app/
πΈ Visual Highlights:
- Luxury Astronomical Dial: Dual-track SVG solar ring with an orbiting sun marker that physically traces the celestial perimeter throughout the day.
-
Dynamic Ambient Atelier Mesh: The deep obsidian background (
#060911) dynamically shifts between Golden Amber & Coral at dusk, Electric Cobalt during Blue Hour, and Obsidian Starlight during Screen Curfew. - Tactical Scavenger Cards: Concrete sensory targets outside (e.g., "Warm amber light bouncing off east-facing brickwork") and immediate physical actions (e.g., "Step away from keyboard, walk 400m westward before solar elevation hits 0Β°").
π» Code
- GitHub Repository: https://github.com/AABHAYRANJANPANDEY/NatureLeft
Project Architecture:
NatureLeft/
βββ main.py # FastAPI server with REST endpoints & static serving
βββ app.py # Streamlit application for 1-click cloud deployment
βββ requirements.txt # Pinned open-source dependencies
βββ utils/
β βββ astronomy.py # Pure Python solar & civil twilight computations
β βββ ai_generator.py # Local Ollama client + resilient zero-latency neural fallback
βββ templates/
β βββ index.html # Silicon Valley "Biophilic Atelier" dark SPA dashboard
βββ data/
βββ streaks.json # 100% on-device persistent escape ledger
π οΈ How I Built It
NatureLeft was engineered from the ground up around open-source AI and offline-first principles:
-
Local Open-Weight Inference (Ollama):
- Integrates with local open-weight models (
phi3:mini,gemma:2b,llama3:8b) via Ollama (http://localhost:11434). - Crafts a strict persona: The Anti-Screen Biophilic Drill Sergeant / Witty Curator.
- Includes an instant Zero-Latency Neural Fallback Engine that generates witty, randomized, hyper-targeted directives in under 15ms if Ollama is not installed or offlineβguaranteeing 100% uptime for hackathon judges!
- Integrates with local open-weight models (
-
Open-Source Astronomical Modeling:
- Powered by the
astralPython library, calculating exact solar elevation angles, azimuth, civil dusk, and golden hour windows from local coordinates.
- Powered by the
-
Frontend Design System:
- Handcrafted "Biophilic Atelier" dark aesthetic (
#060911palette). - Tailwind CSS, Lucide icons, Canvas Confetti.
- Web Audio API synthesizer generating clean, harmonic pentatonic chimes with zero third-party audio assets.
- Handcrafted "Biophilic Atelier" dark aesthetic (
-
Dual Running Modes:
- FastAPI + Vanilla JS: Ultimate micro-interaction performance and horology dial animations.
-
Streamlit (
app.py): Optimized for instant, free deployment on Streamlit Community Cloud.
π Why Does Open Innovation Matter?
1. True Wellness Cannot Require Data Extraction
An application meant to rescue you from digital fatigue should not harvest your GPS location, spy on your daily schedule, or phone home to closed cloud servers. Because NatureLeft is built with open-source AI and local computing:
- Zero API keys required.
- Zero telemetry or trackers.
- 100% private and on-device.
2. Zero-Cost Longevity
Closed LLM APIs break when tokens run out, credit cards expire, or pricing tiers change. By anchoring NatureLeft to tiny open-weight models (like Microsoft's phi3:mini or Google's gemma:2b), the software will run just as smoothly 10 years from now on an offline laptop in a remote cabin as it does today.
3. Accessible at the Edge
Open innovation enables AI to run on edge hardwareβlaptops with no WiFi connection in a national park, low-power single-board computers, or home servers. Nature is offline; our nature tools should be too.
π Prize Categories
- Grand Prize / Challenge Theme: Week 1: Touch Grass
-
Best Open-Weight Model Implementation: (Local Ollama
phi3:mini/gemma:2b+ Zero-Latency Offline Fallback) - Best Product UI/UX & Design: (Biophilic Atelier Dark Mode & Horology Solar Dial)
Step away from your terminal, close your IDE, and go Touch Grass today! πΏ
Top comments (0)