
Stowly
AI-powered magical bedtime stories for children
A full-stack iOS app that generates educational bedtime stories for children using both on-device Apple Intelligence and cloud-based AI, featuring a complete subscription system with virtual currency monetization.
The Challenge
Parents struggle to find engaging, educational bedtime stories that keep children entertained while teaching them something meaningful. Existing story apps either require expensive subscriptions with no free tier, lack educational value, or don't support multiple languages for bilingual families. The technical challenge was building an app that works seamlessly both online and offline, supports on-device AI for privacy-conscious users while offering more powerful cloud AI for premium features, and implements a fair monetization model that doesn't lock basic functionality behind paywalls. Additionally, the app needed to support multiple languages with culturally-appropriate storytelling styles, handle AI generation failures gracefully with automatic refunds, and provide transparent cost tracking for users.
Our Solution
Stowly implements a unique dual AI provider architecture that gives users choice between privacy and capability. Free users can generate unlimited stories using Apple Intelligence (on-device) with no sign-in required, while premium subscribers gain access to Cloud AI text generation for richer stories, Cloud AI image generation for illustrations, and Cloud AI narration. The backend runs on Supabase with 13 Edge Functions handling secure JWT authentication, atomic diamond transactions, and automatic refunds on generation failures. RevenueCat manages subscriptions with real-time webhook synchronization to the database. The iOS app follows MVVM architecture with SwiftUI and SwiftData, featuring word-by-word TTS highlighting during story playback, an immersive reading experience, and a complete story library with favorites, search, and read tracking. The diamond virtual currency system provides transparent usage-based pricing with full transaction history.
Results & Impact
Dual provider system (Apple Intelligence + Cloud AI) giving users choice between privacy and capability
Full support for English, French, German, Spanish, Italian, and Slovak with cultural adaptations
Complete backend API covering generation, user management, subscriptions, and transactions
Clean MVVM architecture with comprehensive service layer and reusable components
On-device AI generation with no usage limits, no sign-in required, full offline support
Key Features
Dual AI Provider System
Unique architecture allowing per-story choice between free on-device AI (Apple Intelligence) and premium cloud AI (Cloud AI). No vendor lock-in, seamless switching based on user preference.
Educational Story Generation
AI-generated stories include integrated vocabulary words, educational topics, and optional moral lessons. Age-appropriate complexity for children aged 3-12 with adjustable story lengths.
Word-by-Word TTS Highlighting
Advanced text-to-speech implementation with synchronized word highlighting during playback, enhancing reading comprehension for young readers. Multiple premium voice options.
AI Image Generation
Poster illustrations for each story via Apple Image Playground (on-device) or Cloud AI image generation. Automatic keyword extraction from story content with child-safe prompt enhancement.
Diamond Virtual Currency
Virtual currency system with clear balance display showing exactly how many diamonds users have. Full transaction history, automatic refunds on failures, and welcome bonus for new users.
Multi-Language Support
Six supported languages (English, French, German, Spanish, Italian, Slovak) with culturally-adapted storytelling styles. Language-specific prompts for authentic narratives.
Freemium Model with Real Free Tier
Unlimited on-device story generation without sign-in or payment. Premium unlocks cloud AI, all languages, AI narration, and diamond monthly allowance ($4.99/month or $49.99/year).
Secure Backend Architecture
JWT-authenticated Supabase Edge Functions with atomic diamond deduction, PostgreSQL triggers for welcome bonuses, and RevenueCat webhook integration for real-time subscription sync.
Technologies Used
Lessons Learned
- •The dual AI provider approach (on-device + cloud) is powerful for freemium apps - it provides a genuinely useful free tier while reserving premium features for subscribers without feeling restrictive.
- •Atomic diamond deduction with automatic refunds on failure is essential for virtual currency systems - it builds trust and prevents user frustration when things go wrong.
- •Word-level TTS highlighting requires careful AVSpeechSynthesizerDelegate implementation with character range tracking - the synchronization is tricky but dramatically improves the reading experience for children.
- •RevenueCat webhook integration with Supabase works well, but implementing PostgreSQL triggers for automatic welcome bonuses eliminates complex iOS-side logic and ensures consistency.
- •Supporting multiple languages isn't just about translation - each language needs culturally-appropriate storytelling guidelines (French artistry, German structure, Spanish warmth) for authentic narratives.
What's Next
Expanding language support to Czech and Polish. Adding achievement system with diamond rewards for reading milestones. Planning to expand from stories to full children's books with chapters and illustrations.