S

steven.agent

en ligne

S
Steven_copy

Klorv · AI-powered Mobile App Generation SaaS.

SaaS platform that turns a user prompt into a functional mobile app, scannable live via Expo. AI pipeline distributed across three Docker workers, freemium with Stripe paywall, deployed on Hetzner.

// client

Klorv

Startup · entrepreneurial project

// role

Co-founder & CTO

2026 · beta

Klorv — Startup · entrepreneurial project
30
Supported game archetypes
3
Specialized Docker workers
~$0.01
AI cost per generation
61
Test files

The context

Building a mobile app is still long, expensive and technical for non-developers. Even for experienced devs, shipping a working MVP takes weeks.

With my co-founder, we asked a simple question: what if you could describe your idea in natural language and get a working app? Not a mockup. Not a prototype. A real app you scan with your phone.

That's Klorv's promise. The technical bet: turn a user prompt into generated, validated, packaged, playable code in an Expo preview — in minutes, for about one cent of AI cost.

The solution

I designed and built the entire AI pipeline and infrastructure. The architecture is a multi-service monorepo with a Next.js web app for the chat + editor interface, and three specialized Docker workers passing jobs through Redis (BullMQ).

The pipeline in 5 steps

1. User types a prompt in the editor
   → POST /api/ai/sessions/[id]/messages → 202 immediate
   → BullMQ job enqueued in Redis

2. AI Queue Worker claims the job
   → Loads project files from Supabase
   → Determines the mode (ask / plan / build)
   → POSTs to the Claw Worker

3. Claw Worker executes the agent
   → DeepSeek agent loop (reasoner for build, chat for ask)
   → Agent reads/writes/lists files via tool use
   → Returns changedFiles[]

4. AI Queue Worker validates and applies
   → Whitelist paths, protected files
   → Snapshot current version
   → Apply patches via transactional RPC

5. Expo Preview Worker detects the change
   → Scaffolds an Expo project
   → Launches expo start + ngrok tunnel
   → Publishes URL → playable preview in editor iframe

The 3 Docker workers

AI Queue Worker — The orchestrator. BullMQ consumer that atomically claims ai_runs, orchestrates the whole pipeline (scaffold → claw → validation → apply patches → snapshot), handles user quotas and cost guard.

Claw Worker — The LLM executor. HTTP server on :8787 that fully isolates the model call. Zero direct database access: it receives files[], returns changedFiles[], authenticated by bearer token. That's what lets us scale inference independently from the rest.

Expo Preview Worker — The mobile runner. Polls pending expo_previews, manages one active tunnel at a time (expo start + ngrok), cleans workspaces, kills orphan processes, applies exponential backoff on errors.

The Klorv design system

I designed 30 game archetypes in the orchestrator package's ARCHETYPE_REGISTRY (runner, platformer, match3, idle-clicker, roguelike-dungeon, bullet-hell, crossword, sandbox-painting, card-deckbuilder, rhythm-tap, etc.). Each archetype defines a gameplay skeleton and a coherent visual theme.

Users prompt in free language, but the system constrains generation to an identified archetype — which guarantees code coherence and result quality.

Technical challenges

Pipeline reliability. An LLM can break anything. Error handling isn't an option, it's the core of the system. I set up a 10-minute max build timeout and a 3-minute repair timeout if the agent tries to fix an error. Jobs that exceed are killed cleanly and the AI cost stays predictable (~$0.01 per run on average with DeepSeek).

Separation of concerns. If the Claw Worker crashes, the rest keeps running. If the Expo Preview Worker bugs, builds keep generating. This strict separation is what makes the platform robust — not the code of each individual worker.

Freemium and quotas. Free tier allows 5 builds/day on the UI side and 20 builds/day via the API, with a monthly cap. Above that, Stripe paywall with 3 plans (pro, max, enterprise). The cost-guard computes AI cost in real-time during generation and cuts off if the quota is exceeded. No bad surprises for the user, no bad surprises for our DeepSeek invoice.

61 test files. With the pipeline distributed across multiple workers, it's test coverage that guarantees a change on one worker doesn't break the others.

Status

Publicly launched with freemium and Stripe paywall (3 plans: pro, max, enterprise). Auth via GitHub OAuth + Supabase. Deployed on Docker Swarm on Hetzner, GitHub Actions CI/CD.

Tech stack

| Layer | Technologies | | ------------------- | ---------------------------------------------------- | | Frontend | Next.js, React, TypeScript, Tailwind CSS | | Backend | Next.js API routes, Supabase (Postgres + Auth) | | Queue | BullMQ + Redis | | AI | DeepSeek API (reasoner for build, chat for ask) | | Workers | Node.js HTTP servers (3 independent Docker services) | | Preview | Expo + ngrok (live tunnels) | | Auth & payments | GitHub OAuth, Supabase Auth, Stripe | | Infra | Docker Swarm on Hetzner, GitHub Actions CI/CD |

What I'm taking away

Klorv forced me to rethink what "integrating an LLM in production" really means. The real challenge is never the prompt. It's the architecture around it: queues, timeouts, service isolation, cost guards, quotas, snapshots, rollbacks.

Anyone can build an AI demo. A reliable AI system in production is a different job — and that's exactly what I bring to AI integration missions today.

// stackNext.jsReactTypeScriptTailwind CSSSupabaseBullMQRedisDocker SwarmDeepSeek APIExpongrokStripeGitHub OAuthHetzner
// linksVisit Klorv
Klorv · AI-powered Mobile App Generation SaaS — Steven COPY