DEV Community

Alit Indrawan
Alit Indrawan

Posted on

LazyLore: The Zero Effort AI Bedtime Storyteller ๐Ÿ’ค

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission ๐Ÿฆฅ

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

LazyLore is a zero-effort, AI-powered bedtime story generator that reads stories aloud โ€” all from a single browser tab.

Type a prompt like "A sleepy bear drifting down a quiet river", tap Create Story, and a custom 3-paragraph bedtime story is generated by Groq and immediately read aloud through your browser using the Web Speech API โ€” in a slow, deep, calming voice tuned for sleep.

Key features:

๐ŸŒ™ One-tap story generation via Groq (open-weight LLM)
๐Ÿ”Š Instant text-to-speech playback (pitch 0.8, rate 0.85 โ€” engineered for drowsiness)
๐Ÿ‡ฌ๐Ÿ‡ง / ๐Ÿ‡ฎ๐Ÿ‡ฉ English and Indonesian language support
๐Ÿ“š Local story history โ€” replay favorites without re-generating
๐ŸŽจ Deep dark UI designed to not blind you at midnight

Demo

Code

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
Enter fullscreen mode Exit fullscreen mode

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:

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โ€ฆ

How I Built It

LazyLore is built with Next.js 14 (App Router), Tailwind CSS, and TypeScript.

The backend is a single API route that sends the user's prompt to Groq (open-weight LLM) and returns a plain-text bedtime story. The system prompt explicitly bans Markdown โ€” because hearing "asterisk" read aloud at midnight is not relaxing.

On the frontend, the story is immediately passed to the browser's built-in Web Speech API with pitch: 0.8 and rate: 0.85 for a slow, deep delivery. No third-party TTS service needed.

Stories are saved to localStorage so you can replay favorites โ€” no database, no account, no data leaving your device.

Top comments (0)