ποΈ 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