launchframe 0.4.0 → 0.4.2

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.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: launchframe
3
+ description: "Scaffold with npx launchframe@latest into the current folder — no arguments required"
4
+ invokable: true
5
+ ---
6
+ <!-- AUTO-GENERATED from .claude/skills/launchframe/SKILL.md — do not edit directly.
7
+ Run `node scripts/sync-skills.mjs` to regenerate. -->
8
+
9
+
10
+ # Launchframe
11
+
12
+ Help the user create a **new** Launchframe project. The CLI is **parameterless**:
13
+
14
+ ```bash
15
+ npx launchframe@latest
16
+ ```
17
+
18
+ It unpacks the full template into the **current working directory** (the folder root where the user runs the command). They should `mkdir`, `cd` into an **empty** folder first.
19
+
20
+ ## What you do
21
+
22
+ 1. Ensure the user has an **empty** directory (no existing `package.json`, `src/`, or `next.config.ts` there). If the workspace is already a Launchframe/Next project, they may only need `/clone-website` instead — clarify.
23
+
24
+ 2. Run exactly:
25
+
26
+ ```bash
27
+ npx launchframe@latest
28
+ ```
29
+
30
+ Optional: `LAUNCHFRAME_SOURCE_URL` and `LAUNCHFRAME_SAAS_IDEA` environment variables in the same shell if they want values pre-filled without editing files later.
31
+
32
+ 3. **Never** run this with the output target **inside** the `launchframe` package directory (the npm-installed template). If the open folder is this monorepo/template, have them `mkdir ../my-app && cd ../my-app` (sibling path), then run `npx launchframe@latest` there.
33
+
34
+ 4. Optional flags (same as CLI): `--dir <path>` to scaffold into another folder instead of cwd, `--skip-install` to skip `npm install`.
35
+
36
+ 5. After it finishes: they should **`npm run dev`** from **that same folder** (no extra `cd` if they scaffolded into cwd). Then they edit **`src/lib/launchframe-config.ts`** for reference URL and SaaS idea, and run **`/clone-website`** with that URL.
37
+
38
+ ## If $ARGUMENTS are present
39
+
40
+ The user may still paste a URL or idea in chat — **do not** require them for the CLI. Put any extra context into **`src/lib/launchframe-config.ts`** or `launchframe.context.json` for them after scaffold.
41
+
42
+ ## Fallback (local dev only)
43
+
44
+ From a checkout of this repo: `node bin/launchframe.mjs` with the same empty-folder rules (optionally `--dir` outside the package root).
@@ -1,80 +1,91 @@
1
- <!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
2
- Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
3
-
4
- ---
5
- description: Project conventions for AI Website Clone Template
6
- alwaysApply: true
7
- ---
8
- <!-- BEGIN:nextjs-agent-rules -->
9
- # This is NOT the Next.js you know
10
-
11
- 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.
12
- <!-- END:nextjs-agent-rules -->
13
-
14
- # Website Reverse-Engineer Template
15
-
16
- ## What This Is
17
- A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — just run `/clone-website <url1> [<url2> ...]`.
18
-
19
- ## Tech Stack
20
- - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
21
- - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
22
- - **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
23
- - **Styling:** Tailwind CSS v4 with oklch design tokens
24
- - **Deployment:** Vercel
25
-
26
- ## Commands
27
- - `npm run dev` — Start dev server
28
- - `npm run build` — Production build
29
- - `npm run lint` — ESLint check
30
- - `npm run typecheck` — TypeScript check
31
- - `npm run check` — Run lint + typecheck + build
32
-
33
- ## Code Style
34
- - TypeScript strict mode, no `any`
35
- - Named exports, PascalCase components, camelCase utils
36
- - Tailwind utility classes, no inline styles
37
- - 2-space indentation
38
- - Responsive: mobile-first
39
-
40
- ## Design Principles
41
- - **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
42
- - **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
43
- - **Real content** — use actual text and assets from the target site, not placeholders
44
- - **Beauty-first** — every pixel matters
45
-
46
- ## Project Structure
47
- ```
48
- src/
49
- app/ # Next.js routes
50
- components/ # React components
51
- ui/ # shadcn/ui primitives
52
- icons.tsx # Extracted SVG icons as React components
53
- lib/
54
- utils.ts # cn() utility (shadcn)
55
- types/ # TypeScript interfaces
56
- hooks/ # Custom React hooks
57
- public/
58
- images/ # Downloaded images from target site
59
- videos/ # Downloaded videos from target site
60
- seo/ # Favicons, OG images, webmanifest
61
- docs/
62
- research/ # Inspection output (design tokens, components, layout)
63
- design-references/ # Screenshots and visual references
64
- scripts/ # Asset download scripts
65
- ```
66
-
67
- ## MOST IMPORTANT NOTES
68
- - 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.
69
- - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
70
- - After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
71
-
1
+ <!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
2
+ Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
3
+
4
+ ---
5
+ description: Project conventions for AI Website Clone Template
6
+ alwaysApply: true
7
+ ---
8
+ <!-- BEGIN:nextjs-agent-rules -->
9
+ # This is NOT the Next.js you know
10
+
11
+ 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.
12
+ <!-- END:nextjs-agent-rules -->
13
+
14
+ # Website Reverse-Engineer Template
15
+
16
+ ## What This Is
17
+ A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — for a **new** folder, `mkdir`, `cd` into an **empty** directory, run **`npx launchframe@latest`** (no parameters), then edit **`src/lib/launchframe-config.ts`** and run **`/clone-website`** with your URL (or invoke **`/launchframe`** so the agent runs the same command). Or work in this repo and run **`/clone-website <url1> [<url2> ...]`** to clone into the current tree.
18
+
19
+ ## Tech Stack
20
+ - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
21
+ - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
22
+ - **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
23
+ - **Styling:** Tailwind CSS v4 with oklch design tokens
24
+ - **Deployment:** Vercel
25
+
26
+ ## Commands
27
+ - `npm run dev` — Start dev server
28
+ - `npm run build` — Production build
29
+ - `npm run lint` — ESLint check
30
+ - `npm run typecheck` — TypeScript check
31
+ - `npm run check` — Run lint + typecheck + build
32
+
33
+ ## Code Style
34
+ - TypeScript strict mode, no `any`
35
+ - Named exports, PascalCase components, camelCase utils
36
+ - Tailwind utility classes, no inline styles
37
+ - 2-space indentation
38
+ - Responsive: mobile-first
39
+
40
+ ## Design Principles
41
+ - **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
42
+ - **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
43
+ - **Real content** — use actual text and assets from the target site, not placeholders
44
+ - **Beauty-first** — every pixel matters
45
+ - **DOM crawl priority** — when walking the target page, emphasize **images** (raster, responsive sources, CSS backgrounds), **SVGs** (inline icons, sprites, masks), then **motion** (keyframes, transitions, scroll/time-driven animation, libraries). Scrape and save real assets from the DOM/network first; **create** a stand-in image or vector only when fetch/blocking prevents extraction, and label substitutes clearly in research notes so the clone stays auditable
46
+
47
+ ## Project Structure
48
+ ```
49
+ src/
50
+ app/ # Next.js routes
51
+ components/ # React components
52
+ ui/ # shadcn/ui primitives
53
+ icons.tsx # Extracted SVG icons as React components
54
+ lib/
55
+ utils.ts # cn() utility (shadcn)
56
+ types/ # TypeScript interfaces
57
+ hooks/ # Custom React hooks
58
+ public/
59
+ images/ # Downloaded images from target site
60
+ videos/ # Downloaded videos from target site
61
+ seo/ # Favicons, OG images, webmanifest
62
+ docs/
63
+ research/ # Inspection output (design tokens, components, layout)
64
+ design-references/ # Screenshots and visual references
65
+ scripts/ # Asset download scripts
66
+ ```
67
+
68
+ ## MOST IMPORTANT NOTES
69
+ - 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.
70
+ - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
71
+ - After editing `.claude/skills/*/SKILL.md` (for example `clone-website` or `launchframe`), run `node scripts/sync-skills.mjs` to regenerate skill and command files for all platforms.
72
+
72
73
  # Website Inspection Guide
