Skip to content

AI app builder

Foundry

Describe an app, watch an agent build it in a Docker sandbox, and review the preview and diff before anything becomes real.

Foundry is an app builder where you describe an app and an agent builds it inside a Docker sandbox. You review a live preview and a diff, and nothing becomes real or billable until you accept it.

Jun to Oct 2026Live-tested against real models
foundry.local/projects/warehouse-inventory/builder
FCurrent workspacelive

FOUNDRY

What do you want to build?

Describe your app in a sentence. Foundry spins up a project, plans the work and starts building. You review and ship.

Web appWebsiteData appAutomation

Recent projects

3

Aurora Launch Page

WebsitePrivate

Updated Jul 8 · 16:20

Studio Booking

Web appPrivate

Updated Jul 7 · 10:42

Ops Dashboard

Data appPrivate

Updated Jul 5 · 09:15

01 / 06 · prompt

Motivation

I started with a prior-art study of 13 builders, from Lovable and Replit to Bolt.new, v0 and OpenHands. My first feature list read like capability areas, not a product. It had no single lifecycle from prompt to export, no real state machines, and no acceptance criteria that forced runtime proof instead of an agent saying it worked.

So I rewrote the spec around one lifecycle (prompt, task, run, diff, preview, verification, checkpoint, deploy, export) and seven product laws. The ones I care about most come from the complaints people have about incumbents. Failed generations never bill. Checkpoint equals commit, so there's one history. Secrets never land in chat, code or commits.

The code is written by agents under a spec-first process, with each claim reviewed by a second model. The point was to see how far that discipline carries a product this size.

Capabilities

  • Prompt-first projects home that creates a project and drops you into a three-pane builder: agent timeline, Files, Diff and Preview, and a task and checkpoint column.
  • Agent runs through Oh My Pi, one omp --mode rpc process per task inside the sandbox, with streamed prose and grouped tool calls in the timeline.
  • Seven task modes as a closed type. Discuss and plan structurally can't hold mutating capabilities, and a sensitive capability marked auto is a compile error.
  • Tool approval in the timeline with Approve and Reject, under a permission mode of Ask, Accept edits, Approve all or Auto.
  • Docker sandboxes by default, Firecracker opt-in, behind a preview proxy that strips headers and upgrades WebSockets.
  • Checkpoints are real git commits, with scoped restore: code only, preview, deploy config, or everything.
  • Cost ledger with credit events, budget caps and settlement. Debits only happen after accept.
  • A keyless inference gateway, so sandboxes never hold real provider keys.

Key decisions

Effect everywhere

Why

A browser-safe domain and RPC layer plus a node-only conductor built from Effect services. Typed errors, dependency injection and tracing run end to end, and one Schema decodes at every boundary.

What it cost

The learning curve is steep, and the planned move to Effect v4 starts with about 966 language-service findings to clear.

The sandbox is the wall, accept is the gate

Why

Oh My Pi gave me a full harness (MCP, todos, model roles) without building one. Tools run freely inside the sandbox and nothing becomes real until the diff is accepted.

What it cost

Oh My Pi doesn't expose Foundry's own test and build results, which breaks the golden-path live gate.

Billing boundary equals acceptance boundary

Why

One pure predicate decides whether a task is billable, and the only debit call site sits behind diff accept. That makes "failed generations never bill" code instead of pricing copy.

What it cost

Spend from a turn that dies partway through isn't recorded yet.

Checkpoint equals commit

Why

An internal git store holds the one history. Restore is a checkout and there are no two-way sync conflicts.

What it cost

GitHub sync is manual-first and still a stand-in, so GitHub operations return 501.

SQLite and Drizzle, no raw SQL

Why

git clone && pnpm dev with zero infrastructure, which matters when an agent sets up the stack.

What it cost

Postgres for production is a stated requirement with no driver wired in.

Architecture

The conductor owns every state change. The sandbox talks to models only through the keyless gateway, and the browser reaches the running app only through the preview proxy.

Limits and what's next

  • This write-up reflects the project as of 2026-10-12.
  • Narrow live specs passed against real models, at about 3 minutes and 45 cents per run. Running the full golden-path spec live needs the agent harness to report test and build results.
  • It runs as a single replica. Multi-replica needs a distributed config invalidator.
  • Each preview sandbox gets its own Docker network, which caps the default pool at about 31 concurrent previews. A startup reaper keeps the pool clean.
  • The Costs screen and line-level diff rendering are next on the UI list.
  • Moving restart-time deploys and migrations behind the action executor is fully specced at 51 tasks and is the next big change.

Notable

A billing law that cuts both ways

A task is billable only when it's done and its output is an accepted diff or an explicit no-op. The debit service refuses anything else, settlement checks the same predicate again, and the only debit call site is diff accept, so a failed or rejected generation can't be charged. On the last day of work I closed the other direction too: a model call that returns no usage now fails the turn instead of billing as free, so the platform never quietly eats a call it couldn't meter.

Stack and numbers

TypeScriptEffect@effect/rpcElysiaSQLite + DrizzleReact 19 + ViteHeroUI 3DockerOh My Pi
commits
1,434
lines of TypeScript
352
k
test files
640
OpenSpec changes
113