DEV Community

Pallavi
Pallavi

Posted on

WingLog

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

What I Built

WingLog is a mobile-first bird watching journal that runs entirely in your browser no backend, no cloud, no API keys. Take a photo of a bird on the trail, drop it into WingLog, and a local AI vision model (LLaVA, running via Ollama) identifies the species, fills in the latin name, writes a field description, and saves the sighting to your life list.

The whole thing is a single HTML file. Open it once, and it works forever even with airplane mode on.

Code

How I Built It

The Idea
The best birding spots have no signal. Every closed AI API is useless there.

So I built WingLog — snap a photo of a bird, drop it in, get an ID in 5 seconds. No cloud, no API key, no internet. Single HTML file. Works forever offline.

The Stack
Ollama Runs open-weight models locally via a simple REST API
LLaVA (7B) Vision model that looks at images and describes what it sees
Vanilla HTML/CSS/JS Zero build step — double-click and it works
localStorage All data stays on your device
How the AI ID Works
javascript

// 1. Photo → base64
const photob64 = dataUrl.split(',')[1];
// 2. Send to local Ollama
const resp = await fetch('http://localhost:11434/api/generate', {
method: 'POST',
body: JSON.stringify({
model: 'llava',
prompt: 'Identify this bird. Return JSON: {"species":"...","latin":"...","confidence":"...","description":"..."}',
images: [photob64], // never leaves your machine
stream: false,
format: 'json' // forces structured output — game changer
})
});
// 3. Auto-fill the form
const result = JSON.parse((await resp.json()).response);
document.getElementById('species-input').value = result.species;
The key trick: format: "json" in the Ollama request. Without it you're parsing markdown. With it, the output is clean JSON every time.

The One Gotcha
If Ollama blocks your browser request, run it with:

`bash

OLLAMA_ORIGINS=* ollama serve`
That's the #1 setup issue. I put a step-by-step guide inside the app's modal so users don't have to Google it.

Why Open-Source AI Made This Better
A closed API would have made this worse — not just more expensive:

No signal on the trail → closed API fails completely
Photos go to a server → privacy problem for sensitive habitats
Usage costs → I'd have to hide the AI behind limits
Ollama + LLaVA → offline, private, free, swappable

What Surprised Me!!
LLaVA is genuinely good at birds. It nailed a Peregrine Falcon in flight and a Ruby-throated Hummingbird silhouette. It failed on a blurry sparrow — which is fair, I couldn't ID it either.

Why Does Open Innovation Matter?

Open innovation mattered here because the use case required it. An AI that only works when you have internet is useless on the trail. An AI that sends your photos to a server is a privacy problem in the field. LLaVA on Ollama is offline, private, free, and swappable — closed AI is none of those things. This isn't "open-source as philosophy." It's open-source as the only technically correct choice for this problem.

Top comments (0)