launchframe 0.2.0 → 0.2.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.
Files changed (73) hide show
  1. package/README.md +144 -183
  2. package/bin/launchframe.mjs +261 -28
  3. package/package.json +52 -67
  4. package/template/.aider.conf.yml +3 -0
  5. package/template/.amazonq/cli-agents/clone-website.json +9 -0
  6. package/template/.amazonq/rules/project.md +161 -0
  7. package/template/.augment/commands/clone-website.md +518 -0
  8. package/template/.claude/skills/clone-website/SKILL.md +517 -0
  9. package/template/.clinerules +161 -0
  10. package/template/.codex/skills/clone-website/SKILL.md +517 -0
  11. package/template/.continue/commands/clone-website.md +519 -0
  12. package/template/.continue/rules/project.md +165 -0
  13. package/template/.cursor/commands/clone-website.md +514 -0
  14. package/template/.cursor/rules/project.mdc +20 -0
  15. package/template/.dockerignore +60 -0
  16. package/template/.gemini/commands/clone-website.toml +520 -0
  17. package/template/.gitattributes +9 -0
  18. package/template/.github/ISSUE_TEMPLATE/bug_report.yml +86 -0
  19. package/template/.github/ISSUE_TEMPLATE/config.yml +5 -0
  20. package/template/.github/ISSUE_TEMPLATE/feature_request.yml +50 -0
  21. package/template/.github/PULL_REQUEST_TEMPLATE.md +19 -0
  22. package/template/.github/copilot-instructions.md +161 -0
  23. package/template/.github/copilot-setup-steps.yml +3 -0
  24. package/template/.github/skills/clone-website/SKILL.md +517 -0
  25. package/template/.github/workflows/ci.yml +36 -0
  26. package/template/.nvmrc +1 -0
  27. package/template/.opencode/commands/clone-website.md +517 -0
  28. package/template/.windsurf/workflows/clone-website.md +514 -0
  29. package/template/.windsurfrules +2 -0
  30. package/template/AGENTS.md +79 -0
  31. package/template/CHANGELOG.md +80 -0
  32. package/template/CLAUDE.md +1 -0
  33. package/template/Dockerfile +114 -0
  34. package/template/Dockerfile.dev +15 -0
  35. package/template/GEMINI.md +1 -0
  36. package/template/README.md +118 -0
  37. package/template/START_HERE.md +15 -0
  38. package/template/components.json +25 -0
  39. package/template/docker-compose.yml +53 -0
  40. package/template/docs/design-references/.gitkeep +0 -0
  41. package/template/docs/design-references/comparison.png +0 -0
  42. package/template/docs/research/INSPECTION_GUIDE.md +80 -0
  43. package/template/eslint.config.mjs +18 -0
  44. package/template/next.config.ts +8 -0
  45. package/template/package.json +59 -0
  46. package/template/postcss.config.mjs +7 -0
  47. package/template/public/images/.gitkeep +0 -0
  48. package/template/public/seo/.gitkeep +0 -0
  49. package/template/public/videos/.gitkeep +0 -0
  50. package/template/scripts/.gitkeep +0 -0
  51. package/template/scripts/sync-agent-rules.sh +88 -0
  52. package/template/scripts/sync-skills.mjs +111 -0
  53. package/template/src/app/favicon.ico +0 -0
  54. package/template/src/app/globals.css +130 -0
  55. package/template/src/app/layout.tsx +33 -0
  56. package/template/src/app/page.tsx +9 -0
  57. package/template/src/components/ui/button.tsx +60 -0
  58. package/template/src/hooks/.gitkeep +0 -0
  59. package/template/src/lib/utils.ts +6 -0
  60. package/template/src/types/.gitkeep +0 -0
  61. package/template/tsconfig.json +34 -0
  62. package/packages/extract/automated-clone-pass.ts +0 -353
  63. package/packages/extract/browser-extract.ts +0 -237
  64. package/packages/extract/cloner-research-emit.ts +0 -270
  65. package/packages/extract/dom-crawler.ts +0 -521
  66. package/packages/extract/emit.ts +0 -553
  67. package/packages/extract/extract.ts +0 -548
  68. package/packages/extract/host-slug.ts +0 -5
  69. package/packages/extract/mirror-emit.ts +0 -620
  70. package/packages/extract/package.json +0 -13
  71. package/packages/extract/reference-dump.ts +0 -431
  72. package/packages/extract/synthesize.ts +0 -551
  73. package/packages/extract/types.ts +0 -316
