launchframe 0.1.4 → 0.1.6

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 CHANGED
@@ -10,10 +10,14 @@ radii, shadows), and synthesizes an original design system as
10
10
  `tailwind.config.ts` + `globals.css` + `tokens.json` + a Markdown
11
11
  report and an AI-handoff file.
12
12
 
13
- It is **not** a website cloning tool. It does not store HTML, JS, CSS,
14
- brand assets, logos, illustrations, or copywriting. Proprietary type
15
- families are substituted with open-source equivalents. See the
16
- [anti-clone policy](./rules/anti-clone-policy.md).
13
+ It also crawls the rendered DOM into a typed `SiteLayout` and emits a
14
+ **layout-mirror page** per source: a Next.js component that reconstructs
15
+ the source's section tree, grid, and density from typed primitives, with
16
+ `<TextSlot>` / `<MediaSlot>` placeholders where the source had copy,
17
+ logos, illustrations, or product imagery. The mirror does **not** embed
18
+ the source's copy text, brand assets, or product screenshots — fill those
19
+ slots with your own content before shipping. Proprietary type families
20
+ are substituted with open-source equivalents.
17
21
 
18
22
  ---
19
23
 
@@ -35,21 +39,28 @@ cd path/to/your-app-or-empty-folder
35
39
  npx launchframe@latest https://site-a.example https://site-b.example
36
40
  ```
37
41
 
38
- When it finishes, open **`output/<runId>/FOR_AI.md`** it tells you
39
- exactly how to attach the folder in **Cursor** or **Claude Code** so
40
- the model follows your tokens when building UI.
42
+ When it finishes, every source URL has produced a **layout-mirror
43
+ page** under `output/<runId>/mirror/<host>/page.tsx`, plus a synthesized
44
+ design system at the run root.
41
45
 
42
46
  ```txt
43
47
  output/<runId>/
44
48
  ├── FOR_AI.md ← paste / @-attach this for your AI (handoff instructions)
45
- ├── tokens.json ← every value, machine-readable
49
+ ├── tokens.json ← every aggregated value, machine-readable
46
50
  ├── tailwind.config.ts ← drop-in Tailwind theme
47
51
  ├── globals.css ← drop-in shadcn-compatible CSS variables
48
52
  ├── theme-preview.tsx ← render this to eyeball the system
49
53
  ├── REPORT.md ← what was extracted, from where, why
50
54
  ├── run.json ← full run metadata (sources, timing, status)
51
55
  ├── screenshots/ ← captured PNGs
52
- └── raw/ ← per-site raw token observations
56
+ ├── raw/ ← per-site raw token + SiteLayout JSON
57
+ └── mirror/
58
+ └── <host>/
59
+ ├── page.tsx ← Next.js page reconstructed from the source's
60
+ │ section tree, with <TextSlot> / <MediaSlot>
61
+ │ placeholders for your own copy and assets
62
+ ├── layout.json ← the typed SiteLayout the page was built from
63
+ └── MIRROR_NOTES.md ← what was extracted and how to fill slots
53
64
  ```
54
65
 
55
66
  ---
@@ -57,10 +68,22 @@ output/<runId>/
57
68
  ## Hand the output to your AI
58
69
 
59
70
  1. Run the command above so `output/<runId>/` exists.
60
- 2. Either:
61
- - **Cursor:** `@`-attach the folder (or `FOR_AI.md` + `REPORT.md` + `tokens.json`) and paste the instruction block from `FOR_AI.md` into Composer, or
62
- - **Claude Code:** copy the `output/<runId>/` folder into your project and attach it.
63
- 3. The AI's authority order is **REPORT.md tokens.json → merge tailwind.config.ts and globals.css into the app**. It must use semantic tokens (`bg-background`, `text-muted-foreground`, `bg-primary`, …) and write **original copy only**.
71
+ 2. Pick the mirror folder that matches the source whose layout you want
72
+ to start from: `output/<runId>/mirror/<host>/`.
73
+ 3. Either:
74
+ - **Cursor:** `@`-attach the mirror folder along with `FOR_AI.md` and
75
+ `tokens.json`, then ask the agent to fill in `<TextSlot>` /
76
+ `<MediaSlot>` placeholders with copy for *your* product.
77
+ - **Claude Code:** copy the mirror folder into your project, then ask
78
+ the agent the same thing.
79
+ 4. The AI's authority order is **MIRROR_NOTES.md → page.tsx → tokens.json
80
+ → tailwind.config.ts + globals.css**. It must:
81
+ - Keep the section tree, grid composition, and density of `page.tsx`
82
+ intact (that is the source's layout grammar, which is the point).
83
+ - Replace every `<TextSlot kind="…" />` placeholder with original
84
+ copy written for *your* product — not paraphrased from the source.
85
+ - Replace every `<MediaSlot kind="…" />` with your own imagery, code
86
+ samples, or brand marks.
64
87
 
65
88
  ---
66
89
 
@@ -148,11 +171,11 @@ launchframe/
148
171
  │ ├── capture/ # Playwright screenshot capture (lower level)
149
172
  │ ├── analysis/ # Layout-tree extraction & section classifier
150
173
  │ ├── patterns/ # Typed pattern schemas + atlas registry loader
151
- │ ├── blocks/ # Original shadcn/ui blocks across families
152
- │ └── evaluation/ # Coherence / clone-risk / a11y evaluator
153
- ├── pattern-atlas/ # Formalized pattern catalog per category
174
+ │ ├── blocks/ # Shadcn/ui blocks + TextSlot / MediaSlot primitives
175
+ │ └── evaluation/ # Coherence + responsiveness/a11y evaluator
176
+ ├── pattern-atlas/ # Pattern catalog per category (block-composition mode)
154
177
  ├── prompts/ # Markdown prompts for AI agents
155
- ├── rules/ # Design / copy / anti-clone / a11y policy
178
+ ├── rules/ # Design / copy / a11y rules
156
179
  ├── registry/ # shadcn-compatible custom registry manifest
157
180
  └── output/ # ← every `extract` run lands here
158
181
  ```
