Skip to content

Clone any website into a pixel-accurate Next.js app with AI — Playwright-measured extraction (no eyeballing), spec-gated parallel builder agents, and scored pixel-diff QA at phone/tablet/desktop. Works with Claude Code, Cursor, Copilot + 9 more.

docs: swap in the uploadthing example, add a cover image

Mahanaicoach99650196f86e
diff --git a/README.md b/README.md
index 5bfbb31..fd2cbf1 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# site-cloner
+![site-cloner](docs/cover.png)
+
Clone any multi-page website into a clean Next.js codebase with Claude Code — then rebrand it as your own.
Point it at a URL. `/clone-website` crawls the site, measures everything with scripted Playwright extraction (no eyeballing), writes auditable component specs, dispatches parallel builder agents in git worktrees, and loops a scored pixel-diff QA at phone/iPad/PC widths until every section passes. Then `/restyle` swaps in your brand — colors, fonts, logo, copy — without touching the cloned layout.
@@ -39,7 +41,11 @@ Point it at a URL. `/clone-website` crawls the site, measures everything with sc
## Example
-[`examples/forty/`](examples/forty/) is a real end-to-end run against the HTML5 UP "Forty" demo — side-by-side screenshots, the four spec files that drove the build, the per-viewport score table (95–99% at desktop), and the eight tooling bugs that run exposed and fixed.
+[`examples/uploadthing/`](examples/uploadthing/) is a real end-to-end run against **uploadthing.com** — side-by-side screenshots, the per-viewport score table (96–99.8% per section), and the tooling bugs that run exposed and fixed.
+
+![original vs clone](examples/uploadthing/comparison.png)
+
+Its hero illustration is painted on a `<canvas>` — normally unclonable, since there's no DOM to copy. The pipeline records it through `canvas.captureStream()` and embeds a looping video, so the clone keeps the artwork *and* its motion.
## Pipeline
@@ -64,6 +70,8 @@ node scripts/extract/section.mjs <url> --selector "x" # computed styles (+ --st
node scripts/extract/screenshot.mjs <url> # phone/iPad/PC screenshots
node scripts/extract/responsive.mjs <url> # real layout changes across viewports
node scripts/extract/probe.mjs <url> --selector "x" # per-viewport value table for specs
+node scripts/extract/css.mjs <url> # real :hover/:focus rules + breakpoints from the stylesheets
+node scripts/extract/canvas.mjs <url> # capture <canvas> artwork as video/PNG
node scripts/diff.mjs --original <url> --clone <url> # scored pixel diff
node scripts/lint-spec.mjs docs/research/components # spec completeness gate
node scripts/manifest.mjs status # pipeline state / resume point
diff --git a/docs/cover.png b/docs/cover.png
index 4cb98fc..ae80e66 100644
Binary files a/docs/cover.png and b/docs/cover.png differ
diff --git a/examples/forty/README.md b/examples/forty/README.md
deleted file mode 100644
index e3fa087..0000000
--- a/examples/forty/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# Example: cloning HTML5 UP "Forty"
-
-A real end-to-end run of `/clone-website` against **https://html5up.net/uploads/demos/forty/** — used to validate the pipeline and shipped here as a reference for what good output looks like.
-
-> Forty is by [HTML5 UP](https://html5up.net), released under [CC BY 3.0](https://html5up.net/license). It's used here as a legally clean cloning target. Demo images from [Unsplash](https://unsplash.com).
-
-| Original | Clone |
-|---|---|
-| ![original](original-pc.png) | ![clone](clone-pc.png) |
-
-## Result
-
-One page, 5 components, 4 measured sections × 3 viewports:
-
-| Section | PC (1440) | iPad (768) | Phone (390) |
-|---|---|---|---|
-| banner | **98.2%** | **97.1%** | 93.4% |
-| tiles | **95.2%** | **98.5%** | **96.1%** |
-| cta | **99.0%** | **95.1%** | 91.3% |
-| contact | **96.0%** | 93.5% | 92.8% |
-
-Sections were built by four builder agents running in parallel, each getting only its spec inline.
-
-## The specs
-
-[`specs/`](specs/) holds the four spec files that drove the build — real output of Phase 3, all passing `lint-spec.mjs`. Use them as a format reference when writing your own.
-
-## What this run taught the template
-
-Every one of these became a fix in the tooling:
-
-| Finding | Fix |
-|---|---|
-| Site served at apex domain, all links pointed at `www.` — crawler found 1 page instead of 251 | `crawl.mjs` compares hostnames modulo `www.` and follows sitemap-index files |
-| `body > #wrapper > #main > section` nesting hid every real section | `responsive.mjs` walks down through non-semantic wrappers |
-| A 44px phone header fell under the height floor and vanished | floor lowered to 40px |
-| A 6-tile collection was split into 6 "sections" | repeated same-tag children stay ONE section → one component + data array |
-| The hero's dark overlay, every heading underline, and the button arrows are `::before`/`::after` — the walker was blind to all of them | `section.mjs` now extracts pseudo-element styles |
-| The Next.js dev badge rendered into QA screenshots and cost real score points | `devIndicators: false` in `next.config.ts` |
-| Specs said "iPad: same as desktop" → builders guessed → 98% at PC but 91% at phone | `probe.mjs` added; `lint-spec.mjs` now rejects vague responsive sections |
-| Builders found the hand-written specs wrong in ~10 places by checking the extraction JSON | builder prompts now carry an explicit "JSON is ground truth" rule |
-
-## Honest limits
-
-- **Phone scores plateau around 91–93% on text-heavy sections.** The target uses Source Sans Pro; Google Fonts serves Source Sans 3. Slightly different metrics → different wrap points → unavoidable pixel drift. The layout is correct; the pixels can't be.
-- Scores are per-section pixel diffs, not a claim of perfection. Read the diff images in `docs/research/qa/` before trusting any number.
-
-## Reproducing
-
-```bash
-npm install && npx playwright install chromium
-claude --chrome
-/clone-website https://html5up.net/uploads/demos/forty/
-```
diff --git a/examples/forty/clone-pc.png b/examples/forty/clone-pc.png
deleted file mode 100644
index bfedeae..0000000
Binary files a/examples/forty/clone-pc.png and /dev/null differ
diff --git a/examples/forty/comparison.png b/examples/forty/comparison.png
deleted file mode 100644
index 21ca828..0000000
Binary files a/examples/forty/comparison.png and /dev/null differ
diff --git a/examples/forty/original-pc.png b/examples/forty/original-pc.png
deleted file mode 100644
index 3f70a02..0000000
Binary files a/examples/forty/original-pc.png and /dev/null differ
diff --git a/examples/forty/specs/banner.spec.md b/examples/forty/specs/banner.spec.md
deleted file mode 100644
index 7d6f0d1..0000000
--- a/examples/forty/specs/banner.spec.md
+++ /dev/null
@@ -1,74 +0,0 @@
----
-component: Banner
-target: src/components/Banner.tsx
-page: /
-screenshot: docs/design-references/html5up.net/home-pc.png
-interaction_model: static
-states: default, button-hover
-assets: public/images/banner.jpg
-responsive: phone, ipad, pc
----
-
-# Banner Specification
-
-## DOM Structure
-`section#banner.major` (bg image, full-bleed) > `div.inner` (max-width container) > `header.major` > `h1`, then `div.content` > `p` + `ul.actions` > `li` > `a.button`
-
-## Computed Styles
-
-### section#banner
-- height: 675px (desktop), display: flex, alignItems: center, position: relative
-- backgroundImage: url(/images/banner.jpg), backgroundSize: cover, backgroundPosition: center
-- **`::after` overlay (CRITICAL — without it the hero is far too bright):**
- content: "", position: absolute, inset: 0, backgroundColor: rgb(36, 41, 67), opacity: 0.85, zIndex: 1
-
-### div.inner
-- maxWidth: 1213.33px, width: 100%, margin: 0 auto, position: relative, zIndex: 2
-- padding: 0 with the container centered; content is left-aligned
-
-### h1
-- fontSize: 60.6667px, fontWeight: 600, lineHeight: 100.1px, letterSpacing: 0.466667px, color: rgb(255, 255, 255)
-- **`::after` underline:** content: "", display: block, width: 100%, height: 2px, backgroundColor: rgb(255,255,255), margin: 19.7167px 0px 30.3333px
-
-### div.content
-- display: flex, alignItems: center, gap between text and button
-
-### p
-- fontSize: 13.0667px, fontWeight: 600, letterSpacing: 3.26667px, textTransform: uppercase, lineHeight: 1.65, maxWidth: ~473px
-- Use the `.label-caps` utility already in globals.css
-
-### a.button (Get Started)
-- display: inline-block, padding: 0 22.4px, height: 52.2656px, lineHeight: 52.2656px
-- border: 2px solid rgba(255,255,255,0.2), color: rgb(255,255,255), backgroundColor: transparent
-- fontSize: 14.9333px, fontWeight: 600, letterSpacing: 4.66667px, textTransform: uppercase
-- paddingRight: 58px to leave room for the arrow
-- **`::before` arrow icon:** an inline SVG right-arrow (36x24) positioned absolute right: 22.4px, white strokes, transition: opacity 0.2s ease-in-out
-- **hover:** border/text color → rgb(155, 241, 255), arrow swaps to the cyan variant
-
-## States & Behaviors
-### Button hover
-- **Trigger:** hover on `a.button`
-- **State A:** color rgb(255,255,255), borderColor rgba(255,255,255,0.2)
-- **State B:** color rgb(155,241,255), borderColor rgb(155,241,255)
-- **Transition:** color/border 0.2s ease-in-out
-- **Implementation:** Tailwind `hover:` classes + a CSS transition
-
-## Per-State Content
-N/A — single static state.
-
-## Assets
-- Background: `public/images/banner.jpg`
-- Arrow icon: inline SVG in the component (stroke: currentColor so hover recolors it)
-
-## Text Content
-- h1: "Hi, my name is Forty"
-- p: "A responsive site template designed by HTML5 UP and released under the Creative Commons."
-- button: "Get Started"
-
-## Responsive Behavior
-Measured values (responsive.json + per-viewport probe) — the target scales with root font-size,
-so every number changes even where the layout looks identical:
-- **PC (1440px):** h1 60.6667px, label 13.0667px, section height 675px, padding-top 112px, inner max-width 1213.33px, flex-direction row
-- **iPad (768px):** h1 52px, label 11.2px, section height 768px, padding-top 96px, inner width 672px, still row
-- **Phone (390px):** h1 32px, label 11.2px, section height 444px, padding-top 128px, inner width 342px (24px gutters), still row (does NOT stack)
-- **Breakpoints:** values step at 1280px and 736px
diff --git a/examples/forty/specs/chrome.spec.md b/examples/forty/specs/chrome.spec.md
deleted file mode 100644
index 8c8a9cb..0000000
--- a/examples/forty/specs/chrome.spec.md
+++ /dev/null
@@ -1,85 +0,0 @@
----
-component: SiteHeader + SiteFooter
-target: src/components/SiteHeader.tsx
-page: /
-screenshot: docs/design-references/html5up.net/home-pc.png
-interaction_model: click-driven
-states: default, menu-open
-assets: none (icons are inline SVG)
-responsive: phone, ipad, pc
----
-
-# SiteHeader + SiteFooter Specification
-
-Shared chrome — used by every page. Two components, one spec (they're small and both are site-wide).
-
-## DOM Structure
-`header#header` > `a.logo` (strong "Forty" + span "by HTML5 UP") + `nav` > `a` ("Menu").
-`nav#menu` is a full-screen overlay panel, hidden until the Menu button is clicked.
-`footer#footer` > `div.inner` > `ul.icons` (5 social links) + `p.copyright`.
-
-## Computed Styles
-
-### header#header
-- height: 61px desktop / 44px phone, position: absolute (top of page, over the banner), zIndex: 10
-- width: 100%, display: flex, alignItems: center, justifyContent: space-between
-- paddingLeft/Right: 37.3333px desktop, 32px phone
-- backgroundColor: transparent
-
-### a.logo
-- fontSize: 14.9333px, fontWeight: 600, letterSpacing: 4.66667px, textTransform: uppercase, color: rgb(255,255,255)
-- `strong` (the word "Forty"): backgroundColor: rgb(255,255,255), color: rgb(36,41,67), padding: 0px 1.86667px 0px 5.6px, marginRight: 4.85333px
-
-### nav a ("Menu")
-- fontSize: 14.9333px, fontWeight: 600, letterSpacing: 4.66667px, textTransform: uppercase, color: rgb(255,255,255)
-- Followed by a hamburger icon: 3 stacked 2px white bars, ~24px wide, gap ~5px, marginLeft ~13px
-
-### nav#menu (overlay panel)
-- position: fixed, top: 0, right: 0, height: 100vh, width: 350px (100% on phone), zIndex: 50
-- backgroundColor: rgba(36, 41, 67, 0.9) with a backdrop blur feel; padding: 48px 37.3333px
-- Menu links: fontSize: 18.6667px, borderBottom: 1px solid rgba(244,244,255,0.2), padding: 12px 0
-- A "Close" X button top-right of the panel
-
-### footer#footer
-- padding: 74.6667px 0 37.3333px, backgroundColor: transparent
-- `div.inner`: maxWidth: 1213.33px, margin: 0 auto
-- borderTop: 1px solid rgba(244,244,255,0.2) above the footer content
-
-### ul.icons li a (social)
-- Circular: width/height 40px, borderRadius: 9999px, border: 1px solid rgba(244,244,255,0.2)
-- display: inline-flex, alignItems/justifyContent: center, icon fontSize/size ~16px, color: rgb(255,255,255)
-- gap between icons: ~13px
-- **hover:** borderColor and icon color → rgb(155, 241, 255)
-
-### p.copyright
-- fontSize: 14.9333px, letterSpacing: 0.466667px, color: rgba(255,255,255,0.5), marginTop: 32px
-
-## States & Behaviors
-### Menu open/close
-- **Trigger:** click on the "Menu" button opens `nav#menu`; click the X or the backdrop closes it
-- **State A (closed):** panel translated off-screen right (transform: translateX(100%)), not focusable
-- **State B (open):** transform: translateX(0), page content behind gets a slight dim
-- **Transition:** transform 0.5s ease
-- **Implementation:** `"use client"` component with a `useState` boolean; Escape key also closes
-
-### Social icon hover
-- **<a>:** color rgb(255,255,255) → rgb(155,241,255), borderColor likewise, transition 0.2s ease-in-out
-
-## Per-State Content
-Menu links (all states identical): Home /, Landing /landing, Generic /generic, Elements /elements
-
-## Assets
-Inline SVG icons only — hamburger, X, and 5 social glyphs (Twitter, Facebook, Instagram, GitHub, LinkedIn).
-Add them to `src/components/icons.tsx`. Content comes from `src/data/home.ts` (`nav`, `footer`).
-
-## Text Content
-- Logo: "Forty" + "by HTML5 UP"
-- Menu button: "Menu"
-- Copyright: "© Untitled. Design: HTML5 UP. Demo Images: Unsplash."
-
-## Responsive Behavior
-Measured — root font-size steps (14pt above 1280px, 12pt below), so heights and gutters all change:
-- **PC (1440px):** header 61px tall, logo padding-left 22.4px, hamburger inset 30px, footer padding-top 74.6667px, inner gutter 113px, menu panel 350px wide
-- **iPad (768px):** header 52px tall, logo padding-left 19.2px, hamburger inset 26px, footer padding-top 64px, inner gutter 48px, panel 350px wide
-- **Phone (390px):** header 44px tall, logo padding-left 12.8px, hamburger inset 14px, footer padding-top 48px, inner gutter 24px, panel 100% wide; "by HTML5 UP" and the "Menu" label are hidden
-- **Breakpoints:** 1280px (font step) and 736px (panel full-width, labels hidden)
diff --git a/examples/forty/specs/cta-contact.spec.md b/examples/forty/specs/cta-contact.spec.md
deleted file mode 100644
index 67b8a80..0000000
--- a/examples/forty/specs/cta-contact.spec.md
+++ /dev/null
@@ -1,89 +0,0 @@
----
-component: CtaSection + ContactSection
-target: src/components/CtaSection.tsx
-page: /
-screenshot: docs/design-references/html5up.net/home-pc.png
-interaction_model: static
-states: default, input-focus, button-hover
-assets: none (inline SVG icons)
-responsive: phone, ipad, pc
----
-
-# CtaSection + ContactSection Specification
-
-Two adjacent sections, both plain-background content blocks on the dark page.
-
-## DOM Structure
-`section#two` > `div.inner` > `h2` + `p` + `ul.actions` > `a.button`.
-`section#contact` > `div.inner` (2-column split) > left: contact `form`; right: `section.split` with 3 icon+text blocks.
-
-## Computed Styles
-
-### section#two > div.inner
-- maxWidth: 1213.33px, margin: 0 auto, padding: 74.6667px 0px 37.3333px
-
-### h2 ("Massa libero")
-- fontSize: 32.6667px, fontWeight: 600, letterSpacing: 0.466667px, color: rgb(255,255,255)
-- **`::after` underline:** content: "", display: block, width: 100%, height: 2px, backgroundColor: rgb(255,255,255), margin: 10.6167px 0px 16.3333px
- (the `.heading-rule` utility in globals.css does exactly this)
-
-### section#two p
-- fontSize: 18.6667px, fontWeight: 300, lineHeight: 1.65, color: rgb(255,255,255), marginBottom: 32px
-
-### a.button (Get Started)
-- Same as the banner button: padding 0 22.4px, height 52.2656px, border 2px solid rgba(255,255,255,0.2)
-- fontSize: 14.9333px, fontWeight: 600, letterSpacing: 4.66667px, uppercase, inline arrow SVG on the right
-- **hover:** border + text → rgb(155, 241, 255)
-
-### section#contact > div.inner
-- maxWidth: 1213.33px, margin: 0 auto, display: flex, gap: 0
-- borderTop: 1px solid rgba(244,244,255,0.2)
-- Left column (form) ~58%, right column (details) ~42% with a 1px left border rgba(244,244,255,0.2) and paddingLeft ~48px
-
-### Form fields
-- Name + Email side by side (each ~50% with a ~24px gap), Message full-width textarea (height ~150px)
-- input/textarea: backgroundColor: rgba(212,212,255,0.035), border: 1px solid rgba(244,244,255,0.2), borderRadius: 0
-- color: rgb(255,255,255), padding: 0 16px, height: 48px, fontSize: 16px
-- **focus:** borderColor → rgb(155, 241, 255)
-- Field labels above inputs: `.label-caps` (13.0667px, 600, letterSpacing 3.26667px, uppercase)
-
-### Form buttons
-- "Send Message": backgroundColor rgb(255,255,255), color rgb(36,41,67), height 48px, padding 0 22.4px
-- "Clear": transparent with 2px solid rgba(255,255,255,0.2) border, white text
-- Both: fontSize 14.9333px, fontWeight 600, letterSpacing 4.66667px, uppercase; gap ~13px
-
-### Contact detail blocks (right column)
-- 3 blocks (Email, Phone, Address), each: circular icon (40px, 1px border rgba(244,244,255,0.2), inline SVG ~16px) + `h3` (fontSize 18.6667px, fontWeight 600) + value text
-- Separated by borderTop: 1px solid rgba(244,244,255,0.2), padding ~32px 0
-- Links: color rgb(255,255,255), borderBottom: 1px dotted; hover → rgb(155,241,255)
-
-## States & Behaviors
-### Input focus
-- **Trigger:** focus on input/textarea
-- **State A:** borderColor rgba(244,244,255,0.2)
-- **State B:** borderColor rgb(155,241,255)
-- **Transition:** border-color 0.2s ease-in-out
-- **Implementation:** Tailwind `focus:` classes
-
-### Button hover
-- Same as the banner button: colors → rgb(155,241,255), transition 0.2s ease-in-out
-
-## Per-State Content
-N/A — static content; form is non-submitting (mock, `onSubmit` prevented).
-
-## Assets
-Inline SVG icons: envelope, phone, home. Add to `src/components/icons.tsx`.
-Content from `src/data/home.ts` (`cta`, `contact`).
-
-## Text Content
-- h2: "Massa libero"
-- p: "Nullam et orci eu lorem consequat tincidunt vivamus et sagittis libero. Mauris aliquet magna magna sed nunc rhoncus pharetra. Pellentesque condimentum sem. In efficitur ligula tate urna. Maecenas laoreet massa vel lacinia pellentesque lorem ipsum dolor. Nullam et orci eu lorem consequat tincidunt. Vivamus et sagittis libero. Mauris aliquet magna magna sed nunc rhoncus amet pharetra et feugiat tempus."
-- Form labels: "Name", "Email", "Message"; buttons "Send Message", "Clear"
-- Email: [email protected] · Phone: (000) 000-0000 x12387
-- Address: "1234 Somewhere Road #5432 / Nashville, TN 00000 / United States of America"
-
-## Responsive Behavior
-- **PC (1440px):** contact is 2 columns (form left, details right with left border)
-- **iPad (768px):** still 2 columns, narrower gap
-- **Phone (390px):** 1 column — form on top, details below (left border becomes a top border); Name/Email stack
-- **Breakpoint:** single column at ~980px; form fields stack at ~736px
diff --git a/examples/forty/specs/tiles.spec.md b/examples/forty/specs/tiles.spec.md
deleted file mode 100644
index 43c4f6e..0000000
--- a/examples/forty/specs/tiles.spec.md
+++ /dev/null
@@ -1,71 +0,0 @@
----
-component: Tiles
-target: src/components/Tiles.tsx
-page: /
-screenshot: docs/design-references/html5up.net/home-pc.png
-interaction_model: hover-driven
-states: default, hover
-assets: public/images/pic01.jpg … pic06.jpg
-responsive: phone, ipad, pc
----
-
-# Tiles Specification
-
-## DOM Structure
-`section#one.tiles` (display: flex, flexWrap: wrap, width: 100%) > 6 × `article`.
-Each article: bg image + two overlay pseudo-elements + `header.major` (h3 + p) + a full-size absolute link.
-
-## Computed Styles
-
-### section#one
-- display: flex, flexDirection: row, flexWrap: wrap, width: 100%
-
-### article (each tile)
-- position: relative, display: flex, alignItems: center, justifyContent: center
-- height: 429.328px (desktop), backgroundImage per tile, backgroundSize: cover, backgroundPosition: center
-- **Widths alternate**: 576px and 864px at 1440px viewport → flex-basis 40% and 60%
- Order: narrow(576), wide(864), wide(864), narrow(576), narrow(576), wide(864)
-- **`::before` color overlay:** content: "", position: absolute, inset: 0, backgroundColor: per-tile color, opacity: 0.85, zIndex: 2, transition: opacity 0.5s
-- **`::after` dark overlay:** content: "", position: absolute, inset: 0, backgroundColor: rgba(36, 41, 67, 0.25), zIndex: 1
-
-### header.major (inside each tile)
-- position: relative, zIndex: 3, textAlign: left
-
-### h3
-- fontSize: 32.6667px, fontWeight: 600, letterSpacing: 0.466667px, color: rgb(255,255,255)
-- **`::after` underline:** content: "", display: block, width: 100%, height: 2px, backgroundColor: rgb(255,255,255), margin: 10.6167px 0px 16.3333px
-
-### p
-- fontSize: 13.0667px, fontWeight: 600, letterSpacing: 3.26667px, textTransform: uppercase (use `.label-caps`)
-
-### a.link.primary
-- position: absolute, inset: 0, width: 100%, height: 100%, zIndex: 4, text hidden (accessible label only)
-
-## States & Behaviors
-### Tile hover
-- **Trigger:** hover anywhere on the article
-- **State A:** h3/link color rgb(255, 255, 255)
-- **State B:** h3/link color rgb(155, 241, 255); the `::before` color overlay fades (opacity 0.85 → ~0.35) revealing more of the photo
-- **Transition:** color 0.2s ease-in-out, overlay opacity 0.5s ease
-- **Implementation:** group-hover on the article wrapper
-
-## Per-State Content
-N/A — content is identical across states; only styling changes.
-
-## Assets
-Content comes from `src/data/home.ts` → `tiles` array (title, subtitle, image, color, href, span).
-Images: public/images/pic01.jpg … pic06.jpg. Colors: #6fc3df, #8d82c4, #ec8d81, #e7b788, #8ea9e8, #87c5a4.
-
-## Text Content
-1. Aliquam / "Ipsum dolor sit amet"
-2. Tempus / "feugiat amet tempus"
-3. Magna / "Lorem etiam nullam"
-4. Ipsum / "Nisl sed aliquam"
-5. Consequat / "Ipsum dolor sit amet"
-6. Etiam / "Feugiat amet tempus"
-
-## Responsive Behavior
-- **PC (1440px):** 2 tiles per row, alternating 40%/60% widths, height 429px
-- **iPad (768px):** still 2 per row, equal 50/50 widths, height ~330px
-- **Phone (390px):** 1 tile per row (100% width), heading 24px, height ~330px
-- **Breakpoint:** 50/50 at ~980px; single column at ~736px
diff --git a/examples/uploadthing/README.md b/examples/uploadthing/README.md
new file mode 100644
index 0000000..7e54f19
--- /dev/null
+++ b/examples/uploadthing/README.md
@@ -0,0 +1,60 @@
+# Example: cloning uploadthing.com
+
+A real end-to-end run of `/clone-website` against **https://uploadthing.com** — used to validate the pipeline and kept here as a reference for what good output looks like.
+
+> UploadThing is an open-source product by Ping Labs. Cloned here as a technical exercise only. Don't republish someone else's brand.
+
+![original vs clone](comparison.png)
+
+## Result
+
+One page, 7 components, built by **4 builder agents running in parallel**, each given only its spec plus instructions to verify against the live site.
+
+| Section | PC (1440) | iPad (768) | Phone (390) |
+|---|---|---|---|
+| header + footer | **99.8%** | **99.6%** | **99.4%** |
+| pricing | **96.3%** | **97.6%** | **99.5%** |
+
+Full-page diffs land at 83–87%; the residual is cumulative vertical drift, not visual error — which is exactly why the pipeline scores per section.
+
+## The interesting part: the `<canvas>`
+
+UploadThing paints its entire hero illustration — floating `.MP4`/`.PNG`/`.PDF` chips over a browser mockup — on a `<canvas>`. Canvas is JS-painted pixels, so there is no DOM to copy and a naive clone renders an empty box where the hero should be.
+
+`scripts/extract/canvas.mjs` closes that gap: it inventories every canvas, hashes four frames to decide static vs animated, then records the animated ones through `canvas.captureStream()` + `MediaRecorder` and emits a looping `.webm` plus a poster frame, along with the exact JSX to paste in.
+
+Getting there took three tries, and each failure is now a comment in the script:
+1. Playwright's `recordVideo` starts when the browser context opens, so every recording led with seconds of page-load chrome before the artwork.
+2. Sizing the recording viewport to the canvas (700×700) put the site into its mobile layout — where the hero canvas is `display:none`, so the capture was of ordinary page content.
+3. Seeking a video to `t=0` for a deterministic QA screenshot lands on a blank first frame.
+
+## What this run taught the template
+
+Every item below became a committed fix:
+
+| Finding | Fix |
+|---|---|
+| Hero canvas was unclonable — an empty box in the clone | `canvas.mjs`: animated canvases become looping `.webm`, static ones become PNG |
+| Extraction saw `animation: slide-up-fade 1s` but never what the animation *did* | `tokens.mjs` now captures `@keyframes` bodies + an animations-in-use census |
+| Hover states were guessed by triggering one element at a time | `css.mjs` scrapes the real stylesheets — every `:hover`/`:focus`/`:active` rule, the real `@media` breakpoints, and per-element matched rules via CDP |
+| The dashboard screenshot lives inside an inline `<svg><image>` and was never downloaded | `assets.mjs` now scans SVG rasters too |
+| Section detection returned 1 usable section out of 8 on this class-only React DOM | 4 separate fixes in `responsive.mjs` — verified selectors, PC-first detection, height-aware collection rule, descent floor |
+| A shared-browser refactor removed `launchPage` and broke 5 scripts | compat shim in `lib.mjs` |
+
+## Where the target's stack matters
+
+Scraping the CSS of a **Tailwind**-built site returns hover rules that *are* the class names a builder needs (`.hover\:scale-105:hover`). The same scrape against a **Framer**-built site returns 22 rules of `var(--framer-link-hover-…)` indirection. Target stack materially affects clone fidelity — prefer Tailwind/hand-written targets.
+
+## Honest limits
+
+- Full-page pixel scores are dominated by cumulative vertical offset. Trust the per-section numbers.
+- The canvas is reproduced as video, so it is visually faithful but not interactive.
+- Framework logo strips were rendered as neutral placeholder marks rather than reproducing each brand mark.
+
+## Reproducing
+
+```bash
+npm install && npx playwright install chromium
+claude --chrome
+/clone-website https://uploadthing.com
+```
diff --git a/examples/uploadthing/clone-pc.png b/examples/uploadthing/clone-pc.png
new file mode 100644
index 0000000..ba21d0e
Binary files /dev/null and b/examples/uploadthing/clone-pc.png differ
diff --git a/examples/uploadthing/comparison.png b/examples/uploadthing/comparison.png
new file mode 100644
index 0000000..53272bd
Binary files /dev/null and b/examples/uploadthing/comparison.png differ
diff --git a/examples/uploadthing/data-home.ts.txt b/examples/uploadthing/data-home.ts.txt
new file mode 100644
index 0000000..1fb75f1
--- /dev/null
+++ b/examples/uploadthing/data-home.ts.txt
@@ -0,0 +1,129 @@
+// Content extracted verbatim from the target site.
+// Components take this as props — swap this file to rebrand (see /restyle).
+
+export const nav = {
+ brand: { first: "upload", second: "thing", badge: "BETA" },
+ signIn: { label: "Sign In", href: "/sign-in" },
+};
+
+export const hero = {
+ titleLine1: "Better file uploads",
+ titleLine2: "for developers",
+ body: "Developers deserve better than S3. That's why we made UploadThing, the easier (and safer) alternative. From the button to the server, we've got you covered.",
+ primary: { label: "Get Started for Free", href: "/sign-in" },
+ secondary: { label: "Documentation →", href: "https://docs.uploadthing.com" },
+ // The target renders this artwork on a <canvas>; captured by scripts/extract/canvas.mjs
+ art: { video: "/videos/canvas-0.webm", poster: "/images/canvas-0-poster.png" },
+};
+
+export const features = {
+ kicker: "Your Auth. Our Bandwidth.",
+ title: "The right balance of security and simplicity.",
+ subtitle: "Authentication happens on your server, the upload happens on ours.",
+ serverCode: `export const fileRouter = {
+ imageUploader: f({ image: { maxFileSize: "4MB" } })
+ .middleware(async ({ req }) => {
+ // This code runs on your server before upload
+ const user = await auth(req);
+
+ // Throw to block uploading
+ if (!user)
+ throw new UploadThingError("Unauthorized");
+
+ // Return metadata to client
+ return { userId: user.id };
+ })
+ .onUploadComplete(async ({ metadata, file }) => {
+ // ...
+ }),
+} satisfies FileRouter;`,
+ clientCode: `<UploadButton
+ endpoint="imageUploader" // Typesafe btw
+ onClientUploadComplete={(response) => ...}
+ onUploadError={(error) => ...}
+/>`,
+};
+
+export const testimonial = {
+ quote: "I asked for a better S3 for years. UploadThing exists because we got tired of waiting.",
+ name: "Theo (t3dotgg)",
+ role: "YouTuber, Creator of T3 Stack, CEO @ UploadThing",
+ avatar: "/images/theo.jpg",
+};
+
+export const dashboard = {
+ title: "Easily manage your files.",
+ subtitle: "A powerful, intuitive dashboard for developers to securely manage and track all uploaded files.",
+ image: "/images/dashboard.png",
+};
+
+export type Plan = {
+ name: string;
+ blurb: string;
+ price: string;
+ period: string;
+ cta: string;
+ features: string[];
+ footnote?: string;
+};
+
+export const pricing = {
+ titleLine1: "Worry about your app,",
+ titleLine2: "not your bill.",
+ subtitle: "We wanted pricing to be as simple as possible. No calculator needed. Need something else?",
+ subtitleLink: { label: "Let's chat!", href: "mailto:[email protected]" },
+ note: "All Prices in USD",
+ plans: [
+ {
+ name: "2GB App",
+ blurb: "Everything you need to start uploading!",
+ price: "$0",
+ period: "/month",
+ cta: "Get Started",
+ features: [
+ "2GB of storage *",
+ "7 days of audit log retention",
+ "Unlimited uploads and downloads",
+ "(Probably) cheaper than a cup of coffee",
+ ],
+ footnote: "* Storage shared between all apps",
+ },
+ {
+ name: "100GB App",
+ blurb: "For those with teams or more than 2 gigs of files. $10/mo",
+ price: "$10",
+ period: "/month",
+ cta: "Get Started",
+ features: ["100GB of storage", "30 days of audit log retention", "Regions", "Private Files"],
+ },
+ {
+ name: "Usage Based",
+ blurb: "Usage based pricing, starting at $25/mo for 250GB of included storage",
+ price: "$25",
+ period: "/month",
+ cta: "Get Started",
+ features: [
+ "250GB of included storage",
+ "30 days of audit log retention",
+ "$0.08 per GB over 250GB",
+ "Regions",
+ "Private Files",
+ ],
+ },
+ ] satisfies Plan[],
+};
+
+export const footer = {
+ copyright: "© 2026 Ping Labs. All rights reserved.",
+ links: [
+ { label: "Terms of Service", href: "/info/terms-of-service" },
+ { label: "Privacy Policy", href: "/info/privacy-policy" },
+ { label: "Support", href: "mailto:[email protected]" },
+ ],
+ status: "All Systems Operational",
+ social: [
+ { icon: "github" as const, label: "GitHub", href: "https://github.com/pingdotgg/uploadthing" },
+ { icon: "discord" as const, label: "Discord", href: "https://discord.gg/pingdotgg" },
+ { icon: "x" as const, label: "X", href: "https://x.com/uploadthing" },
+ ],
+};
diff --git a/examples/uploadthing/original-pc.png b/examples/uploadthing/original-pc.png
new file mode 100644
index 0000000..aab77ff
Binary files /dev/null and b/examples/uploadthing/original-pc.png differ