🎙️ Talk to create. ✨ Watch it come alive.
A real-time, voice-driven storybook generator powered by Google Gemini.
Speak your ideas. Get illustrated pages. Download your book.
StoryForge lets anyone — especially kids — talk their stories into existence. You speak to Quill, a friendly AI creative companion, who listens to your ideas, asks follow-up questions, and generates a fully illustrated storybook page by page.
"I want a brave little fox who finds a magical forest…"
Quill responds, asks about the fox's name, what the forest looks like, and then — boom — a watercolor-illustrated page appears on screen with narration.
|
Talk naturally with Quill via the Gemini Live API. No typing required — just speak your ideas and watch them become pages. Every page gets a unique illustration generated by Imagen 3, locked to your chosen visual style (watercolor, line art, retro pixel, etc.). Download your completed storybook as a beautifully formatted PDF with illustrations, page numbers, and a title page. |
Built-in content safety checks ensure all generated text and images are appropriate for the selected age group (5-8, 9-12, 13-17). Each page is narrated aloud by a warm storybook narrator voice (separate from Quill's conversational voice), powered by Gemini TTS. Text, illustration, and narration generate in parallel — pages appear in seconds, not minutes. |
┌─────────────────────────────────────────────────────────┐
│ Frontend (React) │
│ Voice Input ←→ Story Display │
└────────────────────┬────────────────────────────────────┘
│ WebSocket + REST APIs
┌────────────────────▼────────────────────────────────────┐
│ FastAPI Backend │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌────────────┐ │
│ │ Gemini Live │───▶│ Orchestrator │──▶│ State │ │
│ │ (Quill 🦉) │ │ (Pipeline) │ │ Manager │ │
│ └──────────────┘ └──────┬───────┘ └────────────┘ │
│ │ │
│ ┌──────────────┼──────────────┐ │
│ ▼ ▼ ▼ │
│ ┌──────────────┐ ┌───────────┐ ┌────────────┐ │
│ │ Story Writer │ │ Imagen │ │ Narration │ │
│ │ (Gemini 2.5) │ │ (Art 🎨) │ │ (TTS 🔊) │ │
│ └──────────────┘ └───────────┘ └────────────┘ │
└─────────────────────────────────────────────────────────┘
- Node.js 20+
- Python 3.11+
- A Google AI API key
- A Firebase Project (for Authentication, Firestore, and Storage)
# Clone the repo
git clone https://github.com/Ker102/StoryForge.git
cd StoryForge
# Install frontend dependencies
cd client
npm install
# Install backend dependencies
cd ../backend
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -e ".[dev]"
# Configure environment
cp .env.example .env.storyforge
# Edit .env.storyforge and add your API keys + Firebase config
# Run the stack
# Terminal 1 (Backend)
uvicorn app.main:app --reload --port 8000
# Terminal 2 (Frontend)
cd ../client
npm run devStoryForge/
├── client/ # React + Vite frontend
│ ├── src/
│ │ ├── components/ # UI components (StoryReader, loading screens)
│ │ ├── hooks/ # custom audio processing, WebSocket hooks
│ │ └── lib/ # Firebase init
├── backend/
│ ├── app/
│ │ ├── main.py # FastAPI app + static routing
│ │ ├── models/ # StoryState, Page, Character
│ │ ├── services/ # Pipeline coordinators & agents
│ │ │ ├── orchestrator.py # Page generation pipeline
│ │ │ ├── live_session.py # Gemini Live API (Quill)
│ │ │ ├── story_writer.py # Gemini 2.5 Flash text gen
│ │ │ ├── firestore_service.py # Firebase Persistence
│ │ │ └── export_service.py # PDF generation
│ │ ├── routes/
│ │ │ ├── ws.py # Real-time WebSockets
│ │ │ └── api.py # REST endpoints
│ ├── pyproject.toml
│ └── ruff.toml
| Role | Model | Purpose |
|---|---|---|
| 🦉 Creative Companion | gemini-2.5-flash |
System instructed with FunctionTools to intercept story triggers and converse using Live WebSockets |
| ⚡ Story Writer | gemini-2.5-flash |
Structured story text generation following user prompts |
| 🎨 Illustrator | imagen-3.0-generate-002 |
Page illustrations |
| 🔊 Narrator | gemini-2.5-flash-tts-preview |
Story narration audio |
- CodeQL scanning on every PR and weekly
- Dependabot for automated dependency updates
- pip-audit for Python dependency vulnerability scanning
- Ruff with bandit security rules enforced in CI
- Firebase Auth securing REST API endpoints via token verification
- See SECURITY.md for vulnerability reporting
- Backend scaffold with FastAPI
- AI service integration (Live, Writer, Imagen, TTS)
- WebSocket real-time communication
- CI/CD pipeline + security scanning
- Modern React/Vite Frontend
- Google Login + Firebase Persistence
- Cloud Run Serverless Deployment
- Multi-language story support
- Collaborative storytelling (multiplayer)
MIT — see LICENSE for details.
Built with ❤️ for the Gemini Live Hackathon