Case study · iOS app · Flutter

Social Companion

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.

Role
Sole designer and developer
Codebase
78,000 lines of Dart, 235 files
Screens
About 40 routed screens
Used for
The Days We Keep, Noria Coffee
[Screenshot: Story Series Studio]
[Screenshot: Carousel canvas editor]
[Screenshot: video editor with captions]
[Screenshot: content calendar]

01 · AI production studios

Ten agents, three pipelines, a human at every gate

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.

Story Series Studio

Short story reels for recurring series

  1. Story Generator
  2. Story Director
  3. Visual Director
  4. Production Director
  5. Judge

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.

Carousel Studio

Instagram carousels

  1. Concept
  2. Slide Writer
  3. Editorial QA
  4. Caption

Slides open in a built-in canvas editor with autosave for the final design.

Story Studio

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

Screens never call an API directly

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

StudiosStory Series, Carousel, Story
Planning and publishingCalendar, AI posts, Publisher
Media toolsVideo, captions, audio, photos

Service layer

AI pipelines10 agents, prompt builder, model registry, spend
Media processingFFmpeg on device: stitch, mix, Ken Burns, captions
Publishing and syncPosts, carousels, reels, uploads, reminders

On device

SQLiteProjects, agent runs, audio library, spend, local media

Cloud

OpenRouter and fal.aiLLMs, image, video, voice, music, avatars

Cloud

Meta Graph API, Firebase, WordPressInstagram and Facebook posts, storage, blog

03 · Hard problems

What I solved along the way

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.

Syncing video to a song

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.

Merging results across models

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.

Choosing models with data

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.

Faces that stay the same

Photo restoration that keeps identity intact: after five rounds of testing, a two-pass pipeline restores in black and white first, then colorizes.

Work that survives the app closing

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

Finished inside the app, not exported

AreaTools
VideoAI video generation, editor with trim, speed, text, music and drafts, clip stitcher with transitions, Ken Burns builder
CaptionsWord-by-word animated captions timed to each spoken or sung word, with AI-chosen emphasis
AudioAI voiceover library with voice cloning, a music generator for songs or instrumentals
PhotosRestoration 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