https://github.com/rahulrmcoder/moonlight-tales
Moonlight Tales is an AI-powered web app that creates funny and heartwarming bedtime stories for children based on a single sentence or idea. With a beautifully illustrated interface and playful storytelling, this app brings joy, laughter, and life lessons to kids β one story at a time.
https://github.com/rahulrmcoder/moonlight-tales
Last synced: 8 months ago
JSON representation
Moonlight Tales is an AI-powered web app that creates funny and heartwarming bedtime stories for children based on a single sentence or idea. With a beautifully illustrated interface and playful storytelling, this app brings joy, laughter, and life lessons to kids β one story at a time.
- Host: GitHub
- URL: https://github.com/rahulrmcoder/moonlight-tales
- Owner: RahulRmCoder
- License: mit
- Created: 2025-07-10T17:01:31.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-10T17:10:31.000Z (12 months ago)
- Last Synced: 2025-07-10T23:35:43.791Z (12 months ago)
- Language: TypeScript
- Size: 184 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π Moonlight Tales
**Where AI Magic Meets Bedtime Wonder**
Moonlight Tales is an AI-powered web app that creates funny and heartwarming bedtime stories for children based on a single sentence or idea. With a beautifully illustrated interface and playful storytelling, this app brings joy, laughter, and life lessons to kids β one story at a time.
---
## π§ Powered by Lyzr Agent
This project connects to a Lyzr AI inference agent that generates creative bedtime stories on demand using the following endpoint:
```
POST https://agent-prod.studio.lyzr.ai/v3/inference/chat/
```
**Headers:**
```
Content-Type: application/json
x-api-key: sk-default-iPEOmf2biknSikwsVOh0xbDtT5nNkUx6
```
**Example Payload:**
```json
{
"user_id": "rahulrajasekharanmenon64325@gmail.com",
"agent_id": "#",
"session_id": "#",
"message": "A curious girl finds a talking sock in her laundry basket"
}
```
---
## β¨ Features
- π¨ Cute, animated bedtime-themed UI (clouds, stars, moon)
- π§ Child-friendly fonts (e.g., Comic Neue, Baloo 2)
- π‘ Single sentence input to generate full story
- π Storybook-style display with soft scrolling or flipping
- π Gentle moral or life lesson in every tale
- π΅ Optional toggle for soothing background music
- π± Fully responsive and mobile-friendly
---
## π Tech Stack
- **Frontend**: HTML, CSS, JavaScript or React
- **Styling**: Tailwind CSS (for pastel tones, smooth UI)
- **Font**: Google Fonts - Comic Neue / Baloo
- **API**: Lyzr Agent (AI backend)
- **Audio**: Howler.js (optional background music)
---
## π How to Use
1. **Clone the repository**
```bash
git clone https://github.com/RahulRmCoder/moonlight-tales.git
cd moonlight-tales
```
2. **Install dependencies**
```bash
npm install
```
3. **Set your environment variables**
Create a `.env` file and add your key:
```env
VITE_LYZR_API_KEY=sk-default-iPEOmf2biknSikwsVOh0xbDtT5nNkUx6
```
4. **Run the development server**
```bash
npm run dev
```
---
## π Project Structure
```
moonlight-tales/
βββ public/ # Static assets (images, sounds)
βββ src/
β βββ components/ # InputBox, StoryDisplay, etc.
β βββ styles/ # Tailwind or CSS files
β βββ App.jsx
β βββ main.jsx
βββ .env
βββ index.html
βββ package.json
βββ README.md
```
---
## π§ͺ Sample API Call (cURL)
```bash
curl -X POST 'https://agent-prod.studio.lyzr.ai/v3/inference/chat/' \
-H 'Content-Type: application/json' \
-H 'x-api-key: sk-default-iPEOmf2biknSikwsVOh0xbDtT5nNkUx6' \
-d '{
"user_id": "rahulrajasekharanmenon64325@gmail.com",
"agent_id": "#",
"session_id": "#",
"message": "A giraffe who wants to touch the moon"
}'
```
---
## π Example Input β Output
**Input:**
`A shy dragon wants to become a stand-up comedian`
**Generated Story:**
> Once upon a time in the giggle-filled valley of Burniebelly, a shy dragon named Drako discovered a love for telling jokes. Every time he tried to breathe fire, he sneezed sparkles insteadβ¦
(Continues with a moral at the end.)
---
## π License
This project is licensed under the MIT License.
---
## π Ending Note
> βSweet dreams are made of stories.β
Bring imagination to life and make bedtime magical β one sentence at a time.