mikeaorlando.com Michael Orlando
  • Home
  • Start Here
  • About
  • Work & Ventures
  • Ideas & Writing
  • Collaborate
  • Search

◉Takeflow: An AI-Assisted Application Prototype

Takeflow: An AI-Assisted Application Prototype

An experimental web application for defining, running and reviewing image and video generation jobs on a GPU pool, built in tested phases with Claude Code.

Routing Notes

  • Parent Projects for Fun
  • Signal Working Systems

Overview

Takeflow is an experimental web application for defining and running image and video generation jobs against the ComfyUI GPU pool in my homelab, then reviewing the results and tracing each output back to what produced it. It is not tied to a venture. It is also an example of something broader: prototyping a custom application quickly with AI coding assistance, while keeping the scope, the decisions and the tests in a person’s hands.

Context

I already generate media on the homelab, for example the header loops on this site. That work ran through scripts and batch runners. They worked, but they had no shared record: which prompt, model, workflow and seed produced an output, which outputs were approved, and how to change one input and run again without rebuilding everything by hand.

The success condition I wrote down was specific. A person can produce a reviewed result, understand how it was made, change one part and get an updated version without losing earlier work. Operationally, an interrupted client loses no server-side progress, an ambiguous submission to a GPU worker is reconciled rather than repeated, spending stays inside its budget, and a missing measurement is shown as missing, not as zero.

The System

Stack. Laravel on PHP, with MySQL for the domain model and a run state machine, Laravel queues on Redis supervised by Horizon, and live updates pushed to the browser. Sign-in goes through Authelia only, with API tokens for programmatic access. A GitHub Actions workflow builds the image, and the application runs as a Portainer stack on Docker Swarm, with its data on CephFS.

What it does. The first slice has five parts:

  • Libraries: content and resource items with versions, prompt templates, structured objects, and imported image models and ComfyUI workflows.
  • Run specs: a run is defined as axes drawn from libraries (characters, settings, models, workflows) and fixed values. The plan shows every job it will create, a cost estimate and a budget ceiling before anything runs. A plan with errors creates nothing. Seeds are repeatable.
  • Execution: one queue and worker per GPU, plus a worker for LLM calls through LiteLLM. Each job keeps a full record of inputs, settings, errors, logs, outputs and telemetry.
  • Results: a live results grid, review (approve, reject, select), derive a new run from an old one, redo, compare two runs, and trace any output back to its inputs.

How it was built. The design lives in Confluence: a terminology page, an architecture page, and a validation plan with a build order and numbered test cases for each phase. Claude Code wrote the application phase by phase against that plan. Each test case became an automated test named by its number, and a phase was done only when all of its tests passed. Code reviews ran between phases, and every finding was fixed with a test. Product rules that the plan left open, such as whether a rejected output can be selected or which item versions a derived run keeps, came back to me as decisions, and I made them before the code was written. I reviewed the work in the browser and merged it.

Components and Why I Chose Them

If terms such as queue worker, gateway or single sign-on are new to you, How my AI stack fits together explains how the pieces connect.

Component What it does here Why I chose it
Laravel on PHP The application: web interface, REST API and the run engine It follows the stack of the other Laravel applications I work on, so the patterns, image build and test tooling were already proven
MySQL (tool page) The domain model and the state of every run job The application owns its data model, and the run state lives in the database, so it is the record of what has to be queued again after a failure. I started on the current long-term-support release
Redis (tool page) with Laravel Horizon Queues, one per GPU, plus the LLM worker Horizon supervises one worker per named queue and shows queue depth and failures, which the per-GPU queues need. Queue state in Redis is disposable because MySQL holds the run state
Laravel Reverb Pushes progress to the browser The results grid fills as each job finishes, without the page polling
Authelia (tool page) and API tokens Sign-in for people; tokens for programmatic access Authelia is the single sign-on the homelab’s other services already use. People, agents and scripts call the same API endpoints with tokens
GitHub Actions (tool page) Builds the container image on each commit Each image is tagged with its commit, with no reusable “latest” tag, so a running service always maps to one commit
Portainer (tool page) on Docker Swarm Runs the web, worker, scheduler, live-update and migration services from one image The deployment follows the homelab’s existing conventions. One process per service lets Swarm restart and log each one separately
CephFS (tool page) Database data and media files Shared storage that every node can reach. Outputs are stored by a hash of their content, so a record and its file cannot drift apart
ComfyUI (tool page) Renders images and video on the GPUs Called over HTTP, so the Python tools stay in their own containers and the application holds no machine-learning code
LiteLLM (tool page) LLM calls The same gateway the other apps use, with tracing to Langfuse already in place
Claude Code (tool page) Wrote the application phase by phase It works in the repository against the written plan and runs the numbered tests itself, so each phase can be checked before the next one starts

Outcomes

The first slice is deployed in the homelab. A production acceptance run took one character in one setting across several text-to-image models, derived a second run with one changed detail, and the compare view showed exactly that one difference. The acceptance run also found real problems, such as timing and GPU measurements that described the wrong part of a render, and those were fixed and released the same way.

Patterns Worth Reusing

Write the test cases before the code. A numbered validation plan gave the AI assistant a definition of done for each phase and gave me something checkable to review, instead of reading every line.

Keep decisions with a person. The assistant moves fast on implementation; the questions that change product behavior should stop and come back, and the answers should be recorded where the next phase can find them.

Hold the scope line on purpose. The prototype leaves out LLM composition, multi-stage runs, agent access, model training, audio, and cloud deployment. Each is in the build order as a later phase. In parallel, a benchmark against existing products is meant to decide which later phases are worth building and which are better integrated.

The trade-off is that a fast prototype is still a prototype. It runs on one homelab, for a small number of users, and it carries the operating burden of any custom application. The speed is real; whether the application is worth keeping is a separate decision that the benchmark is there to inform.

Explore

  • ✎Posts
  • ○Categories
  • ◉Projects for Fun
  • ▶Projects for Work
  • ◎Systems Across Domains
  • ▪Technical Tools
  • ◆Transferable Skills
  • ✕Value Multipliers
  • ◇Ventures

Michael Orlando

Systems, ventures, writing, and public proof arranged so the right people can find the right next step.

© 2026 Michael Orlando

Privacy & Data Handling

about.me Substack Credly Polywork