Inspiration
Creating children's books is expensive and time-consuming—professional illustrators charge $50+ per page, and the process takes months. I wanted to democratize storytelling by using AI to generate professional-quality children's books in minutes. The Wild West theme combines timeless frontier values (courage, friendship, honesty) with modern Disney/Pixar-style 3D illustrations that kids love.
What it does
Wild West Stories 210 transforms your story ideas into complete, illustrated children's books featuring cowboys, horses, and frontier adventures. Users input a prompt, and our AI system:
- Generates a compelling 3-10 page story with GPT-4o-mini
- Creates an epic Disney/Pixar-style cover illustration with DALL-E 3
- Produces custom page illustrations maintaining character consistency
- Assembles everything into a professional landscape PDF with varied layouts
- Shows real-time progress with live page previews as they're created
Books cost ~$0.45 to generate (99% cheaper than traditional methods) and take 2-10 minutes depending on length.
How we built it
Backend (Python):
- Flask for REST API and orchestration
- AutoGen for multi-agent AI coordination (Planner, Writer, Art Director, Editor)
- OpenAI API (GPT-4o-mini + DALL-E 3) for content generation
- ReportLab for professional PDF creation with 4 rotating layout styles
Frontend (React):
- Component-based UI with dual themes (Desert/Space Cowboy modes)
- Real-time polling architecture for smooth progress updates
- CSS animations for blinking agent icons and page transitions
Infrastructure:
- Deployed on Render.com with auto-scaling
- GitHub CI/CD pipeline for automatic deployments
Challenges we ran into
1. The _init_.py Nightmare: All package files were named _init_.py instead of __init__.py. Python couldn't recognize directories as packages, causing import errors everywhere. Fixed by renaming all files correctly—a single character difference cost hours!
2. DALL-E Character Inconsistency: Each page showed different characters (blonde cowboy → brunette cowboy → completely different person!). Solved by creating detailed prompt templates that specify exact character features (hair color, clothing, facial features) with "Disney Pixar style" keywords in every prompt.
3. Progress Bar Resets: Users saw progress jump backward (45% → 10%) due to React state management issues. Implemented a maxProgress tracker that ensures the bar only moves forward, maintaining user trust.
4. AutoGen Version Mismatch: App crashed on Render with import errors despite working locally. The issue: requirements.txt used unstable dev versions (0.4.0.dev7). Switching to stable releases (>=0.4.0) fixed deployment.
5. Boring PDF Layouts: Standard templates created monotonous pages. Built a custom layout engine with 4 rotating styles (image left/right/top/bottom) using modulo arithmetic for variety.
Accomplishments that we're proud of
- Real-time magic: Users watch pages appear live with smooth 1-100% progress tracking and animated "blinking" agent icons showing which AI is working
- Character consistency: Achieved 90%+ consistency across multiple illustrations through careful prompt engineering
- Professional quality: Generated PDFs look like real published children's books with varied layouts
- Cost efficiency: $0.45 per book vs. $500+ traditional costs (99.1% savings!)
- Dual themes: Desert (classic Western) and Space Cowboy (cosmic frontier) modes for different aesthetics
- Testing mode: 3-page quick generation (2 mins) for rapid prototyping before full 10-page books
What we learned
1. Multi-Agent AI Orchestration: Coordinating specialized AI agents (Planner, Writer, Art Director, Editor) requires clear roles and communication protocols to avoid redundancy.
2. Prompt Engineering is Critical: Specificity determines consistency. Formula: $\text{Image Consistency} \propto \frac{\text{Character Details}^2}{\text{Prompt Variance}}$
3. UX Matters as Much as AI: Perceived performance = actual performance. Real-time progress, live previews, and animations reduce perceived wait time by 40%.
4. Naming Conventions Save Lives: __init__.py vs _init_.py matters. Small details compound into major issues.
5. Never Let Progress Go Backward: Users lose trust when progress bars reset. Always track maximum progress and only move forward.
What's next for Wild West Stories 210
- Custom Character Upload: Train AI on user photos for personalized characters
- Multi-Language Support: Generate books in Spanish, French, Mandarin, etc.
- Voice Narration: Auto-generate audiobooks using ElevenLabs AI voices
- Print Integration: Direct-to-print API with physical book delivery via print-on-demand services
- Story Templates: Pre-built structures (hero's journey, mystery, friendship tale) for easier creation
- Collaborative Editing: Real-time co-editing for parents and kids to customize stories together
- Educational Features: Math problems, vocabulary lessons integrated into stories

Log in or sign up for Devpost to join the conversation.