This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
☀️ Daylight — Less scrolling. More outside.
Daylight helps you turn a spare 10, 20, or 30 minutes into an outdoor walking break.
It’s for anyone who spends too much time at a desk and needs a little encouragement to step outside. Describe how you’re feeling, choose your time and walking intensity, and Daylight uses an open model to match you with a suitable walking session.
For example:
“I've been studying all day and need some fresh air.”
Once you have your plan, start the timer and put your phone away. When you return, confirm your outdoor minutes and save your break.
Daylight includes:
🌿 AI matching with curated walking sessions.
⏱️ A timer that catches up when you return to the page.
📒 An outdoor journal and today’s total minutes.
💾 Browser storage to restore unfinished breaks.
☀️ An optional local UV forecast check.
The goal is to make the screen the shortest part of the experience.
Daylight records self-confirmed outdoor time, including time in shade. It doesn’t measure sunlight exposure or vitamin D.
Demo
Try it here: trackdaylight.netlify.app
Enter what you need from a break, choose your time and intensity, and select Plan my break.
The first match may take a little longer while the AI model downloads. After that, try starting a break, refreshing the page, and returning to your timer.
Code
GitHub repository: fabs-pe/daylight
The README includes local setup instructions, how the matching works, and details about browser storage and location use.
How I Built It
built Daylight with React and Vite, styled it with CSS, and deployed it on Netlify.
The AI runs in the browser using Transformers.js and the open-weight Xenova/all-MiniLM-L6-v2 embedding model.
Here’s how the matching works:
Daylight filters its curated walking sessions by the selected intensity.
The model converts your request and the session descriptions into embeddings.
Similarity scores identify the closest match.
Your selected duration determines the length of the walking plan.
The model interprets the meaning of your request; the walking instructions come from a curated collection. It doesn’t generate exercise advice.
Inference runs in a Web Worker using WebAssembly and a quantized model. This keeps the AI processing separate from the main interface.
The timer uses timestamps so it can catch up after you return to the page. The journal and unfinished break are saved in localStorage.
For the UV card, Daylight requests location permission when you press the check button, then sends rounded coordinates to Open-Meteo. It displays the forecast daily maximum UV index, rather than a live reading or personal exposure measurement.
I’m a junior developer, and I wanted to build this myself as practice. Working through state, effects, storage, workers, model loading, and deployment taught me a lot more than simply getting a finished app.
Why Does Open Innovation Matter?
Open AI makes browser-based matching practical for this project.
Your request stays on your device for inference. Daylight processes what you write in your browser rather than sending it to a hosted AI inference service.
There’s no AI API key or paid inference service to maintain. The model runs on the visitor’s device, which lets me deploy the app as a static site without a dedicated AI backend.
I can inspect and change the matching behaviour. I can improve the session descriptions, add new walking options, or experiment with another compatible model. The curated plans also give me control over the guidance people receive.
A closed API could provide matching, but it would introduce remote inference, credentials, and an ongoing service dependency. The open approach lets this small project do its core AI work directly in the browser.
It isn’t completely offline: the app and model need an initial download, and the UV forecast needs internet access. But the matching itself runs locally once the model is loaded.
My favourite part is that the AI has a small, useful job: help someone choose a break, then let them get on with being outside. 🌿
Top comments (1)
tr.ee/dev-to