launchframe 0.4.0 → 0.4.1

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,47 @@
1
+ ---
2
+ name: launchframe
3
+ description: "Scaffold a Next.js app with npx launchframe@latest from a reference URL and SaaS idea"
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
+ You are helping the user scaffold a **new** project from **$ARGUMENTS**:
13
+
14
+ - A **reference URL** (the website to copy later with `/clone-website`)
15
+ - A **SaaS idea** string (headline / positioning for the generated landing page)
16
+
17
+ ## Parse inputs
18
+
19
+ 1. Split **$ARGUMENTS** into:
20
+ - **URL** — First `http://` or `https://` URL. Normalize (trim, validate). If invalid or missing, ask once for a correct URL.
21
+ - **SaaS idea** — Everything after the URL, typically in quotes. Strip surrounding quotes. If empty, ask for a short product pitch.
22
+
23
+ 2. Optional flags the user might pass (same as the CLI): `--dir` / `-o` for output folder, `--skip-install` to skip `npm install`.
24
+
25
+ ## Run the published CLI
26
+
27
+ Execute the scaffold using the **latest** package from npm (exact intent: **`launchframe@latest`**):
28
+
29
+ ```bash
30
+ npx launchframe@latest "<url>" "<saas-idea>" [--dir <folder>] [--skip-install]
31
+ ```
32
+
33
+ - Use shell-appropriate quoting (PowerShell vs bash). Escape embedded quotes in the SaaS idea.
34
+ - **Output path:** The Launchframe CLI must not write **inside** the npm package / template directory itself (that would recurse). If the open workspace is this repository, run `npx` with `--dir` pointing to a **sibling** path (e.g. `..\\my-app` on Windows, `../my-app` on macOS/Linux) or ask the user for a folder **outside** the repo.
35
+ - Prefer letting the CLI run `npm install` unless the user passed `--skip-install`.
36
+
37
+ ## After scaffold
38
+
39
+ Tell the user:
40
+
41
+ 1. `cd` into the new project directory.
42
+ 2. `npm run dev` to preview the SaaS landing shell.
43
+ 3. Run **`/clone-website <same-reference-url>`** in that project so the agent can reverse-engineer the reference site into components, while keeping the SaaS idea from `launchframe.context.json` / `src/lib/launchframe-config.ts`.
44
+
45
+ ## Fallback (local dev only)
46
+
47
+ If `npx launchframe@latest` is unavailable (offline), from a **checkout of this repo** you may run `node bin/launchframe.mjs "<url>" "<saas-idea>" ...` with the same rules for `--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 — start a **new** project with **`/launchframe <url> "your saas idea"`** (runs **`npx launchframe@latest`**), or work in the current repo and run **`/clone-website <url1> [<url2> ...]`** to clone into this 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