Reliable output from unreliable AI
When an agent kept dropping dialogue or inventing an extra speaker, I moved the rule out of the prompt and into code. The app builds the final prompt itself, so the rule holds every run.
Case study · iOS app · Flutter
An AI content studio on the phone. It plans, writes, films, voices, scores, edits, captions and publishes social media for two brands, with a person approving every stage.
01 · AI production studios
Each studio turns a topic into a finished post through a chain of specialized agents. I review and approve each stage before the next one runs, and every run is versioned so earlier takes can be compared or restored.
Short story reels for recurring series
The Judge can send a revision back to one specific earlier agent instead of restarting the run. Stories can be told as lip-synced dialogue, voiceover or a story song, produced as AI video per shot or as animated stills at a fraction of the cost.
Instagram carousels
Slides open in a built-in canvas editor with autosave for the final design.
Any brand, any story
A simpler, business-agnostic flow that turns a short story into video scenes, with a checkpoint for each clip before it is rendered.
02 · Architecture
One service layer keeps AI, media and publishing separate and reusable. Data lives on the device first; media uploads to Firebase only when a post is approved.
Flutter iOS app · about 40 screens
Service layer
On device
SQLiteProjects, agent runs, audio library, spend, local mediaCloud
OpenRouter and fal.aiLLMs, image, video, voice, music, avatarsCloud
Meta Graph API, Firebase, WordPressInstagram and Facebook posts, storage, blog03 · Hard problems
When an agent kept dropping dialogue or inventing an extra speaker, I moved the rule out of the prompt and into code. The app builds the final prompt itself, so the rule holds every run.
A longest-common-subsequence alignment, tolerant of misheard words, matches known lyrics to a transcript of the sung audio and cuts each shot to its line.
Lyric timing can be re-checked with different speech-to-text models and merged line by line, keeping the best timing. Tap-to-sync covers the rest.
In-app test labs run the same input through several providers and record ratings. The results picked the production models for lip-sync, avatars, voiceover and music.
Photo restoration that keeps identity intact: after five rounds of testing, a two-pass pipeline restores in black and white first, then colorizes.
Pipelines save state after every step and resume where they left off. The carousel editor autosaves when the app goes to the background.
04 · Media tools
| Area | Tools |
|---|---|
| Video | AI video generation, editor with trim, speed, text, music and drafts, clip stitcher with transitions, Ken Burns builder |
| Captions | Word-by-word animated captions timed to each spoken or sung word, with AI-chosen emphasis |
| Audio | AI voiceover library with voice cloning, a music generator for songs or instrumentals |
| Photos | Restoration and colorization, AI image editor, styled illustrations |
Stack
Flutter · Dart · SQLite (sqflite) · Firebase Auth, Storage, Firestore · FFmpeg · OpenRouter · fal.ai · Meta Graph API v22 · WordPress REST API · Riverpod