73
74
 
74
75
  ## How to Reverse-Engineer Any Website
75
76
 
76
77
  This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
77
78
 
79
+ ## Priority: media, SVGs, and motion (do this early)
80
+
81
+ When crawling the DOM and network, **tackle these before fine-tuning copy or spacing**:
82
+
83
+ 1. **Raster imagery** — Every `<img>`, `<picture>` / `source`, `srcset` / `sizes`, CDN URLs, lazy-loaded `data-src`, `loading="lazy"` nodes, **CSS `background-image`** on the element and ancestors (including `::before` / `::after`), masks that use `url()`, `<video>` still / poster frames. Prefer **downloading** originals via scripts or MCP; if a URL is blocked or session-gated, **export a screenshot** of the element’s bounding box at a crisp DPR and store it under `public/images/`, and note the substitute in the spec.
84
+ 2. **SVGs** — Inline `<svg>`, `<use>` / sprite sheets, **SVG in CSS** (`mask-image`, `background-image`), favicons as SVG, logo marks. Prefer extracting path/viewBox into React components or static files under `public/` — **recreate** from a screenshot/trace only when the markup is obfuscated or blocked.
85
+ 3. **Motion & animation** — Inspect Styles for `animation`, `animation-name`, `animation-timeline`, `transition`, `transform`, `@keyframes`; check for libraries (Framer Motion, GSAP, Lottie, Lenis). Capture **durations, easings, delays, fill-modes**, scroll/view triggers, and `prefers-reduced-motion` handling. Motion often defines perceived quality — do not leave it as an afterthought.
86
+
87
+ Then continue with typography, spacing, and component structure as usual.
88
+
78
89
  ## Phase 1: Visual Audit
79
90
 
80
91
  ### Screenshots to Capture