launchframe 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +147 -147
- package/bin/launchframe.mjs +315 -315
- package/package.json +1 -1
- package/template/.amazonq/cli-agents/clone-website.json +1 -1
- package/template/.amazonq/rules/project.md +120 -109
- package/template/.augment/commands/clone-website.md +1 -1
- package/template/.claude/skills/clone-website/SKILL.md +534 -534
- package/template/.clinerules +120 -109
- package/template/.codex/skills/clone-website/SKILL.md +1 -1
- package/template/.continue/commands/clone-website.md +1 -1
- package/template/.continue/rules/project.md +120 -109
- package/template/.cursor/commands/clone-website.md +1 -1
- package/template/.cursor/rules/project.mdc +22 -20
- package/template/.gemini/commands/clone-website.toml +1 -1
- package/template/.github/copilot-instructions.md +120 -109
- package/template/.github/skills/clone-website/SKILL.md +1 -1
- package/template/.opencode/commands/clone-website.md +1 -1
- package/template/.windsurf/workflows/clone-website.md +1 -1
- package/template/AGENTS.md +100 -89
- package/template/README.md +121 -120
- package/template/START_HERE.md +15 -15
- package/template/docs/design-references/playwright-example.com-1440px.png +0 -0
- package/template/docs/design-references/playwright-example.com-390px.png +0 -0
- package/template/docs/research/INSPECTION_GUIDE.md +109 -109
- package/template/package.json +63 -60
- package/template/scripts/recon-playwright.mjs +323 -0
|
@@ -45,6 +45,17 @@ Treat these as **first-class deliverables**, not polish at the end.
|
|
|
45
45
|
- `npm run lint` — ESLint check
|
|
46
46
|
- `npm run typecheck` — TypeScript check
|
|
47
47
|
- `npm run check` — Run lint + typecheck + build
|
|
48
|
+
- **`npm run recon`** — **Playwright** capture: full-page screenshots, `computed-snapshot.json`, `MEDIA_MANIFEST.md` (use when Browser MCP / Chrome DevTools MCP is broken or missing)
|
|
49
|
+
- **`npm run recon:headed`** — Same as `recon` but **headed** Chromium (often better for WAF / “Just a moment…” pages)
|
|
50
|
+
|
|
51
|
+
**Playwright browser binaries (once per machine):** `npx playwright install chromium`
|
|
52
|
+
|
|
53
|
+
## When Browser MCP is down
|
|
54
|
+
Prefer **Playwright** for repeatable extraction in-repo — do **not** rely on Chrome DevTools MCP alone.
|
|
55
|
+
|
|
56
|
+
1. Run **`npm run recon`** (or **`npm run recon:headed`** if headless hits a challenge page).
|
|
57
|
+
2. Read **`docs/research/computed-snapshot.json`**, **`docs/research/MEDIA_MANIFEST.md`**, and **`docs/research/EXTRACTION_LIMITATIONS.md`** before writing specs.
|
|
58
|
+
3. Fill **`scripts/download-assets.mjs`** from `MEDIA_MANIFEST.md` and run it to populate `public/images/` and `public/videos/`.
|
|
48
59
|
|
|
49
60
|
## Code Style
|
|
50
61
|
- TypeScript strict mode, no `any`
|
|
@@ -89,112 +100,112 @@ scripts/ # Asset download scripts
|
|
|
89
100
|
- After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
|
|
90
101
|
- After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
|
|
91
102
|
|
|
92
|
-
# Website Inspection Guide
|
|
93
|
-
|
|
94
|
-
## Priority (read first): media & motion
|
|
95
|
-
|
|
96
|
-
Launchframe clones live pages for a **visual** result. Two things most often separate a convincing build from a hollow one:
|
|
97
|
-
|
|
98
|
-
### 1. Images & video (do this before obsessing over utility classes)
|
|
99
|
-
|
|
100
|
-
- [ ] **Every `<img>`** — `src` / `srcset` / `currentSrc`, `sizes`, `loading`, `decoding`, `alt`, intrinsic dimensions
|
|
101
|
-
- [ ] **`<picture>` / `<source>`** — resolution switches, art direction, `type` (WebP/AVIF)
|
|
102
|
-
- [ ] **Every `<video>`** — `src` + nested `<source>`, **poster**, `autoplay`, `loop`, `muted`, `playsinline`, `controls`
|
|
103
|
-
- [ ] **Background images** — `background-image` on ancestors (hero stacks are often **layers** of img + gradient + PNG mockup)
|
|
104
|
-
- [ ] **Lazy / below-fold** — scroll the page once before asset discovery so `data-src` / lazy-loaded URLs resolve if the site uses them
|
|
105
|
-
- [ ] **Download** — mirror into `public/images/` and `public/videos/` with stable paths; list failures in `docs/research/EXTRACTION_LIMITATIONS.md`
|
|
106
|
-
|
|
107
|
-
If automation hits a bot wall, **do not pretend extraction succeeded** — capture what you can from successful fetches and document gaps.
|
|
108
|
-
|
|
109
|
-
### 2. Motion (prefer Framer Motion in this repo)
|
|
110
|
-
|
|
111
|
-
- [ ] **Entrance** — fade/slide/scale on mount or on **scroll into view** (note threshold / `margin`)
|
|
112
|
-
- [ ] **Stagger** — children animating in sequence (hero bullets, card grids)
|
|
113
|
-
- [ ] **Scroll-linked** — progress, parallax, pinned sections (may combine with CSS `animation-timeline` or libs)
|
|
114
|
-
- [ ] **Gestures** — drag, pan, hover follow (often Framer Motion)
|
|
115
|
-
- [ ] **Implementation rule** — use **`framer-motion`** for anything beyond trivial single-property CSS `transition`. Record **duration, easing, delay, stagger**, and **trigger** (scroll, hover, tap) in specs.
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## How to Reverse-Engineer Any Website
|
|
120
|
-
|
|
121
|
-
This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
|
|
122
|
-
|
|
123
|
-
## Phase 1: Visual Audit
|
|
124
|
-
|
|
125
|
-
### Screenshots to Capture
|
|
126
|
-
- [ ] Every distinct page — desktop, tablet, mobile
|
|
127
|
-
- [ ] Dark mode variants (if applicable)
|
|
128
|
-
- [ ] Light mode variants (if applicable)
|
|
129
|
-
- [ ] Key interaction states (hover, active, open menus, modals)
|
|
130
|
-
- [ ] Loading/skeleton states
|
|
131
|
-
- [ ] Empty states
|
|
132
|
-
- [ ] Error states
|
|
133
|
-
- [ ] **Video frames** — capture a frame mid-play for reference if motion is subtle
|
|
134
|
-
- [ ] **Hero / full-bleed** — wide crops where raster layers are easy to miss
|
|
135
|
-
|
|
136
|
-
### Design Tokens to Extract
|
|
137
|
-
- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
|
|
138
|
-
- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
|
|
139
|
-
- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
|
|
140
|
-
- [ ] **Border radius** — buttons, cards, avatars, inputs
|
|
141
|
-
- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
|
|
142
|
-
- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
|
|
143
|
-
- [ ] **Icons** — which icon library? custom SVGs? sizes?
|
|
144
|
-
- [ ] **Avatars** — sizes, shapes, fallback behavior
|
|
145
|
-
- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
|
|
146
|
-
- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
|
|
147
|
-
|
|
148
|
-
## Phase 2: Component Inventory
|
|
149
|
-
|
|
150
|
-
For each distinct UI component, document:
|
|
151
|
-
1. **Name** — what would you call this component?
|
|
152
|
-
2. **Structure** — what HTML elements / child components does it contain?
|
|
153
|
-
3. **Variants** — does it have different sizes, colors, or states?
|
|
154
|
-
4. **States** — default, hover, active, disabled, loading, error, empty
|
|
155
|
-
5. **Responsive behavior** — how does it change at different breakpoints?
|
|
156
|
-
6. **Interactions** — click, hover, focus, keyboard navigation
|
|
157
|
-
7. **Animations** — transitions, entrance/exit, micro-interactions — **`framer-motion` vs CSS** and exact timing
|
|
158
|
-
|
|
159
|
-
### Common Components to Look For
|
|
160
|
-
- Navigation (top bar, sidebar, bottom bar)
|
|
161
|
-
- Cards / list items
|
|
162
|
-
- Buttons and links
|
|
163
|
-
- Forms and inputs
|
|
164
|
-
- Modals and dialogs
|
|
165
|
-
- Dropdowns and menus
|
|
166
|
-
- Tabs and segmented controls
|
|
167
|
-
- Avatars and user badges
|
|
168
|
-
- Loading skeletons
|
|
169
|
-
- Toast notifications
|
|
170
|
-
- Tooltips and popovers
|
|
171
|
-
- **Video / Lottie / canvas** blocks (do not substitute with static mockups without documenting why)
|
|
172
|
-
|
|
173
|
-
## Phase 3: Layout Architecture
|
|
174
|
-
|
|
175
|
-
- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
|
|
176
|
-
- [ ] **Column layout** — how many columns at each breakpoint?
|
|
177
|
-
- [ ] **Max-width** — main content area max-width
|
|
178
|
-
- [ ] **Sticky elements** — header, sidebar, floating buttons
|
|
179
|
-
- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
|
|
180
|
-
- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
|
|
181
|
-
|
|
182
|
-
## Phase 4: Technical Stack Analysis
|
|
183
|
-
|
|
184
|
-
- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
|
|
185
|
-
- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
|
|
186
|
-
- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
|
|
187
|
-
- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
|
|
188
|
-
- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
|
|
189
|
-
- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF — **mirror URLs you are allowed to fetch**
|
|
190
|
-
- [ ] **Animation library** — site may use GSAP, Lottie, Rive, or CSS only — **in the Next.js clone, default to Framer Motion** unless a different lib is required for parity
|
|
191
|
-
|
|
192
|
-
## Phase 5: Documentation Output
|
|
193
|
-
|
|
194
|
-
After inspection, create these files in `docs/research/`:
|
|
195
|
-
1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
|
|
196
|
-
2. `COMPONENT_INVENTORY.md` — Every component with structure notes
|
|
197
|
-
3. **`MEDIA_MANIFEST.md`** — (recommended) Table of every image/video/poster URL → local `public/` path or “blocked”
|
|
198
|
-
4. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
|
|
199
|
-
5. `INTERACTION_PATTERNS.md` — Animations: **CSS vs Framer Motion**, transitions, hover states
|
|
200
|
-
6. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents (Framer Motion for React animation)
|
|
103
|
+
# Website Inspection Guide
|
|
104
|
+
|
|
105
|
+
## Priority (read first): media & motion
|
|
106
|
+
|
|
107
|
+
Launchframe clones live pages for a **visual** result. Two things most often separate a convincing build from a hollow one:
|
|
108
|
+
|
|
109
|
+
### 1. Images & video (do this before obsessing over utility classes)
|
|
110
|
+
|
|
111
|
+
- [ ] **Every `<img>`** — `src` / `srcset` / `currentSrc`, `sizes`, `loading`, `decoding`, `alt`, intrinsic dimensions
|
|
112
|
+
- [ ] **`<picture>` / `<source>`** — resolution switches, art direction, `type` (WebP/AVIF)
|
|
113
|
+
- [ ] **Every `<video>`** — `src` + nested `<source>`, **poster**, `autoplay`, `loop`, `muted`, `playsinline`, `controls`
|
|
114
|
+
- [ ] **Background images** — `background-image` on ancestors (hero stacks are often **layers** of img + gradient + PNG mockup)
|
|
115
|
+
- [ ] **Lazy / below-fold** — scroll the page once before asset discovery so `data-src` / lazy-loaded URLs resolve if the site uses them
|
|
116
|
+
- [ ] **Download** — mirror into `public/images/` and `public/videos/` with stable paths; list failures in `docs/research/EXTRACTION_LIMITATIONS.md`
|
|
117
|
+
|
|
118
|
+
If automation hits a bot wall, **do not pretend extraction succeeded** — capture what you can from successful fetches and document gaps.
|
|
119
|
+
|
|
120
|
+
### 2. Motion (prefer Framer Motion in this repo)
|
|
121
|
+
|
|
122
|
+
- [ ] **Entrance** — fade/slide/scale on mount or on **scroll into view** (note threshold / `margin`)
|
|
123
|
+
- [ ] **Stagger** — children animating in sequence (hero bullets, card grids)
|
|
124
|
+
- [ ] **Scroll-linked** — progress, parallax, pinned sections (may combine with CSS `animation-timeline` or libs)
|
|
125
|
+
- [ ] **Gestures** — drag, pan, hover follow (often Framer Motion)
|
|
126
|
+
- [ ] **Implementation rule** — use **`framer-motion`** for anything beyond trivial single-property CSS `transition`. Record **duration, easing, delay, stagger**, and **trigger** (scroll, hover, tap) in specs.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## How to Reverse-Engineer Any Website
|
|
131
|
+
|
|
132
|
+
This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
|
|
133
|
+
|
|
134
|
+
## Phase 1: Visual Audit
|
|
135
|
+
|
|
136
|
+
### Screenshots to Capture
|
|
137
|
+
- [ ] Every distinct page — desktop, tablet, mobile
|
|
138
|
+
- [ ] Dark mode variants (if applicable)
|
|
139
|
+
- [ ] Light mode variants (if applicable)
|
|
140
|
+
- [ ] Key interaction states (hover, active, open menus, modals)
|
|
141
|
+
- [ ] Loading/skeleton states
|
|
142
|
+
- [ ] Empty states
|
|
143
|
+
- [ ] Error states
|
|
144
|
+
- [ ] **Video frames** — capture a frame mid-play for reference if motion is subtle
|
|
145
|
+
- [ ] **Hero / full-bleed** — wide crops where raster layers are easy to miss
|
|
146
|
+
|
|
147
|
+
### Design Tokens to Extract
|
|
148
|
+
- [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
|
|
149
|
+
- [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
|
|
150
|
+
- [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
|
|
151
|
+
- [ ] **Border radius** — buttons, cards, avatars, inputs
|
|
152
|
+
- [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
|
|
153
|
+
- [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
|
|
154
|
+
- [ ] **Icons** — which icon library? custom SVGs? sizes?
|
|
155
|
+
- [ ] **Avatars** — sizes, shapes, fallback behavior
|
|
156
|
+
- [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
|
|
157
|
+
- [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
|
|
158
|
+
|
|
159
|
+
## Phase 2: Component Inventory
|
|
160
|
+
|
|
161
|
+
For each distinct UI component, document:
|
|
162
|
+
1. **Name** — what would you call this component?
|
|
163
|
+
2. **Structure** — what HTML elements / child components does it contain?
|
|
164
|
+
3. **Variants** — does it have different sizes, colors, or states?
|
|
165
|
+
4. **States** — default, hover, active, disabled, loading, error, empty
|
|
166
|
+
5. **Responsive behavior** — how does it change at different breakpoints?
|
|
167
|
+
6. **Interactions** — click, hover, focus, keyboard navigation
|
|
168
|
+
7. **Animations** — transitions, entrance/exit, micro-interactions — **`framer-motion` vs CSS** and exact timing
|
|
169
|
+
|
|
170
|
+
### Common Components to Look For
|
|
171
|
+
- Navigation (top bar, sidebar, bottom bar)
|
|
172
|
+
- Cards / list items
|
|
173
|
+
- Buttons and links
|
|
174
|
+
- Forms and inputs
|
|
175
|
+
- Modals and dialogs
|
|
176
|
+
- Dropdowns and menus
|
|
177
|
+
- Tabs and segmented controls
|
|
178
|
+
- Avatars and user badges
|
|
179
|
+
- Loading skeletons
|
|
180
|
+
- Toast notifications
|
|
181
|
+
- Tooltips and popovers
|
|
182
|
+
- **Video / Lottie / canvas** blocks (do not substitute with static mockups without documenting why)
|
|
183
|
+
|
|
184
|
+
## Phase 3: Layout Architecture
|
|
185
|
+
|
|
186
|
+
- [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
|
|
187
|
+
- [ ] **Column layout** — how many columns at each breakpoint?
|
|
188
|
+
- [ ] **Max-width** — main content area max-width
|
|
189
|
+
- [ ] **Sticky elements** — header, sidebar, floating buttons
|
|
190
|
+
- [ ] **Z-index layers** — navigation, modals, tooltips, overlays
|
|
191
|
+
- [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
|
|
192
|
+
|
|
193
|
+
## Phase 4: Technical Stack Analysis
|
|
194
|
+
|
|
195
|
+
- [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
|
|
196
|
+
- [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
|
|
197
|
+
- [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
|
|
198
|
+
- [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
|
|
199
|
+
- [ ] **Font loading** — Google Fonts, self-hosted, system fonts
|
|
200
|
+
- [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF — **mirror URLs you are allowed to fetch**
|
|
201
|
+
- [ ] **Animation library** — site may use GSAP, Lottie, Rive, or CSS only — **in the Next.js clone, default to Framer Motion** unless a different lib is required for parity
|
|
202
|
+
|
|
203
|
+
## Phase 5: Documentation Output
|
|
204
|
+
|
|
205
|
+
After inspection, create these files in `docs/research/`:
|
|
206
|
+
1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
|
|
207
|
+
2. `COMPONENT_INVENTORY.md` — Every component with structure notes
|
|
208
|
+
3. **`MEDIA_MANIFEST.md`** — (recommended) Table of every image/video/poster URL → local `public/` path or “blocked”
|
|
209
|
+
4. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
|
|
210
|
+
5. `INTERACTION_PATTERNS.md` — Animations: **CSS vs Framer Motion**, transitions, hover states
|
|
211
|
+
6. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents (Framer Motion for React animation)
|
|
@@ -39,7 +39,7 @@ If the user provides additional instructions (specific fidelity level, deeper cu
|
|
|
39
39
|
## Pre-Flight
|
|
40
40
|
|
|
41
41
|
1. **Read `launchframe.config.json`** (see Step 0 above). After a fresh `npx launchframe` scaffold, proceed immediately — only echo `url`/`idea` for confirmation if the config looks wrong or the user asked to verify.
|
|
42
|
-
2. **Browser automation
|
|
42
|
+
2. **Browser automation.** Prefer an MCP (Chrome DevTools MCP, Playwright MCP, Browserbase MCP, etc.) when it is healthy. **If MCP is missing or in an error state, run `npm run recon` (Playwright)** — see `scripts/recon-playwright.mjs`. It writes `docs/research/computed-snapshot.json`, `docs/research/MEDIA_MANIFEST.md`, and full-page screenshots under `docs/design-references/`. Use `npm run recon:headed` if headless hits a WAF/challenge page. One-time install: `npx playwright install chromium`. Do not skip extraction — adapt the pipeline to the tools that work.
|
|
43
43
|
3. Validate the resolved URL(s). Normalize and verify each is accessible via your browser MCP tool. If any are invalid, ask the user to correct `launchframe.config.json` (or pass an override) before proceeding.
|
|
44
44
|
4. Verify the base project builds: `npm run build`. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to run `npm install` first.
|
|
45
45
|
5. Create the output directories if they don't exist: `docs/research/`, `docs/research/components/`, `docs/design-references/`, `scripts/`. Plan `docs/research/MEDIA_MANIFEST.md` as soon as media is inventoried. For multiple clones, also prepare per-site folders like `docs/research/<hostname>/` and `docs/design-references/<hostname>/`.
|
|
@@ -39,7 +39,7 @@ If the user provides additional instructions (specific fidelity level, deeper cu
|
|
|
39
39
|
## Pre-Flight
|
|
40
40
|
|
|
41
41
|
1. **Read `launchframe.config.json`** (see Step 0 above). After a fresh `npx launchframe` scaffold, proceed immediately — only echo `url`/`idea` for confirmation if the config looks wrong or the user asked to verify.
|
|
42
|
-
2. **Browser automation
|
|
42
|
+
2. **Browser automation.** Prefer an MCP (Chrome DevTools MCP, Playwright MCP, Browserbase MCP, etc.) when it is healthy. **If MCP is missing or in an error state, run `npm run recon` (Playwright)** — see `scripts/recon-playwright.mjs`. It writes `docs/research/computed-snapshot.json`, `docs/research/MEDIA_MANIFEST.md`, and full-page screenshots under `docs/design-references/`. Use `npm run recon:headed` if headless hits a WAF/challenge page. One-time install: `npx playwright install chromium`. Do not skip extraction — adapt the pipeline to the tools that work.
|
|
43
43
|
3. Validate the resolved URL(s). Normalize and verify each is accessible via your browser MCP tool. If any are invalid, ask the user to correct `launchframe.config.json` (or pass an override) before proceeding.
|
|
44
44
|
4. Verify the base project builds: `npm run build`. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to run `npm install` first.
|
|
45
45
|
5. Create the output directories if they don't exist: `docs/research/`, `docs/research/components/`, `docs/design-references/`, `scripts/`. Plan `docs/research/MEDIA_MANIFEST.md` as soon as media is inventoried. For multiple clones, also prepare per-site folders like `docs/research/<hostname>/` and `docs/design-references/<hostname>/`.
|
|
@@ -36,7 +36,7 @@ If the user provides additional instructions (specific fidelity level, deeper cu
|
|
|
36
36
|
## Pre-Flight
|
|
37
37
|
|
|
38
38
|
1. **Read `launchframe.config.json`** (see Step 0 above). After a fresh `npx launchframe` scaffold, proceed immediately — only echo `url`/`idea` for confirmation if the config looks wrong or the user asked to verify.
|
|
39
|
-
2. **Browser automation
|
|
39
|
+
2. **Browser automation.** Prefer an MCP (Chrome DevTools MCP, Playwright MCP, Browserbase MCP, etc.) when it is healthy. **If MCP is missing or in an error state, run `npm run recon` (Playwright)** — see `scripts/recon-playwright.mjs`. It writes `docs/research/computed-snapshot.json`, `docs/research/MEDIA_MANIFEST.md`, and full-page screenshots under `docs/design-references/`. Use `npm run recon:headed` if headless hits a WAF/challenge page. One-time install: `npx playwright install chromium`. Do not skip extraction — adapt the pipeline to the tools that work.
|
|
40
40
|
3. Validate the resolved URL(s). Normalize and verify each is accessible via your browser MCP tool. If any are invalid, ask the user to correct `launchframe.config.json` (or pass an override) before proceeding.
|
|
41
41
|
4. Verify the base project builds: `npm run build`. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to run `npm install` first.
|
|
42
42
|
5. Create the output directories if they don't exist: `docs/research/`, `docs/research/components/`, `docs/design-references/`, `scripts/`. Plan `docs/research/MEDIA_MANIFEST.md` as soon as media is inventoried. For multiple clones, also prepare per-site folders like `docs/research/<hostname>/` and `docs/design-references/<hostname>/`.
|
package/template/AGENTS.md
CHANGED
|
@@ -1,89 +1,100 @@
|
|
|
1
|
-
<!-- BEGIN:nextjs-agent-rules -->
|
|
2
|
-
# This is NOT the Next.js you know
|
|
3
|
-
|
|
4
|
-
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
|
|
5
|
-
<!-- END:nextjs-agent-rules -->
|
|
6
|
-
|
|
7
|
-
# Launchframe Project (AI Website Cloner + SaaS Rebrand)
|
|
8
|
-
|
|
9
|
-
## What This Is
|
|
10
|
-
This project was scaffolded by [Launchframe](https://github.com/evangruhlkey/launchframe) via `npx launchframe@latest <url> "<saas idea>"`. It is a Next.js + shadcn/ui + Tailwind v4 base wired with an AI-cloner skill (`/clone-website`) that reverse-engineers a real website pixel-perfectly and then re-skins its copy/branding for the user's SaaS idea.
|
|
11
|
-
|
|
12
|
-
## Single Source of Truth: `launchframe.config.json`
|
|
13
|
-
At the project root there is a `launchframe.config.json` containing:
|
|
14
|
-
- `url` — the visual source-of-truth to clone
|
|
15
|
-
- `idea` — the SaaS idea used as the rebranding directive after the clone
|
|
16
|
-
|
|
17
|
-
**Always read this file first** at the start of any cloning or build task. The `/clone-website` skill depends on it.
|
|
18
|
-
|
|
19
|
-
## What the user says (zero-setup flow)
|
|
20
|
-
Users scaffold with `npx launchframe@latest <url> "<saas idea>"` — `npm install` already ran — then they open this folder and say **Build it** (or **Go**, **Ship it**, **Clone the site**).
|
|
21
|
-
|
|
22
|
-
When you see that with no other instructions, **start the full clone-website pipeline immediately** using only `launchframe.config.json` for `url` and `idea`. Do not ask them to repeat the URL unless the config is missing or invalid. `/clone-website` is an alias for the same work.
|
|
23
|
-
|
|
24
|
-
## Tech Stack
|
|
25
|
-
- **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
|
|
26
|
-
- **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
|
|
27
|
-
- **Motion:** **Framer Motion** (`framer-motion`) — **default for non-trivial animation** (scroll reveals, staggers, layout, gestures). Use CSS `transition` / `@keyframes` only when they reproduce the target exactly without JS.
|
|
28
|
-
- **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
|
|
29
|
-
- **Styling:** Tailwind CSS v4 with oklch design tokens
|
|
30
|
-
- **Media:** Real **images & videos** from the target URL, saved under `public/images/` and `public/videos/` (see `.claude/skills/clone-website/SKILL.md` and `docs/research/INSPECTION_GUIDE.md`). Do not ship a “pretty shell” with missing raster/video unless extraction is **blocked** and documented in `docs/research/EXTRACTION_LIMITATIONS.md`.
|
|
31
|
-
- **Deployment:** Vercel
|
|
32
|
-
|
|
33
|
-
## Priority: images, videos & motion
|
|
34
|
-
Treat these as **first-class deliverables**, not polish at the end.
|
|
35
|
-
|
|
36
|
-
1. **Raster & video** — Early in recon, inventory every `<img>`, `<picture>` / `<source>`, `<video>`, poster image, and meaningful `background-image` URL. Download into `public/` and reference **local paths** in specs and components. Hero bands and marketing sections often fail visually when a single layer is skipped.
|
|
37
|
-
2. **Motion** — Match the target’s feel: easing, duration, stagger, scroll triggers. Prefer **`motion` from `framer-motion`** for entrance sequences, viewport-driven animations, shared-layout-style transitions, and anything beyond a one-off CSS transition. Note in each component spec whether behavior is **CSS-only** vs **Framer Motion**.
|
|
38
|
-
|
|
39
|
-
## Commands
|
|
40
|
-
- `npm run dev` — Start dev server
|
|
41
|
-
- `npm run build` — Production build
|
|
42
|
-
- `npm run lint` — ESLint check
|
|
43
|
-
- `npm run typecheck` — TypeScript check
|
|
44
|
-
- `npm run check` — Run lint + typecheck + build
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
1
|
+
<!-- BEGIN:nextjs-agent-rules -->
|
|
2
|
+
# This is NOT the Next.js you know
|
|
3
|
+
|
|
4
|
+
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
|
|
5
|
+
<!-- END:nextjs-agent-rules -->
|
|
6
|
+
|
|
7
|
+
# Launchframe Project (AI Website Cloner + SaaS Rebrand)
|
|
8
|
+
|
|
9
|
+
## What This Is
|
|
10
|
+
This project was scaffolded by [Launchframe](https://github.com/evangruhlkey/launchframe) via `npx launchframe@latest <url> "<saas idea>"`. It is a Next.js + shadcn/ui + Tailwind v4 base wired with an AI-cloner skill (`/clone-website`) that reverse-engineers a real website pixel-perfectly and then re-skins its copy/branding for the user's SaaS idea.
|
|
11
|
+
|
|
12
|
+
## Single Source of Truth: `launchframe.config.json`
|
|
13
|
+
At the project root there is a `launchframe.config.json` containing:
|
|
14
|
+
- `url` — the visual source-of-truth to clone
|
|
15
|
+
- `idea` — the SaaS idea used as the rebranding directive after the clone
|
|
16
|
+
|
|
17
|
+
**Always read this file first** at the start of any cloning or build task. The `/clone-website` skill depends on it.
|
|
18
|
+
|
|
19
|
+
## What the user says (zero-setup flow)
|
|
20
|
+
Users scaffold with `npx launchframe@latest <url> "<saas idea>"` — `npm install` already ran — then they open this folder and say **Build it** (or **Go**, **Ship it**, **Clone the site**).
|
|
21
|
+
|
|
22
|
+
When you see that with no other instructions, **start the full clone-website pipeline immediately** using only `launchframe.config.json` for `url` and `idea`. Do not ask them to repeat the URL unless the config is missing or invalid. `/clone-website` is an alias for the same work.
|
|
23
|
+
|
|
24
|
+
## Tech Stack
|
|
25
|
+
- **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
|
|
26
|
+
- **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
|
|
27
|
+
- **Motion:** **Framer Motion** (`framer-motion`) — **default for non-trivial animation** (scroll reveals, staggers, layout, gestures). Use CSS `transition` / `@keyframes` only when they reproduce the target exactly without JS.
|
|
28
|
+
- **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
|
|
29
|
+
- **Styling:** Tailwind CSS v4 with oklch design tokens
|
|
30
|
+
- **Media:** Real **images & videos** from the target URL, saved under `public/images/` and `public/videos/` (see `.claude/skills/clone-website/SKILL.md` and `docs/research/INSPECTION_GUIDE.md`). Do not ship a “pretty shell” with missing raster/video unless extraction is **blocked** and documented in `docs/research/EXTRACTION_LIMITATIONS.md`.
|
|
31
|
+
- **Deployment:** Vercel
|
|
32
|
+
|
|
33
|
+
## Priority: images, videos & motion
|
|
34
|
+
Treat these as **first-class deliverables**, not polish at the end.
|
|
35
|
+
|
|
36
|
+
1. **Raster & video** — Early in recon, inventory every `<img>`, `<picture>` / `<source>`, `<video>`, poster image, and meaningful `background-image` URL. Download into `public/` and reference **local paths** in specs and components. Hero bands and marketing sections often fail visually when a single layer is skipped.
|
|
37
|
+
2. **Motion** — Match the target’s feel: easing, duration, stagger, scroll triggers. Prefer **`motion` from `framer-motion`** for entrance sequences, viewport-driven animations, shared-layout-style transitions, and anything beyond a one-off CSS transition. Note in each component spec whether behavior is **CSS-only** vs **Framer Motion**.
|
|
38
|
+
|
|
39
|
+
## Commands
|
|
40
|
+
- `npm run dev` — Start dev server
|
|
41
|
+
- `npm run build` — Production build
|
|
42
|
+
- `npm run lint` — ESLint check
|
|
43
|
+
- `npm run typecheck` — TypeScript check
|
|
44
|
+
- `npm run check` — Run lint + typecheck + build
|
|
45
|
+
- **`npm run recon`** — **Playwright** capture: full-page screenshots, `computed-snapshot.json`, `MEDIA_MANIFEST.md` (use when Browser MCP / Chrome DevTools MCP is broken or missing)
|
|
46
|
+
- **`npm run recon:headed`** — Same as `recon` but **headed** Chromium (often better for WAF / “Just a moment…” pages)
|
|
47
|
+
|
|
48
|
+
**Playwright browser binaries (once per machine):** `npx playwright install chromium`
|
|
49
|
+
|
|
50
|
+
## When Browser MCP is down
|
|
51
|
+
Prefer **Playwright** for repeatable extraction in-repo — do **not** rely on Chrome DevTools MCP alone.
|
|
52
|
+
|
|
53
|
+
1. Run **`npm run recon`** (or **`npm run recon:headed`** if headless hits a challenge page).
|
|
54
|
+
2. Read **`docs/research/computed-snapshot.json`**, **`docs/research/MEDIA_MANIFEST.md`**, and **`docs/research/EXTRACTION_LIMITATIONS.md`** before writing specs.
|
|
55
|
+
3. Fill **`scripts/download-assets.mjs`** from `MEDIA_MANIFEST.md` and run it to populate `public/images/` and `public/videos/`.
|
|
56
|
+
|
|
57
|
+
## Code Style
|
|
58
|
+
- TypeScript strict mode, no `any`
|
|
59
|
+
- Named exports, PascalCase components, camelCase utils
|
|
60
|
+
- Tailwind utility classes, no inline styles
|
|
61
|
+
- 2-space indentation
|
|
62
|
+
- Responsive: mobile-first
|
|
63
|
+
|
|
64
|
+
## Design Principles
|
|
65
|
+
- **Images & video fidelity** — prefer real downloaded assets; preserve aspect ratio, `object-fit`, layering, and poster frames. Rebrand pass may **swap** URLs for IP-safe alternates but must keep layout identical.
|
|
66
|
+
- **Motion fidelity** — timing and easing matter as much as color; use Framer Motion when CSS alone cannot match staggered or scroll-driven behavior.
|
|
67
|
+
- **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
|
|
68
|
+
- **No personal aesthetic changes during emulation phase** — match 1:1 first, rebrand later
|
|
69
|
+
- **Real content during extraction** — use actual text and assets from the target site so the clone scaffolds against real shapes
|
|
70
|
+
- **Rebrand pass swaps copy, not visuals** — once the clone is built, replace product name, headlines, feature copy, and brand marks with content tuned to `launchframe.config.json#idea`. Do NOT alter spacing, color tokens, typography scale, animations, or responsive breakpoints during the rebrand.
|
|
71
|
+
- **Beauty-first** — every pixel matters
|
|
72
|
+
|
|
73
|
+
## Project Structure
|
|
74
|
+
```
|
|
75
|
+
src/
|
|
76
|
+
app/ # Next.js routes
|
|
77
|
+
components/ # React components
|
|
78
|
+
ui/ # shadcn/ui primitives
|
|
79
|
+
icons.tsx # Extracted SVG icons as React components
|
|
80
|
+
lib/
|
|
81
|
+
utils.ts # cn() utility (shadcn)
|
|
82
|
+
types/ # TypeScript interfaces
|
|
83
|
+
hooks/ # Custom React hooks
|
|
84
|
+
public/
|
|
85
|
+
images/ # Downloaded images from target site
|
|
86
|
+
videos/ # Downloaded videos from target site
|
|
87
|
+
seo/ # Favicons, OG images, webmanifest
|
|
88
|
+
docs/
|
|
89
|
+
research/ # Inspection output (design tokens, components, layout)
|
|
90
|
+
design-references/ # Screenshots and visual references
|
|
91
|
+
scripts/ # Asset download scripts
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## MOST IMPORTANT NOTES
|
|
95
|
+
- **Always start by reading `launchframe.config.json`** — that file dictates the URL to clone and the SaaS idea to re-skin for.
|
|
96
|
+
- When launching Claude Code agent teams, ALWAYS have each teammate work in their own worktree branch and merge everyone's work at the end, resolving any merge conflicts smartly since you are basically serving the orchestrator role and have full context to our goals, work given, work achieved, and desired outcomes.
|
|
97
|
+
- After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
|
|
98
|
+
- After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
|
|
99
|
+
|
|
100
|
+
@docs/research/INSPECTION_GUIDE.md
|