How klic-awesome-code/ai-website-cloner-template works
1. What this repository is
- This is not a backend service; it is a Next.js 16 template for rebuilding a target website as a clone.
- The runtime app is a mostly empty front-end shell, while the real “system” includes the Claude Code skill and the generated research/assets that drive the rebuild.
2. Primary execution flow
- The top-level workflow starts outside the app code: a user runs /clone-website <target-url> in Claude Code with Chrome MCP enabled.
- Claude performs reconnaissance, extracts assets/tokens, writes component specs, builds sections in parallel worktrees, then merges and QA-checks the result against the target.
3. App shell boundary
- The actual web app lives under src/app and uses the Next.js App Router.
- The only visible route structure in the tree is the root page and global layout/styles, so the template is centered on a single cloneable landing-page surface rather than a full multi-service application.
4. Presentation layer
- src/app/layout.tsx, src/app/page.tsx, and src/app/globals.css define the root document structure, homepage composition, and global styling.
- This layer is where the reconstructed UI ultimately renders after the AI-assisted build process.
5. Reusable UI primitives
- src/components/ui/ contains shadcn/ui-style primitives, with button.tsx visible in the tree.
- These are the lowest-level reusable building blocks for the cloned UI, intended to be composed into page sections rather than acting as a separate subsystem.
6. Shared utility layer
- src/lib/utils.ts provides shared helpers, likely the cn()-style class composition utility used across components.
- This is a small but important boundary: it keeps styling/composition concerns centralized instead of duplicated in each section.
7. Type and hook scaffolding
- src/types/ and src/hooks/ exist as extension points, but the tree shows no substantive custom implementations yet.
- Architecturally, these are placeholders for project-specific typing and interactive behavior if the clone requires them.
8. Generated research and design artifacts
- docs/research/ is a core part of the workflow, especially the component specs generated during reverse engineering.
- The readme describes these specs as containing exact computed styles, states, behavior, responsive values, and content, which makes this repo partly a spec-driven build system rather than a normal hand-authored app.
9. Reference and inspection assets
- docs/design-references/ stores screenshots/comparison material used to verify fidelity.
- The cloning process uses these visual references as the QA boundary between the original site and the rebuilt UI.
10. Static asset boundary
- public/images/, public/videos/, and public/seo/ are the landing zone for downloaded source assets and metadata from the target site.
- These folders are part of the clone pipeline’s output: images, video captures, favicons, and OG assets are brought into the template so the rebuilt page can match the source without relying on the original host.
11. Configuration and orchestration
- TARGET.md is the per-run configuration surface for scope, fidelity, and page selection.
- .claude/skills/clone-website/SKILL.md, along with AGENTS.md and CLAUDE.md, define the AI-agent operating rules and workflow conventions that orchestrate the build.
12. Tooling/runtime boundaries
- The repository is built around TypeScript, Tailwind CSS v4, shadcn/ui, and Lucide React, all running in a standard Node/Next.js toolchain.
- next.config.ts, eslint.config.mjs, postcss.config.mjs, and tsconfig.json support the build/lint/typecheck pipeline, but they do not introduce a separate service layer.
13. What is intentionally absent
- There are no visible API routes, database layers, auth systems, or background job services in the tree.
- That absence is important architecturally: the repo is a frontend-first cloning template whose complexity comes from the AI-driven reconstruction workflow, not from application backend logic.
14. How to draw the architecture
- A useful diagram would show three zones: Claude Code / Chrome MCP orchestration, research + generated assets in docs/public, and the Next.js UI runtime in src/.
- Data flows from the target website into the research/spec/asset folders, then into the React/Tailwind component tree, and finally into the rendered clone in the browser.
Main entry points: page.tsx Home page · SKILL.md Clone skill · research Component specs · layout.tsx Layout
Components 23
Orchestration
Claude Code workflow and agent instructions that drive the cloning process.
- Target site · The website being reverse engineered and cloned.
- Chrome MCP · Browser automation and inspection channel used during reconnaissance.
- Clone skill · Claude Code skill that coordinates the clone-website procedure.
.claude/skills/clone-website/SKILL.md - Agent rules · Repository-wide operating instructions for the cloning process.
AGENTS.md - Claude notes · Claude-specific guidance and repository conventions.
CLAUDE.md - Target config · Per-run scope and fidelity settings for a specific clone task.
TARGET.md
Research & Assets
Generated specs, visual references, and downloaded static assets used to rebuild the site.
- Inspection guide · Guidance for extracting and recording target-page details.
docs/research/INSPECTION_GUIDE.md - Component specs · Generated specifications for styles, states, responsiveness, and content.
docs/research - Design refs · Screenshots and comparison material used for fidelity checks.
docs/design-references - Images · Downloaded image assets for the reconstructed page.
public/images - Videos · Downloaded video assets and captures from the target site.
public/videos - SEO assets · Favicons, OG images, and related metadata assets.
public/seo
Next.js App
The front-end template that renders the cloned experience.
- Layout · Root document structure for the Next.js app router.
src/app/layout.tsx - Home page · Primary landing surface where the clone is assembled.
src/app/page.tsx - Global styles · App-wide styling foundation for the cloned UI.
src/app/globals.css - Button · Reusable shadcn-style control used in composed sections.
src/components/ui/button.tsx - Utils · Shared helper utilities for class composition and common logic.
src/lib/utils.ts - Hooks · Placeholder for interactive behavior if the clone needs it.
src/hooks - Types · Placeholder for project-specific TypeScript types.
src/types
Toolchain
Build, lint, and type-check support for the template.
- Next config · Next.js build and runtime configuration.
next.config.ts - ESLint · Linting rules for the template.
eslint.config.mjs - PostCSS · PostCSS pipeline supporting Tailwind CSS v4.
postcss.config.mjs - TypeScript · TypeScript compiler configuration for the repo.
tsconfig.json
Connections 26
- Target site → Chrome MCP: inspect · Claude uses the browser channel to interrogate the source site.
- Chrome MCP → Inspection guide: capture · Inspection findings are recorded through the research workflow.
- Inspection guide → Component specs: specify · Reverse engineering produces detailed section and component specs.
- Target site → Design refs: compare · Visual references are collected to verify fidelity against the target.
- Target site → Images: download · Source imagery is copied into the template asset tree.
- Target site → Videos: capture · Video or motion assets are gathered from the target site.
- Target site → SEO assets: mirror · Metadata and social preview assets are brought into the clone.
- Clone skill → Agent rules: governed by · The skill follows repository-wide operating rules.
- Clone skill → Claude notes: guided by · Claude-specific conventions shape execution.
- Clone skill → Target config: scoped by · Each run is constrained by the target configuration.
- Clone skill → Component specs: drives · The skill turns research into buildable specifications.
- Component specs → Home page: inform · Specs guide how the page sections are composed.
- Design refs → Home page: verify · Rendered output is compared with reference screenshots.
- Images → Home page: feed · Downloaded assets are consumed by the page build.
- Videos → Home page: feed · Motion assets are wired into the UI where needed.
- SEO assets → Layout: seed · SEO and metadata assets influence the root document.
- Layout → Home page: wrap · The root layout contains the page surface.
- Home page → Global styles: uses · Page rendering depends on the global style layer.
- Home page → Button: composes · Page sections reuse shared UI primitives.
- Button → Utils: depends on · Primitive components share class-composition utilities.
- Hooks → Home page: extends · Interactive behavior can be added into the page layer.
- Types → Home page: types · Project-specific types can support the page and components.
- Next config → Layout: configures · Next.js settings govern app runtime behavior.
- PostCSS → Global styles: processes · PostCSS transforms the styling pipeline.
- TypeScript → Home page: checks · TypeScript validates the app source.
- ESLint → Home page: checks · Linting applies to the application code.