Inky is an AI storytelling app I designed and built end-to-end — native iOS app, Next.js web platform, and a full Firebase backend. I originally built it to help my 3-year-old learn to read. Kids and parents start with a simple prompt, and Inky generates a complete, age-appropriate story with custom illustrations and audio narration — personalized with names, settings, and themes they choose.
Multi-stage AI generation pipeline — A server-side pipeline orchestrates the full creative flow: Gemini writes the story, validates quality (auto-regenerating if it doesn’t meet the bar), and produces art direction specs. Then Imagen 4 generates a cover and per-page illustrations with character consistency. The whole flow runs asynchronously with real-time progress updates, credit reservation with commit/release semantics, cancellation support, safety filtering, and automatic retry logic.
Context-aware universe building — Stories aren’t one-off. The pipeline resolves author voice and illustration style from a regional authors config spanning cultures worldwide, series context for multi-installment continuity, and spinoff context that inherits characters and world-building from existing universes — so kids can build entire interconnected story worlds.
iOS app (Swift 6, SwiftUI) — A feature-rich native app with a custom story reader (page-turn effects, text-to-speech with word-level read-along highlighting), background story processing that completes generation even if the app is killed, multi-profile support with PIN-protected child profiles, adaptive iPad layouts, and support for 15+ languages.
Themed PDF storybooks — Stories export as professionally laid out PDFs via PDFKit. Over 20 themes (Space, Pirates, Dinosaurs, Fantasy, Nature, Superheroes, and more) each with custom typography, borders, colors, and page layouts — ready to print and read at bedtime.
Community & explore — Trending and latest feeds powered by scheduled functions that aggregate engagement metrics and AI-generated quality scores. Users browse by region, discovering stories from culturally diverse AI authors with distinct voices and illustration styles. Universe and series browsing with cross-story continuity.
Credit system & monetization — RevenueCat for iOS in-app purchases, Stripe for web, both via webhook-driven credit grants. A reserve-before-generate model ensures credits are only spent on successful stories. Firebase Remote Config controls pricing, model selection, and feature flags. A Pub/Sub-triggered budget kill switch provides cost protection.
Email automation — Resend-powered flows with React Email templates covering a 7-day activation drip, lifecycle milestones, engagement digests, retention win-backs, and transactional alerts. Timezone-aware scheduling with conditional send logic.
Image processing — Sharp-based pipeline with auto-generated thumbnails in AVIF and WebP on every upload, plus scheduled archival to cheaper GCP storage tiers for cost optimization.
Story translation — Google Cloud Translate with a locale-nested Firestore schema. Parent docs hold language-agnostic metadata while locale subcollections hold per-language content — translations generated on demand.
Quality & recommendations — Scheduled Gemini-powered batch jobs generate structured story summaries and quality scores, feeding into recommendations, series context, and trending rankings.
Content safety — Multi-layer approach: AI safety filters on both text and images, user reporting with moderation queue, admin controls, rate limiting on all endpoints, and App Check enforcement on every client-facing function.
Web platform — Next.js marketing site with Sanity CMS blog, auth-gated story reader, short links with Open Graph previews, deep linking to the iOS app, and SWR caching.
The full stack runs as a monorepo package in a Turborepo workspace — iOS, web, backend, and shared packages all in one codebase.
