ZenSloth: An Offline-First Bedtime Companion Built for the Art of Doing Nothing
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady In celebration of International Sloth Day and the Slow and Steady theme, I built ZenSloth — a private, offline-first bedtime sleep companion and ambient narrative generator that invites you to slow down, cons
erve your energy, and do absolutely nothing. Modern bedtime apps and AI tools are full of stimulation: subscription paywalls, notifications, cloud tracking, dopamine loops, and chatbots trying to solve problems. ZenSloth does the exact opposite. Channeling the unhurried spirit of a sloth, it creates a calming, low-stimulation cocoon for your mind: 🦥 Unrushed Ambient Narratives: Generates calming, low-stimulation bedtime stories and mindful meditations tailored to 4 serene archetypes (The Sloth Sanctuary, Ancient Moss Forest, Rainy Cedar Cabin, and Velvet Twilight).
🌊 Procedural Soundscape Synthesizer: Four ambient channels (Deep Brown Noise, Gentle Rain, Soft Wind, and Warm Hearth) synthesized 100% on the fly in the browser using the Web Audio API — no gigabytes of looping audio files or buffering. 🫁 4-7-8 Sloth Breathing Guide: A gentle pulsing orb with a warm amber glow guiding a 4-second inhale, 7-second hold, and 8-second exhale to trigger the body's natural relaxation response. 🔒 100% Local & Private: Powered by local open-weight inference with Ollama. No personal sleep notes or bedtime thoughts ever leave your machine.
ZenSloth lets you be as lazy as possible: pick a mood, tap once, close your eyes, and drift off to sleep. ZenSloth is an offline-first companion designed to run privately and reliably on your own machine without third-party cloud tracking. Clone the repository and spin up the containers: git clone https://github.com/AryanMohan818/ZenSloth.git cd ZenSloth docker compose up -d Pull the lightweight open-weight model: docker exec -it zensloth-ollama ollama pull qwen2.5:1.5b Open http://localhost:3000 in your browser, lay back, and enjoy your wind-down session. / ZenSloth This is a Next.js project bootstrapped with create-next-app.
Getting Started First, run the development server: npm run dev # or yarn dev # or pnpm dev # or bun dev Open http://localhost:3000 with your browser to see the result. You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file. This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Learn More To learn more about Next.js, take a look at the following resources: Next.js Documentation - learn about Next.js features and API. Learn Next.js - an interactive Next.js tutorial. You can check out the Next.js GitHub repository - your feedback and contributions are welcome! Deploy on Vercel The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more… View on GitHub ZenSloth is built entirely around an open-source, local-first stack designed for calm aesthetics, zero network latency, and complete privacy: qwen2.5:1.5b) Bedtime apps shouldn't depend on cloud API rate limits, subscription keys, or internet connectivity. ZenSloth uses Ollama running lightweight open-weight models (defaulting to qwen2.5:1.5b). Low-Stimulation Prompt Engineering: The system prompt enforces strict calming narrative rules: short 2–3 sentence paragraphs, sensory-rich textures, zero cliffhangers, and natural drowsiness pacing (250–350 words). Edge Streaming: The Next.js Route Handler (/api/generate) leverages ReadableStream to stream tokens directly from Ollama to the browser in real-time, giving listeners an immediate, flowing experience without waiting for full generation.
Instead of bundling heavy MP3 assets or streaming audio over Wi-Fi, ZenSloth includes a custom procedural audio engine built on the native Web Audio API: Brown Noise: Continuous noise filtered through a lowpass biquad filter at 400Hz to mask room sounds. Rain: Pink noise algorithm passing through a 1000Hz filter. Wind: Low-frequency bandpass-filtered noise with organic gain modulation. Fireplace Hearth: Brown noise interspersed with algorithmic crackle and pop bursts.
Next.js 16 (App Router) & React 19: Built with standalone output and containerized with Docker. Tailwind CSS v4: Designed with an ultra-dark palette (#07080b), soft amber/stone hues, and blur filters to minimize blue light before sleep. Docker Compose: Orchestrates both the frontend web app and Ollama service with persistent model caching. Your bedroom is your most personal, private space.
When you tell a sleep app about the anxiety keeping you awake, your racing thoughts, or your bedtime routine, that data shouldn't be packaged into an advertising profile or logged on proprietary cloud servers. Open innovation made ZenSloth possible in ways closed APIs never could: Complete Privacy & Offline Capability: By using open-weight models with Ollama, ZenSloth can run on an airplane, in a rustic cabin off the grid, or with Wi-Fi completely turned off. Closed AI models break the moment your internet disconnects. Freedom from Subscriptions: Closed sleep apps frequently lock soundscapes and stories behind expensive annual paywalls.
With open-weight AI and browser-synthesized audio, this app belongs to the user forever. Low-Resource Accessibility: Open-weight models like qwen2.5:1.5b run smoothly on standard laptops and budget mini-PCs without needing expensive enterprise GPUs. Building bedtime routines usually feels like work: searching for a meditation podcast, adjusting white noise playlists, skipping mid-roll ads, or staring at bright screens trying to decide what to listen to. ZenSloth reduces all of that friction to zero effort: One click sets the scene, balances the ambient rain, wind, and brown noise, starts the 4-7-8 breathing guide, and streams an unhurried, gentle bedtime story.
Time & Effort Saved: 15–20 minutes of nighttime screen scrolling replaced by instant relaxation. Tested this week for actual bedtime wind-downs: no ads, no cliffhangers, and zero blue light overload. Overall Winner (Hacktoberfest Open-Source AI Challenge: Week 3 - Slow and Steady) Best Use of Gemma (Powered locally via Ollama using Google's open-weight gemma2:2b)
Key Takeaways
- •Modern bedtime apps and AI tools are full of stimulation: subscription paywalls, notifications, cloud tracking, dopamine loops, and chatbots trying to solve problems.
- •This story was reported by Dev.to, covering developments in the dev space.
- •AI advancements continue to reshape industries — read the full article on Dev.to for complete coverage.
📖 Continue reading the full article:
Read Full Article on Dev.to →


