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,50 @@
1
+ name: Feature Request
2
+ description: Suggest a new feature or improvement
3
+ title: "[Feature]: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for suggesting a feature! Please describe the problem and your proposed solution.
10
+
11
+ - type: textarea
12
+ id: problem
13
+ attributes:
14
+ label: Problem
15
+ description: What problem does this feature solve? What's missing or frustrating?
16
+ placeholder: "I'm always frustrated when..."
17
+ validations:
18
+ required: true
19
+
20
+ - type: textarea
21
+ id: solution
22
+ attributes:
23
+ label: Proposed Solution
24
+ description: How would you like this to work?
25
+ validations:
26
+ required: true
27
+
28
+ - type: textarea
29
+ id: alternatives
30
+ attributes:
31
+ label: Alternatives Considered
32
+ description: Any other approaches you've thought about?
33
+
34
+ - type: dropdown
35
+ id: category
36
+ attributes:
37
+ label: Category
38
+ options:
39
+ - Cloning pipeline
40
+ - Asset extraction
41
+ - Component generation
42
+ - Documentation
43
+ - Developer experience
44
+ - Other
45
+
46
+ - type: textarea
47
+ id: additional
48
+ attributes:
49
+ label: Additional Context
50
+ description: Screenshots, mockups, links, or any other context.
@@ -0,0 +1,19 @@
1
+ ## Summary
2
+
3
+ <!-- What does this PR do and why? -->
4
+
5
+ ## Related Issue
6
+
7
+ <!-- Link to the issue this addresses, e.g. Closes #123 -->
8
+
9
+ ## Type of Change
10
+
11
+ - [ ] Bug fix
12
+ - [ ] New feature
13
+ - [ ] Documentation
14
+ - [ ] Refactoring
15
+ - [ ] Breaking change
16
+
17
+ ## Checklist
18
+
19
+ - [ ] `npm run check` passes (lint + typecheck + build)
@@ -0,0 +1,161 @@
1
+ <!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
2
+ Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
3
+
4
+ <!-- BEGIN:nextjs-agent-rules -->
5
+ # This is NOT the Next.js you know
6
+
7
+ 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.
8
+ <!-- END:nextjs-agent-rules -->
9
+
10
+ # Launchframe Project (AI Website Cloner + SaaS Rebrand)
11
+
12
+ ## What This Is
13
+ 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.
14
+
15
+ ## Single Source of Truth: `launchframe.config.json`
16
+ At the project root there is a `launchframe.config.json` containing:
17
+ - `url` — the visual source-of-truth to clone
18
+ - `idea` — the SaaS idea used as the rebranding directive after the clone
19
+
20
+ **Always read this file first** at the start of any cloning or build task. The `/clone-website` skill depends on it.
21
+
22
+ ## What the user says (zero-setup flow)
23
+ 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**).
24
+
25
+ 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.
26
+
27
+ ## Tech Stack
28
+ - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
29
+ - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
30
+ - **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
31
+ - **Styling:** Tailwind CSS v4 with oklch design tokens
32
+ - **Deployment:** Vercel
33
+
34
+ ## Commands
35
+ - `npm run dev` — Start dev server
36
+ - `npm run build` — Production build
37
+ - `npm run lint` — ESLint check
38
+ - `npm run typecheck` — TypeScript check
39
+ - `npm run check` — Run lint + typecheck + build
40
+
41
+ ## Code Style
42
+ - TypeScript strict mode, no `any`
43
+ - Named exports, PascalCase components, camelCase utils
44
+ - Tailwind utility classes, no inline styles
45
+ - 2-space indentation
46
+ - Responsive: mobile-first
47
+
48
+ ## Design Principles
49
+ - **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
50
+ - **No personal aesthetic changes during emulation phase** — match 1:1 first, rebrand later
51
+ - **Real content during extraction** — use actual text and assets from the target site so the clone scaffolds against real shapes
52
+ - **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.
53
+ - **Beauty-first** — every pixel matters
54
+
55
+ ## Project Structure
56
+ ```
57
+ src/
58
+ app/ # Next.js routes
59
+ components/ # React components
60
+ ui/ # shadcn/ui primitives
61
+ icons.tsx # Extracted SVG icons as React components
62
+ lib/
63
+ utils.ts # cn() utility (shadcn)
64
+ types/ # TypeScript interfaces
65
+ hooks/ # Custom React hooks
66
+ public/
67
+ images/ # Downloaded images from target site
68
+ videos/ # Downloaded videos from target site
69
+ seo/ # Favicons, OG images, webmanifest
70
+ docs/
71
+ research/ # Inspection output (design tokens, components, layout)
72
+ design-references/ # Screenshots and visual references
73
+ scripts/ # Asset download scripts
74
+ ```
75
+
76
+ ## MOST IMPORTANT NOTES
77
+ - **Always start by reading `launchframe.config.json`** — that file dictates the URL to clone and the SaaS idea to re-skin for.
78
+ - 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.
79
+ - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
80
+ - After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
81
+
82
+ # Website Inspection Guide
83
+
84
+ ## How to Reverse-Engineer Any Website
85
+
86
+ This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
87
+
88
+ ## Phase 1: Visual Audit
89
+
90
+ ### Screenshots to Capture
91
+ - [ ] Every distinct page — desktop, tablet, mobile
92
+ - [ ] Dark mode variants (if applicable)
93
+ - [ ] Light mode variants (if applicable)
94
+ - [ ] Key interaction states (hover, active, open menus, modals)
95
+ - [ ] Loading/skeleton states
96
+ - [ ] Empty states
97
+ - [ ] Error states
98
+
99
+ ### Design Tokens to Extract
100
+ - [ ] **Colors** — background, text (primary/secondary/muted), accent, border, hover, error, success, warning
101
+ - [ ] **Typography** — font family, sizes (h1-h6, body, caption, label), weights, line heights, letter spacing
102
+ - [ ] **Spacing** — padding/margin patterns (look for a scale: 4px, 8px, 12px, 16px, 24px, 32px, etc.)
103
+ - [ ] **Border radius** — buttons, cards, avatars, inputs
104
+ - [ ] **Shadows/elevation** — card shadows, dropdown shadows, modal overlay
105
+ - [ ] **Breakpoints** — when does the layout shift? (inspect with DevTools responsive mode)
106
+ - [ ] **Icons** — which icon library? custom SVGs? sizes?
107
+ - [ ] **Avatars** — sizes, shapes, fallback behavior
108
+ - [ ] **Buttons** — all variants (primary, secondary, ghost, icon-only, danger)
109
+ - [ ] **Inputs** — text fields, textareas, selects, checkboxes, toggles
110
+
111
+ ## Phase 2: Component Inventory
112
+
113
+ For each distinct UI component, document:
114
+ 1. **Name** — what would you call this component?
115
+ 2. **Structure** — what HTML elements / child components does it contain?
116
+ 3. **Variants** — does it have different sizes, colors, or states?
117
+ 4. **States** — default, hover, active, disabled, loading, error, empty
118
+ 5. **Responsive behavior** — how does it change at different breakpoints?
119
+ 6. **Interactions** — click, hover, focus, keyboard navigation
120
+ 7. **Animations** — transitions, entrance/exit animations, micro-interactions
121
+
122
+ ### Common Components to Look For
123
+ - Navigation (top bar, sidebar, bottom bar)
124
+ - Cards / list items
125
+ - Buttons and links
126
+ - Forms and inputs
127
+ - Modals and dialogs
128
+ - Dropdowns and menus
129
+ - Tabs and segmented controls
130
+ - Avatars and user badges
131
+ - Loading skeletons
132
+ - Toast notifications
133
+ - Tooltips and popovers
134
+
135
+ ## Phase 3: Layout Architecture
136
+
137
+ - [ ] **Grid system** — CSS Grid? Flexbox? Fixed widths?
138
+ - [ ] **Column layout** — how many columns at each breakpoint?
139
+ - [ ] **Max-width** — main content area max-width
140
+ - [ ] **Sticky elements** — header, sidebar, floating buttons
141
+ - [ ] **Z-index layers** — navigation, modals, tooltips, overlays
142
+ - [ ] **Scroll behavior** — infinite scroll, pagination, virtual scrolling
143
+
144
+ ## Phase 4: Technical Stack Analysis
145
+
146
+ - [ ] **Framework** — React? Vue? Angular? Check `__NEXT_DATA__`, `__NUXT__`, `ng-version`
147
+ - [ ] **CSS approach** — Tailwind (utility classes), CSS Modules, Styled Components, Emotion, vanilla CSS
148
+ - [ ] **State management** — Redux (check DevTools), React Query, Zustand, Pinia
149
+ - [ ] **API patterns** — REST, GraphQL (check network tab for `/graphql` requests)
150
+ - [ ] **Font loading** — Google Fonts, self-hosted, system fonts
151
+ - [ ] **Image strategy** — CDN, lazy loading, srcset, WebP/AVIF
152
+ - [ ] **Animation library** — Framer Motion, GSAP, CSS transitions only
153
+
154
+ ## Phase 5: Documentation Output
155
+
156
+ After inspection, create these files in `docs/research/`:
157
+ 1. `DESIGN_TOKENS.md` — All extracted colors, typography, spacing
158
+ 2. `COMPONENT_INVENTORY.md` — Every component with structure notes
159
+ 3. `LAYOUT_ARCHITECTURE.md` — Page layouts, grid system, responsive behavior
160
+ 4. `INTERACTION_PATTERNS.md` — Animations, transitions, hover states
161
+ 5. `TECH_STACK_ANALYSIS.md` — What the site uses and our chosen equivalents
@@ -0,0 +1,3 @@
1
+ steps:
2
+ - name: Install dependencies
3
+ run: npm ci