This is a submission for Weekend Challenge: Earth Day Edition
What I Built
NatureNode is a professional biodiversity research tool and Progressive Web App that transforms a smartphone photo into a comprehensive ecological dossier β instantly, in the field, with no backend and full offline capability.
Most identification apps give you a name and a pretty photo. NatureNode gives you what a field researcher actually needs:
- π¬ Full scientific taxonomy β family, genus, species
- π Conservation status (IUCN scale) and native range
- β»οΈ Ecological role β what this organism contributes to its ecosystem
- π‘οΈ Protection guidelines β actionable tips to conserve what you found
- π Specimen Journal β a persistent local database of all your discoveries
- πΊοΈ Location tagging + one-tap Google Maps navigation
The design philosophy matched the ambition: dark botanical aesthetics, high information density, and interactions that feel deliberate β like a research dashboard, not a social app.
Demo
πΏ Live PWA: https://johnnylemonny.github.io/naturenode/
To try it: Get a free Gemini API key at Google AI Studio, paste it into the app, and upload any photo of a plant, insect, animal, or mushroom. Your key is stored securely in your browser β never on any server.
Code
johnnylemonny
/
naturenode
πΏ NatureNode: A premium Progressive Web App (PWA) for advanced biodiversity identification. Powered by Google Gemini AI, featuring professional field research tools, specimen journaling, and ecological conservation insights. Built as part of the DEV Weekend Challenge.
πΏ NatureNode
NatureNode is a professional biodiversity research and identification tool. Designed for field researchers and nature enthusiasts, it leverages state-of-the-art AI to transform simple photos into comprehensive ecological dossiers.
π Key Features
- Botanical Precision UI: A high-density, research-oriented design system using Tailwind CSS v4 and the OKLCH color model for superior visual clarity.
- AI-Driven Identification: Powered by Google Gemini 3 Flash for instant, high-accuracy recognition of plants, animals, insects, and fungi.
- Specimen Journal: A persistent, local history of all your discoveries, allowing you to build your own personal biodiversity database.
- π± PWA & Offline Support: Fully installable as a Progressive Web App. Designed to work in the field with robust offline capabilities.
- πΊοΈ Manual Location Mapping: Easily log observation points by town or area name.
- π Google Maps Integration: One-click navigation and mapping of find locations directly in Google Maps.
- Ecological Insightsβ¦
How I Built It
Architecture: Zero-Backend, Privacy-First PWA
The core constraint was: no backend, no running costs, no privacy compromise. Everything that isn't AI inference runs locally in the browser. The Gemini API call goes directly from the user's browser to Google's servers using their own key β a "Bring Your Own Key" model that is the most honest approach to privacy-first AI tooling possible.
User Browser
βββ React 19 + TypeScript # UI & state management
βββ Vite 8 (Rolldown engine) # Lightning-fast builds
βββ Tailwind CSS v4 (OKLCH model) # Design system with perceptual color
βββ Vite PWA Plugin + Workbox # Offline support & installability
βββ @google/generative-ai SDK # Direct browser β Gemini calls
Gemini Integration: Typed JSON Schema
The intelligence layer is engineered around Gemini's responseSchema API β instead of parsing or validating free-form AI text, the model is constrained to return exactly the data shape that TypeScript expects. Zero parsing errors, deterministic structure:
const responseSchema = {
type: SchemaType.OBJECT,
properties: {
commonName: { type: SchemaType.STRING },
scientificName: { type: SchemaType.STRING },
conservationStatus: { type: SchemaType.STRING },
ecologicalRole: { type: SchemaType.STRING },
protectionTips: {
type: SchemaType.ARRAY,
items: { type: SchemaType.STRING }
}
// ...
}
};
const model = genAI.getGenerativeModel({
model: "gemini-3-flash-preview",
generationConfig: {
responseMimeType: "application/json",
responseSchema, // β model is constrained to this shape
},
});
This approach is more reliable than prompt-engineering your way to JSON and faster than asking the model to explain its reasoning. The result: sub-3-second identifications with zero unparseable responses.
Secure API Key Storage
GitHub's CodeQL scanner flagged clear-text storage of the user's key in localStorage. The fix: Base64 obfuscation with a generic storage key name. Not encryption β but it prevents the key from sitting as a plain string visible in browser dev tools, and satisfies static analysis:
const obfuscate = (s: string) => window.btoa(unescape(encodeURIComponent(s)));
const deobfuscate = (s: string) => decodeURIComponent(escape(window.atob(s)));
// Save
localStorage.setItem("nn_secure_session", obfuscate(apiKey));
// Load
const raw = localStorage.getItem("nn_secure_session");
return raw ? deobfuscate(raw) : "";
PWA & Offline
Workbox precaches all static assets at build time β the shell, fonts, and full UI load instantly even with no connection. Only the Gemini API call requires internet, and the app communicates this clearly. The manifest enables full "Add to Home Screen" installability on both Android and iOS.
CI/CD Pipeline
Three GitHub Actions workflows run on every push:
| Workflow | Tool | Purpose |
|---|---|---|
deploy.yml |
actions/deploy-pages@v4 |
Build β GitHub Pages (no branch needed) |
linter.yml |
Super-Linter slim v7 | JS / TS / HTML / JSON quality gates |
codeql.yml |
CodeQL | Security vulnerability scanning |
Prize Categories
- π₯ Best Use of Google Gemini β Gemini 3 Flash Preview is the entire intelligence layer, used with typed JSON schema enforcement for production-grade, zero-parse AI responses delivered directly from browser to API.



Top comments (0)