@@ -164,7 +187,7 @@ npm run studio # Next.js dashboard at localhost:3000
164
187
  npm run capture # Lower-level Playwright capture pipeline
165
188
  npm run analyze # Run section classifier on captured screenshots
166
189
  npm run formalize # Validate the pattern-atlas/*.json files
167
- npm run evaluate # Grade a generated page (coherence/clone/a11y)
190
+ npm run evaluate # Grade a generated page (coherence + a11y)
168
191
  npm run typecheck # Project-wide TypeScript check
169
192
  ```
170
193
 
@@ -172,26 +195,30 @@ npm run typecheck # Project-wide TypeScript check
172
195
 
173
196
  ## What this is not
174
197
 
175
- - **Not a scraper.** It captures only what is publicly rendered, stores
176
- no HTML, and never republishes site content.
177
- - **Not a clone tool.** Anti-clone policy is enforced by capture-side
178
- policy and synthesis-side normalization.
198
+ - **Not a verbatim site downloader.** The crawler builds a typed
199
+ `SiteLayout` model from the rendered DOM — section tree, geometry,
200
+ computed style tokens, content kinds and emits code generated from
201
+ that model. It does not save the source's HTML/CSS to disk.
202
+ - **Not a content lift.** Heading text, body copy, logos, illustrations,
203
+ and product imagery become `<TextSlot>` / `<MediaSlot>` placeholders in
204
+ the mirror page. You fill them with your own copy and assets before
205
+ shipping.
179
206
  - **Not a component library replacement.** It sits *on top* of
180
- shadcn/ui and produces theme files for it.
207
+ shadcn/ui and produces theme files plus slot-driven page templates.
181
208
 
182
209
  ---
183
210
 
184
- ## Anti-clone policy in one paragraph
185
-
186
- Launchframe captures publicly rendered pages, reads the **computed
187
- appearance** of those pages, and synthesizes an original design system
188
- from aggregate signals. It never stores HTML, JS, CSS, brand assets,
189
- illustrations, logos, or copy. Proprietary type families are
190
- substituted with open-source equivalents. Generated pages and design
191
- systems are checked against captured corpora for structural and
192
- token-level overlap; anything above the configured threshold fails the
193
- build. Full policy:
194
- [`rules/anti-clone-policy.md`](./rules/anti-clone-policy.md).
211
+ ## Responsible use in one paragraph
212
+
213
+ Launchframe is intended for layout research and design-system seeding
214
+ against pages you have permission to analyze (your own products, sites
215
+ where the operator has permission, or pages where structural analysis is
216
+ permitted by `robots.txt`). The crawler respects `robots.txt` by default
217
+ and rate-limits per domain. The output is generated code derived from a
218
+ normalized typed model and slot placeholders not a verbatim copy of
219
+ the source's markup, copy, or assets. Operators are responsible for the
220
+ content they paste into those slots and for honoring third-party
221
+ trademarks, terms of service, and licenses.
195
222
 
196
223
  ---
197
224
 
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
- {
2
- "name": "launchframe",
3
- "version": "0.1.4",
4
- "description": "Point Launchframe at SaaS sites you admire and get back a drop-in shadcn/ui design system (tokens, Tailwind theme, CSS variables, AI handoff) you can build your own UI on top of.",
5
- "license": "MIT",
6
- "author": "Evan Gruhlkey",
7
- "homepage": "https://github.com/evangruhlkey/launchframe#readme",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/evangruhlkey/launchframe.git"
11
- },
12
- "bugs": {
13
- "url": "https://github.com/evangruhlkey/launchframe/issues"
14
- },
15
- "keywords": [
16
- "launchframe",
17
- "shadcn",
18
- "shadcn-ui",
19
- "tailwind",
20
- "design-system",
21
- "design-tokens",
22
- "playwright",
23
- "cursor",
24
- "claude-code",
25
- "ai",
26
- "cli"
27
- ],
28
- "bin": {
29
- "launchframe": "bin/launchframe.mjs"
30
- },
31
- "files": [
32
- "bin",
33
- "packages/extract",
34
- "README.md",
35
- "LICENSE"
36
- ],
37
- "workspaces": [
38
- "apps/*",
39
- "packages/*"
40
- ],
41
- "scripts": {
42
- "extract": "tsx packages/extract/extract.ts",
43
- "studio": "npm run dev --workspace apps/studio",
44
- "studio:build": "npm run build --workspace apps/studio",
45
- "capture": "tsx packages/capture/screenshot-site.ts",
46
- "analyze": "tsx packages/analysis/analyze-screenshot.ts",
47
- "formalize": "tsx packages/patterns/pattern-registry.ts",
48
- "evaluate": "tsx packages/evaluation/evaluate-page.ts",
49
- "typecheck": "tsc -p tsconfig.json --noEmit",
50
- "format:check": "prettier --check ."
51
- },
52
- "dependencies": {
53
- "playwright": "^1.48.0",
54
- "tsx": "^4.19.0"
55
- },
56
- "devDependencies": {
57
- "@types/node": "^22.7.0",
58
- "prettier": "^3.3.3",
59
- "typescript": "^5.6.0"
60
- },
61
- "engines": {
62
- "node": ">=20.0.0"
63
- }
64
- }
1
+ {
2
+ "name": "launchframe",
3
+ "version": "0.1.6",
4
+ "description": "Point Launchframe at SaaS sites you admire and get back a drop-in shadcn/ui design system (tokens, Tailwind theme, CSS variables, AI handoff) you can build your own UI on top of.",
5
+ "license": "MIT",
6
+ "author": "Evan Gruhlkey",
7
+ "homepage": "https://github.com/evangruhlkey/launchframe#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/evangruhlkey/launchframe.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/evangruhlkey/launchframe/issues"
14
+ },
15
+ "keywords": [
16
+ "launchframe",
17
+ "shadcn",
18
+ "shadcn-ui",
19
+ "tailwind",
20
+ "design-system",
21
+ "design-tokens",
22
+ "playwright",
23
+ "cursor",
24
+ "claude-code",
25
+ "ai",
26
+ "cli"
27
+ ],
28
+ "bin": {
29
+ "launchframe": "bin/launchframe.mjs"
30
+ },
31
+ "files": [
32
+ "bin",
33
+ "packages/extract",
34
+ "README.md",
35
+ "LICENSE"
36
+ ],
37
+ "workspaces": [
38
+ "apps/*",
39
+ "packages/*"
40
+ ],
41
+ "scripts": {
42
+ "extract": "tsx packages/extract/extract.ts",
43
+ "studio": "npm run dev --workspace apps/studio",
44
+ "studio:build": "npm run build --workspace apps/studio",
45
+ "capture": "tsx packages/capture/screenshot-site.ts",
46
+ "analyze": "tsx packages/analysis/analyze-screenshot.ts",
47
+ "formalize": "tsx packages/patterns/pattern-registry.ts",
48
+ "evaluate": "tsx packages/evaluation/evaluate-page.ts",
49
+ "typecheck": "tsc -p tsconfig.json --noEmit",
50
+ "format:check": "prettier --check ."
51
+ },
52
+ "dependencies": {
53
+ "playwright": "^1.48.0",
54
+ "tsx": "^4.19.0"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^22.7.0",
58
+ "prettier": "^3.3.3",
59
+ "typescript": "^5.6.0"
60
+ },
61
+ "engines": {
62
+ "node": ">=20.0.0"
63
+ }
64
+ }