Code map
Proposition Studio, drawn to scale.
Every source file of the AI rendering studio I build and run, 1,473 of them, measured in lines and sorted into layers. The numbers come straight from the repository on the day of the snapshot.
What it does
A browser app for architectural visualisation. An architect uploads a screenshot of a 3D model and gets an image that looks like a photo of the finished building, in the same framing. Then they change parts of it and build variants, and every version stays in the project.
- 01→
Upload
A viewport capture, a model without materials, a physical model or a photo. No plugin, no export.
- 02→
Select
Click an object, point at a surface or paint with a brush. Up to four labelled regions, each with its own instruction.
- 03→
Reference
Sample boards and facade photos, up to four per generation. A reference can be tied to one label.
- 04→
Generate
Camera lock keeps angle, framing and massing, so variants differ only in what was changed.
- 05↺
Branch
Any result can be the next source. The history strip shows the path; failed steps go to the archive.
The repository as a floor plan
Each room is a directory, each tile a file. Area is lines of code, colour is the layer, hatching marks tests. Hover or tap any tile.
+ 24 smaller directories
Source and tests, per layer
Solid is source, hatched is tests. The last column is the test share of each layer.
Longest files
Billing reconciliation is the longest module at 3,428 lines, and its integration test is nearly as long at 3,097.
- 013,428lib/admin-stripe-reconciliation.server.ts
- 023,097lib/admin-stripe-reconciliation.postgres.integration.test.ts
- 032,590apps/marketing/app/styles/app.css
- 042,542lib/credit-ledger.server.test.ts
- 052,175lib/credit-ledger.server.ts
- 062,092lib/stale-pre-provider-recovery.server.test.ts
- 071,997lib/migration-chain.postgres.integration.test.ts
- 081,869lib/admin-economics.server.ts
- 091,693routes/api.projects.$projectId.generation-jobs.ts
- 101,561lib/paid-credit-expiry.postgres.integration.test.ts
- 111,502routes/admin.test.ts
- 121,445lib/generation-jobs.server.ts
How long a typical file is
67% of files stay under 200 lines; the median, 118, falls in the darkest bar. Only 9 pass 1,600.
317,075 lines. 147,000 of them exist only to check that the rest works.
How it was built
Proposition Studio runs as two React Router v7 apps on Cloudflare Workers, the product app and the marketing site, plus an internal Worker that handles uploads to R2. Data lives in Postgres on Neon behind versioned SQL migrations, and media sits in R2.
Billing runs on Stripe with a credit ledger and a reconciliation job, watched over by an admin control plane. The interface ships in English and Polish. I built it as the orchestrator of coding agents: every pull request runs CI, and merging and production deploys are two separate, manual gates.