Build
How Virex turns a prompt into a working repo
Every build follows the same predictable path: Virex parses your prompt into structured intent, routes it through the right lane (site, app, or creative), generates design tokens, picks or generates sections, customizes them to match your brief, and assembles the final project. You get a real downloadable repo at the end — not a sandbox.
Build overview
What happens when you build
Virex is an engine, not a single AI call. The pipeline orchestrates curated section libraries, design token systems, foundation templates, and targeted AI passes — each picked for what they do best. Here's the flow at a high level.
1. Intake
Claude Haiku parses your prompt into structured intent: project type, vibes, audience, tone, formality, energy, color hints, features. Works in any language — Dutch, Spanish, French, German, English — same quality each time.
2. Path routing
The engine picks one of three lanes. Site (1) for marketing pages and landings — flat structure, curated sections. App (2) for apps with auth, dashboards, and routing — sits on top of a foundation template. Creative (3) for prompts that don't fit the curated library — full LLM section generation.
3. Design tokens
A preset is picked based on intent (corporate-navy, warm-amber, neon-cyber, etc.) and customised with your brand color hint. Sets up the entire --virex-* CSS variable namespace so every section renders consistent.
4. Section selection (path 1 + 2)
Curated section library, scored against your intent. Same prompt twice produces different — but coherent — results, not the exact same output every time.
5. Section customization
Claude Sonnet 4.6 rewrites copy and props per section, conform the tone the intake captured. Section structure stays from the curated source; only the text/image/icon slots change.
6. Creative path (path 3 only)
For prompts the curated library can't handle — “asteroid rain hero with 3D globe”, “particle field background with custom CTA card” — the engine generates an outline, then each section from scratch with validation. Failed sections retry; on Premium and Pro, hard failures escalate to Engine Plus automatically.
7. Assembly
Foundation tree (path 2) gets copied; sections layer onto a route group (`(virex-marketing)/`); mobile screens auto-wire into the navigator (Expo Router or React Navigation). Static preview HTML, build report, and download zip get prepared.
8. Validation + delivery
Every section passes a validation check (parses, has required pieces, sane length, no banned vars). The engine emits live progress events you see in the workspace. Final output: a downloadable Next.js or Expo repo, real and self-contained.
Engine tiers
Standard, Deep, and Engine Plus
Virex routes prompts through different lanes based on your plan. The lane names are stable; the engine internals get swapped for stronger models over time without changing what you experience.
Standard Engine (Free + Starter)
The lighter lane on every build. Curated section library, foundation templates, full path routing. The engine path itself is identical to Premium — only the lane is lighter.
Deep Engine (Premium)
The main lane on every pass + automatic Engine Plus rescue when a creative section fails validation. Full capability features (maps, charts, calendars, animations, search, file upload), open-ended codegen for novel features, unlimited Supabase schemas with RLS.
Engine Plus (Pro)
The strongest lane on every pass with full rescue (no rate limits within your credit pool). Priority build queue, 4 concurrent builds for parallel agency workflows, larger upload caps.
The engine learns and improves over time — our curated section library grows, foundation templates expand, and selection logic gets smarter about which combinations work. For users that means builds become faster, cheaper, and better over time without you doing anything. We aim for the best output at the lowest cost so we can keep delivering more value at fair pricing.
Engine credits
One shared monthly credit pool covers builds and AI edits
Each plan comes with a transparent monthly engine credit pool. Builds, AI edits, capability features, custom feature codegen, and Engine Plus rescue all draw from the same pool. Cosmetic edits stay free + unlimited and never count against credits.
What burns credits
Building a project, AI-driven edits (refine, rewrite, restructure), capability features (maps, charts, …), open-ended codegen for novel features, automatic Engine Plus rescue on hard creative sections, schema generation.
What is always free
Cosmetic edits — color changes, sizing, spacing, padding, border radius, density. They're handled deterministically, not by AI, so they cost nothing. Unlimited on every paid plan.
Rough costs per action
Standard build ≈ 450 credits. Creative build ≈ 750. Mini edit ≈ 20. Medium edit ≈ 40. Best mode medium edit ≈ 120 (Pro opt-in). Auto rescue ≈ 300 (when Sonnet needs an Opus retry). Premium 25,000-credit pool covers ~55 builds + ~400 medium edits or any mix; Pro 80,000 covers ~180 builds + 1,000+ edits.
Soft-cap behavior at the edges
0–94% of pool: full Deep Engine power, no UI signal. 90–94% triggers a heads-up notification (still full power). 95–99% switches complex passes to the Standard Engine for the last 5% — you don't dead-end on the cap. 100% drops to deterministic-only — cosmetic edits keep working, AI edits pause until the 1st of next month. No surprise charges, no upsell pop-ups, no overage fees.
Plain English
Think of credits like a monthly meal plan. Big mains (full builds, multi-page edits) take a portion. Small bites (color tweaks, sizing) come from the cold bar and don't count. As you approach the end of the month the kitchen quietly switches to lighter dishes for the last few orders so you never get turned away — full kitchen returns on the 1st.
Engine Plus rescue — automatic, gated by pool
When a creative section fails validation (broken JSX, missing required pieces, length out of range), the engine automatically retries with Engine Plus — the strongest lane available. You never ask for it; it just happens when needed. Premium gets ~10 of these per month from the pool, Pro gets ~25. If your pool is below 1,500 credits remaining, the engine skips the rescue and lets the section drop instead — no point burning ~1,500 credits on a retry when your remaining budget is already thin.
Premium and Pro never run out of builds
If you exhaust the pool partway through the month, the engine drops to deterministic-only (cosmetic edits keep working). On the 1st the pool refills automatically. No action required.
What you give up at 100%
No new AI builds, no AI edits, no Engine Plus rescue. Cosmetic edits keep working free + unlimited. Repair attempts on existing builds still run. Existing repos stay untouched.
Starter is volume, not crippled
4,000 monthly credits cover ~13 builds + ~50 edits or any mix. Cosmetic edits stay free + unlimited. 1 schema sample per month — when you outgrow that, Premium gets you unlimited schemas with RLS.
Edit / Repair
Continuation on the same repo
Once a repo exists — Virex-generated or imported — every follow-up change lands as a bounded edit. You keep what works, refine what doesn't, with full version history. Edits target the same set of allowed paths as builds; package manifests, lockfiles, middleware, and build config are protected by default.
Edit classes
Every request is classified into one of four bands. Cosmetic (color, sizing, spacing) — free, deterministic. Mini (single section copy rewrite) — light Deep Engine pass. Medium (multi-section restructure) — full Deep Engine pass. Large (cross-cutting structural change) — Deep Engine with broader context. The right class picks the right cost automatically.
Always-included context
Every AI edit gets globals.css, app/page.tsx, app/layout.tsx, and tailwind.config in context regardless of prompt — so “change color” / “verander kleur” / “cambiar color” all reliably hit globals.css without language-specific routing.
Repair mode
Paste an error message or describe the failure, and the engine focuses on the affected files with stricter scope, fewer touched files, and tighter validation. Repair runs through the same proposer with a tighter context cap.
History and rollback
Every edit creates a new version on the same project. If an edit lands somewhere you don't like, the previous version stays downloadable. Nothing gets overwritten permanently.
The workspace explained per skill level
The editing docs cover the actual workspace UI — chat, click-to-edit, Monaco — plus every keyboard shortcut and how the rebuild loop works behind the scenes. Layered for beginners, regular builders, and developers so each level reads in their own language.
Import existing repos
Bring your own codebase into the continuation loop
Virex isn't only for net-new generation. If you already have a Next.js or Expo repo, you can import it and use the same edit, repair, and rebuild flow on top of what you've already built.
- Upload a ZIP of the repo or connect a Git source where supported.
- Virex reads the existing structure, respects your file layout, and treats unknown files as protected by default.
- Edits, repairs, and feature expansions run with the same guardrails as a freshly generated repo.
- You keep the same ownership story — download, self-host, version — at every step.
When importing works best
Virex continuation is strongest on Next.js 15/16 and Expo projects that follow standard conventions (app router, file-based routing, conventional config). Heavily customised build pipelines may need light cleanup before the engine can assist confidently.
Images
How Virex fills images in your build
Every generated app ships with placeholder images already wired in so nothing ever looks empty. You can swap them for your own without touching any Virex logic.
The default — curated stock photos
Virex uses picsum.photos with a deterministic seed per app and slot. The same app always gets the same images across builds, and different apps get different ones. Zero setup, zero cost.
Your own — drop them in public/images/
Create public/images/ in your repo and add .png / .jpg / .webp / .svg files. Virex detects them on the next build or edit and cycles through them in every slot that needs an image. The stock fallback disappears the moment you add one.
Importing a repo with images?
When you import a repo that already has files under public/images/ or public/assets/, Virex recognises them as the source of truth. New generations on top won't overwrite your own images — they just pull from the folder.
Components
What ships in every Virex build
Real production stack — Next.js or Expo on top of the standard open-source ecosystem. Commercial use is freely allowed; see the Code license docs for the full legal picture.
Web (Next.js)
shadcn/ui patterns, our curated section library (~106 sections, growing), Tailwind CSS, framer-motion for animations, lucide-react for icons. Modern, idiomatic, no Virex runtime.
Mobile (Expo / React Native)
Expo Router or React Navigation depending on the foundation, our curated mobile screen library. Hot reload, EAS deploy, the standard Expo workflow.
Next
Where to go from here
Pick the docs that match what you're about to do.