@@ -0,0 +1,165 @@
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
+ # Launchframe Project (AI Website Cloner + SaaS Rebrand)
15
+
16
+ ## What This Is
17
+ 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.
18
+
19
+ ## Single Source of Truth: `launchframe.config.json`
20
+ At the project root there is a `launchframe.config.json` containing:
21
+ - `url` — the visual source-of-truth to clone
22
+ - `idea` — the SaaS idea used as the rebranding directive after the clone
23
+
24
+ **Always read this file first** at the start of any cloning or build task. The `/clone-website` skill depends on it.
25
+
26
+ ## What the user says (zero-setup flow)
27
+ 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**).
28
+
29
+ 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.
30
+
31
+ ## Tech Stack
32
+ - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
33
+ - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
34
+ - **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
35
+ - **Styling:** Tailwind CSS v4 with oklch design tokens
36
+ - **Deployment:** Vercel
37
+
38
+ ## Commands
39
+ - `npm run dev` — Start dev server
40
+ - `npm run build` — Production build
41
+ - `npm run lint` — ESLint check
42
+ - `npm run typecheck` — TypeScript check
43
+ - `npm run check` — Run lint + typecheck + build
44
+
45
+ ## Code Style
46
+ - TypeScript strict mode, no `any`
47
+ - Named exports, PascalCase components, camelCase utils
48
+ - Tailwind utility classes, no inline styles
49
+ - 2-space indentation
50
+ - Responsive: mobile-first
51
+
52
+ ## Design Principles
53
+ - **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
54
+ - **No personal aesthetic changes during emulation phase** — match 1:1 first, rebrand later
55
+ - **Real content during extraction** — use actual text and assets from the target site so the clone scaffolds against real shapes
56
+ - **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.
57
+ - **Beauty-first** — every pixel matters
58
+
59
+ ## Project Structure
60
+ ```
61
+ src/
62
+ app/ # Next.js routes
63
+ components/ # React components
64
+ ui/ # shadcn/ui primitives
65
+ icons.tsx # Extracted SVG icons as React components
66
+ lib/
67
+ utils.ts # cn() utility (shadcn)
68
+ types/ # TypeScript interfaces
69
+ hooks/ # Custom React hooks
70
+ public/
71
+ images/ # Downloaded images from target site
72
+ videos/ # Downloaded videos from target site
73
+ seo/ # Favicons, OG images, webmanifest
74
+ docs/
75
+ research/ # Inspection output (design tokens, components, layout)
76
+ design-references/ # Screenshots and visual references
77
+ scripts/ # Asset download scripts
78
+ ```
79
+
80
+ ## MOST IMPORTANT NOTES
81
+ - **Always start by reading `launchframe.config.json`** — that file dictates the URL to clone and the SaaS idea to re-skin for.
82
+ - 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.
83
+ - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
84
+ - After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
85
+
86
+ # Website Inspection Guide
87
+
88
+ ## How to Reverse-Engineer Any Website
89
+
90
+ This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
91
+
92
+ ## Phase 1: Visual Audit
93
+
94
+ ### Screenshots to Capture
95
+ - [ ] Every distinct page — desktop, tablet, mobile
96
+ - [ ] Dark mode variants (if applicable)
97
+ - [ ] Light mode variants (if applicable)
98
+ - [ ] Key interaction states (hover, active, open menus, modals)
99
+ - [ ] Loading/skeleton states
100
+ - [ ] Empty states
101
+ - [ ] Error states
102
+
103
+ ### Design Tokens to Extract
104
+ - [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
105
+ - [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
106
+ - [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
107
+ - [ ] **Border radius** — buttons, cards, avatars, inputs
108
+ - [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
109
+ - [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
110
+ - [ ] **Icons** — which icon library? custom SVGs? sizes?
111
+ - [ ] **Avatars** — sizes, shapes, fallback behavior
112
+ - [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
113
+ - [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
114
+
115
+ ## Phase 2: Component Inventory
116
+
117
+ For each distinct UI component, document:
118
+ 1. **Name** — what would you call this component?
119
+ 2. **Structure** — what HTML elements / child components does it contain?
120
+ 3. **Variants** — does it have different sizes, colors, or states?
121
+ 4. **States** — default, hover, active, disabled, loading, error, empty
122
+ 5. **Responsive behavior** — how does it change at different breakpoints?
123
+ 6. **Interactions** — click, hover, focus, keyboard navigation
124
+ 7. **Animations** — transitions, entrance/exit animations, micro-interactions
125
+
126
+ ### Common Components to Look For
127
+ - Navigation (top bar, sidebar, bottom bar)
128
+ - Cards / list items
129
+ - Buttons and links
130
+ - Forms and inputs
131
+ - Modals and dialogs
132
+ - Dropdowns and menus
133
+ - Tabs and segmented controls
134
+ - Avatars and user badges
135
+ - Loading skeletons
136
+ - Toast notifications
137
+ - Tooltips and popovers
138
+
139
+ ## Phase 3: Layout Architecture
140
+
141
+ - [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
142
+ - [ ] **Column layout** — how many columns at each breakpoint?
143
+ - [ ] **Max-width** — main content area max-width
144
+ - [ ] **Sticky elements** — header, sidebar, floating buttons
145
+ - [ ] **Z-index layers** — navigation, modals, tooltips, overlays
146
+ - [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
147
+
148
+ ## Phase 4: Technical Stack Analysis
149
+
150
+ - [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
151
+ - [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
152
+ - [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
153
+ - [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
154
+ - [ ] **Font loading** — Google Fonts, self-hosted, system fonts
155
+ - [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF
156
+ - [ ] **Animation library** — Framer Motion, GSAP, CSS transitions only
157
+
158
+ ## Phase 5: Documentation Output
159
+
160
+ After inspection, create these files in `docs/research/`:
161
+ 1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
162
+ 2. `COMPONENT_INVENTORY.md` — Every component with structure notes
163
+ 3. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
164
+ 4. `INTERACTION_PATTERNS.md` — Animations, transitions, hover states
165
+ 5. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents