Building a Mobile AI Comic-Drama App in Eight Days: Engineering Practices and Architecture
This article walks through the engineering practices behind a mobile AI comic-drama (motion-comic) app, using an eight-day prototype as a reference point. It explains how to define a creation loop before stacking features, structure the system into clear architectural layers, turn natural-language scripts into verifiable shot data, maintain character consistency through visual assets, run generation as recoverable asynchronous tasks, handle audio and video composition, and use AI coding assistants safely. It also covers cost control, quality and reliability testing, and open-source delivery. Readers will learn a practical, layered approach to building an editable, traceable, and recoverable creation workflow, along with realistic expectations about what an eight-day prototype can and cannot prove.
1. Define the Loop First, Not a Pile of Features
The value of a mobile AI comic-drama app lies in organizing scattered creation steps into a continuous flow: the user enters a story idea, the system helps generate the script, characters, and scenes, then produces storyboard images and storyboard videos step by step, and finally composites them into a playable work.
In the development experience this article references, the developer built a minimum viable version of this flow in eight days and plans to open-source it to drive further improvement. This timeline shows that prototyping is accelerating, but it does not mean every similar app can be finished in eight days, nor that a prototype equals a product ready to scale.
Two kinds of facts must be kept separate: the prototype demonstrated that the creation loop is feasible; stability, generation quality, concurrency capacity, and long-term cost still require later testing. This article focuses on that loop. The architecture and engineering measures added here are general recommendations and do not imply the prototype already implements every capability.
1.1 What the Minimum Viable Version Should Validate
The goal of the first version is not “one-click completion of any story,” but to validate three questions:
- Can users complete the main creation steps on a phone without frequently switching devices?
- Can structured scripts and character reference material effectively reduce uncertainty in later generation?
- After a single shot fails, can it be modified and regenerated locally without rebuilding the entire project?
Accordingly, the first version can prioritize short stories, a limited cast, a small number of scenes, and simple editing. Complex camera moves, multi-character interaction, long continuous plots, and precise lip-sync should be added gradually based on validation results.
1.2 What Work the Phone Should Handle
A phone is suited to entering ideas, choosing options, previewing material, adjusting order, and confirming results. It is not suited to long-running, resource-heavy video generation.
A reasonable product boundary is therefore: the mobile client handles creation interaction, while the server handles generation orchestration and media processing. After a user submits a task, the server should keep processing even if the user switches apps or briefly loses connectivity; when the client re-enters, it restores progress and results.
2. Overall Architecture: Turning the Creation Flow into a Manageable Data Flow
A general architecture can be divided into four layers:
The first layer is the mobile creation interface, including the project list, script editor, character and scene management, storyboard preview, task progress, and final-video playback.
The second layer is business services, responsible for authentication, project permissions, version management, task submission, quota checks, and result queries.
The third layer is generation and orchestration services, responsible for calling text, image, and video generation capabilities and coordinating dependencies between tasks.
The fourth layer is infrastructure, including databases, object storage, message queues, media processing, and monitoring and alerting.
What matters here is not the number of components but clear responsibilities. Generation models should not directly determine project state, and the client should not bypass business services to access model credentials that must be kept secret.
2.1 The Project Is a Container; the Shot Is the Main Execution Unit
A recommended way to organize the data is:
Project → Script version → Character and scene assets → Shot → Generation task → Final-video version
The project stores the story goal and overall style; the script version stores the structured plot; character and scene assets provide visual constraints; a shot carries the specific camera requirements; the generation task records the execution process; and the final-video version records the material and editing configuration actually used.
This design lets a user modify one shot without affecting other confirmed material. For time-consuming generation tasks with random results, this local redo capability is important.
2.2 Keep the Link Between Inputs and Outputs
Every generation should save the corresponding input snapshot, reference material, task status, and output location. Otherwise, when a user feels a character “suddenly looks different,” it is hard for the developer to tell whether the problem comes from a changed character description, a missing reference image, or instability in the generation result itself.
Note that saving generation records does not mean retaining all material indefinitely. Access permissions, retention periods, and deletion policies should be defined at the same time to avoid project assets piling up over the long term.
3. Script Structuring: Making Model Output Machine-Consumable
A natural-language script is good for reading but not necessarily suited to directly driving later generation. For example, “She walks into the room and recalls the past” lacks a clear subject, framing, action, duration, and sound arrangement.
So script generation should not stop at a block of story text; it should be converted into an editable, verifiable shot structure.
3.1 Fill In the Creation Constraints First
After a user enters an idea, the user can be asked to confirm a few key conditions:
- Story genre and emotional tone;
- Target duration and aspect ratio;
- Number of main characters and scenes;
- Visual style;
- Narration, dialogue, and subtitle language.
The number of characters and scenes should be a configurable option, and no single set of defaults should be treated as best practice. Short stories usually need to keep asset scale under control, because each new character and scene adds not only generation runs but also the difficulty of maintaining consistency.
3.2 Use a Verifiable Intermediate Representation
The following is only an illustration of a custom data structure and is not the interface definition of any model or service:
Shot:ID: Shot 1Scene reference: Old stationCharacter reference: ProtagonistFraming: Medium shotAction: Stops walking, looks up at the station signEmotion: HesitantNarration: Years later, she returns here againTarget duration: Confirmed by the userLanguage requirement: Chinese
Once structured, the program can check whether a character reference exists, whether a scene is missing, whether dialogue is empty, and whether a shot’s duration exceeds the project constraints.
But a valid structure does not mean a sensible plot. Narrative continuity still needs checking: why a character enters the next scene, whether an action follows from the previous shot, and whether the narration merely repeats what the visuals already show.
3.3 Separate Generation from Confirmation
A recommended flow is “generate draft → validate → user confirms → lock version.” An unconfirmed script should not directly trigger a full batch of video generation, because editing text is usually cheaper and faster than regenerating images and videos.
4. Character Consistency: Build Visual Assets, Not Repeated Names
Character consistency is where an AI comic-drama app most easily exposes problems. The same name does not constrain appearance; even with an identical repeated description, results can vary in face shape, clothing, hair color, or accessories.
A more reliable approach is to establish unified visual assets and usage rules for each character.
4.1 Separate Fixed Attributes from Shot State
Fixed attributes include hairstyle, hair color, main clothing color, signature accessories, and overall build. Shot state includes expression, action, orientation, and lighting.
For example, a character can appear surprised or tired in different shots, but should not change clothing without reason because of an emotional shift. If the plot truly requires a costume change, a new clothing state should be created, with a clear definition of which shots use it.
4.2 Use Confirmed Reference Images
Generating and screening character reference images first, then using those images for later shots, is a common consistency-control approach. The prerequisite is that the chosen generation capability supports the corresponding reference input and that the reference material is legally usable.
Reference images should highlight the character as much as possible and avoid distracting backgrounds. If capability and budget allow, multiple viewpoints can be added, but this cannot guarantee that the character stays fully consistent across all angles, actions, and scenes.
Consistency depends not only on reference material but also on the specific model capability, shot complexity, and generation constraints. The role of engineering design is to reduce drift, not to eliminate all uncertainty.
4.3 Confirm Images Before Generating Video
A two-stage flow is recommended:
The first stage generates static storyboard frames to check characters, composition, and scenes; the second stage generates dynamic clips based on the confirmed images.
This catches obvious errors early. If the character is already inconsistent in the static image, generating video usually only increases the cost of fixing it.
For high-risk shots such as multi-character interaction, side profiles, occlusion, and fast action, stricter manual confirmation should be arranged; when necessary, switch to a simpler shot to keep the narrative clear.
5. Asynchronous Tasks: Making Failure a Recoverable State
Text, image, and video generation differ in duration and in failure causes. The mobile client cannot rely on a single long-waiting request to carry the whole flow.
5.1 Define Clear Task States
Tasks should at least distinguish waiting, running, succeeded, failed, and canceled. Whether to support automatic retry, timeout termination, and cancellation should be decided based on the actual generation service capabilities, not just by adding a button to the interface.
Task records should also include the owning project, the associated shot, the input version, the number of attempts, the output location, and an error category, to make recovery and troubleshooting easier.
5.2 Schedule by Dependency, Not Blind Concurrency
A shot that depends on a character can be reliably generated only after the character reference image is confirmed; the corresponding video is generated only after the shot image is confirmed; and the final video is composited only after all required clips are ready.
Independent tasks can run in parallel within a controlled range, but concurrency limits should be set to avoid submitting a large number of tasks at once, which could cause budget overruns or resource congestion.
5.3 Retries Must Distinguish Error Types
For issues such as network interruptions or temporary resource shortages, a limited number of retries can be considered. For invalid input, unsupported material, or insufficient permissions, the problem should be fixed first.
In addition, duplicate submission that causes duplicate billing must be prevented. An idempotency key can be used at the application layer, and existing task states can be checked; but application-layer deduplication does not automatically solve every duplicate-execution problem in external generation services, which still needs to be handled according to their actual capabilities.
6. Audio and Video Composition: Do Not Treat “Having Visuals” as “Done”
The prototype experience mentioned a problem where the audio language was not constrained in time. This shows that language requirements should enter the project configuration rather than be checked only after the final video is produced.
6.1 Pass Sound Requirements Through Every Stage
The project language affects not only dialogue generation but potentially narration, subtitles, and in-video sound. If a generation capability cannot reliably control the sound language, an independent voiceover flow can be used based on actual conditions, followed by audio-video composition.
This approach is easy to modify, but line duration, pauses, subtitle segmentation, and visual pacing still need handling; do not assume sound will automatically match the shots.
6.2 Run Media Checks Before Composition
Video clips may differ in resolution, aspect ratio, frame rate, and audio format. Before composition, they should be checked and processed to a unified output requirement, and it should be confirmed whether there are blank clips, corrupted files, or abnormal durations.
Subtitles need to be readable on a phone screen; dialogue, narration, and background music should be balanced so that music does not drown out narrative information.
6.3 Keep a Final-Video Manifest
Each final video should record which shot versions were used, their order, the crop range, the voiceover, and the subtitles. After a user modifies one shot, the video can be recomposited from a new manifest instead of regenerating everything.
7. AI-Assisted Development: Speed Comes from Task Breakdown and Validation
Finishing a prototype quickly does not mean handing all requirements to an AI coding tool at once. A more controllable method is to let the tool handle small, well-bounded, verifiable tasks.
7.1 Write Constraints First, Then Generate Code
Before development, define the data structures, module responsibilities, error handling, and acceptance criteria. For example, “build the task progress page” should further specify which states it must show, how it refreshes, how it behaves on network failure, and whether duplicate submission is allowed.
The more specific the task, the easier the generated code is to review; the smaller the change scope, the easier regression risk is to control.
7.2 Get the Vertical Path Working First
Completing the shortest path of “create project → generate one shot → save material → preview result” before expanding to multiple shots and video composition makes architectural problems easier to find than opening many pages at once.
During the prototype stage, mock results can validate interaction and task states before real generation capabilities are connected. This avoids incurring generation costs on every debugging run.
7.3 Manually Review Critical Boundaries
Authentication, project access permissions, credential management, file upload, budget limits, and task deduplication should be key review targets. Generated code that runs does not mean permissions are correct, nor that abnormal cases will not cause duplicate charges or leak material.
8. Cost, Testing, and the Eight-Day Pace
The cost figures in the original experience are an individual developer’s record and cannot directly represent the full cost of an application. The cost of AI coding and text planning should be tracked separately from image and video generation, storage, traffic, and media processing.
8.1 Calculate Cost by Successful Results
Beyond recording the cost per call, focus more on the combined cost of successful shots and acceptable final videos. Retries, discarded material, and repeated revisions should all be counted.
Effective cost-control measures include: confirm text first, then images, then video; allow single-shot redo; limit batch submission size; reuse confirmed assets; and set project budget alerts.
8.2 Acceptance Must Cover Quality and Reliability
Quality checks can focus on character appearance, scene continuity, action anomalies, dialogue language, subtitle sync, and narrative completeness.
Reliability checks should cover network recovery, duplicate submission, partial failure, task timeout, re-login, material deletion, and permission isolation. Test material should be authorized for use to avoid introducing privacy and copyright risks.
8.3 Treat Eight Days as a Planning Reference, Not a Promise
One reference pace is: the first two days to define scope, data structures, and the shortest path; the next three days to refine the script, character assets, and asynchronous tasks; the following two days to connect video generation, composition, and mobile preview; and the last day to focus on error recovery, documentation, and delivery checks.
This is only time-box planning. The actual timeline depends on development experience, the existing code base, the difficulty of connecting generation capabilities, and acceptance requirements. When scope gets out of control, the most effective choice is usually to cut features, not to compress necessary testing.
9. Open-Source Delivery: Let Others Understand, Run, and Continue
Publishing source code is only the starting point of open-source delivery. The license, runtime environment, configuration method, module boundaries, and known limitations should also be made clear, along with configuration examples that contain no real credentials.
When external generation capabilities are involved, the integration points and adaptation requirements should be explained, without hiding the assumptions of one service inside business logic. Mock tasks or test material should also be provided so contributors can understand the project without immediately incurring generation costs.
For unresolved problems, such as sound control, complex character interaction, and mobile performance, they should be recorded honestly. Transparent boundaries are more helpful for sustained collaboration than vague capability claims.
Conclusion
The engineering core of a mobile AI comic-drama app is to bring uncertain generation results into an editable, traceable, and recoverable creation flow.
An eight-day prototype can validate a direction, but a stable product needs more complete asset management, quality checks, cost control, and security mechanisms. AI coding tools can shorten implementation time but cannot replace requirement judgment and result acceptance.
What is truly worth building first is not more generation buttons, but a clear loop: users can confirm each step, the system can explain its current state, failures can be recovered locally, and cost can be understood and constrained. Only such a foundation can support later feature expansion and open collaboration.
