This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
SlowSleep is a wind-down companion for the few minutes between finishing the day and falling asleep.
It gives you two simple options:
- Generate a gentle bedtime story based on your mood, setting, and available time.
- Play a browser-generated ambient soundscape without downloading audio files. The story flow lets you choose how you are arriving — peaceful, worn out, restless, or hopeful — then select a place such as a moonlit forest, rainy cabin, quiet ocean, or cloud garden. The soundscape flow includes three room tones:
- Rain hush
- Night air
- Warm room The goal is intentionally small: remove the effort of deciding what to listen to, what to read, or how to start winding down.
Demo
Try SlowSleep here:
Open the live demo (https://slowsleep.onrender.com/)
To use the soundscape:
- Open Tonight’s ritual.
- Select Soundscape.
- Choose a room tone.
- Press Play soundscape.
- Adjust the volume slider if needed. The sound is generated directly in the browser using the Web Audio API.
Code
View the SlowSleep source code on GitHub
How I Built It
SlowSleep is built with React, Vite, and a small Node server.
The project has two separate creative paths:
- AI bedtime stories The browser sends the selected mood, place, duration, and optional name to a local /api/story endpoint. The server then:
- Validates the incoming values.
- Builds a calm bedtime-story prompt.
- Calls OpenRouter using a server-side API key.
- Limits the response length.
- Applies a timeout and basic rate limiting.
Returns a friendly fallback if the provider is unavailable.
The OpenRouter key is never placed in the frontend, localStorage, or the browser bundle.
The deployed version is configured to use a Gemma model through OpenRouter. The model can be swapped through the server-side OPENROUTER_MODEL environment variable without changing the UI.Local ambient soundscapes
The soundscape does not rely on an audio file or an external sound service.
It uses the browser's Web Audio API to combine:Low sine-wave tones.
Slow frequency drift.
Filtered generated noise.
A soft gain envelope.
Three selectable sound presets.
A user-controlled volume level.
This means the sound stays inside the browser tab and works without sending audio data to a server.
Why Does Open Innovation Matter?
Open innovation made SlowSleep more flexible and more honest about its tradeoffs.
Instead of tying the project to one fixed model or one proprietary interface, the story engine is configured through a model environment variable. That makes it possible to experiment with different open-weight models, compare quality, and eventually support local inference without redesigning the product.
The project also keeps the local parts genuinely local:
- Ambient audio is generated in the browser.
- The built-in demo story works without OpenRouter.
- The API key remains server-side.
- The model provider can be changed without rewriting the frontend. A closed API could have produced a story quickly, but the open model approach gives the project more control over model choice, deployment, cost, and future local inference.
My Agent Session
The Lazy Payoff
SlowSleep saves a small amount of effort at exactly the moment when effort feels expensive.
Instead of opening another app, searching for sleep sounds, writing a prompt, or deciding what kind of story would feel right, the user can make a few quiet selections and press one button.
The experience is designed to do less:
- Less setup.
- Less decision-making.
- Less tracking.
- Less stimulation.
- Less pressure to complete another task. That is the whole idea behind “slow and steady”: let the software carry the small decisions so the person can stop carrying them.
Prize Categories
- Best Use of Render — SlowSleep is deployed as a full Node application on Render, serving both the React frontend and the /api/story backend.
- Best Use of Gemma — The story-generation model is configured through OpenRouter using Gemma.
Top comments (0)