Perfect-Web-Clone  by ericshang98

AI agent for pixel-perfect web cloning

Created 7 months ago
252 stars

Top 99.6% on SourcePulse

GitHubView on GitHub
Project Summary

Perfect Web Clone is an open-source AI agent system designed for pixel-perfect web cloning. It addresses the limitations of screenshot-based AI tools by extracting actual code (DOM, CSS, components) using a multi-agent architecture, enabling precise reproduction of web pages. This system targets developers and power users seeking production-ready code, offering a significant advantage over single-model LLM approaches that struggle with complex web structures.

How It Works

The project employs a multi-agent collaboration model, distributing tasks among specialized agents to overcome the context window limitations and coherence issues faced by single-model LLMs when processing large web pages. It utilizes a robust "Agent + Tools + Sandbox" pattern, integrating the Claude Agent SDK with over 40 specialized tools for capabilities ranging from file operations and system execution to browser control and diagnostics. Code execution and preview occur within a secure, isolated sandbox environment powered by BoxLite, ensuring safe and efficient development.

Quick Start & Requirements

  • Prerequisites: Python 3.8+ (Windows users should avoid 3.13+ due to Playwright compatibility issues), Node.js 18+, and an Anthropic API Key.
  • Setup: Clone the repository, configure the backend with your API key in .env, and start the server (start.sh or start.bat). Install frontend dependencies (npm install) and start the development server (npm run dev).
  • Access: Navigate to http://localhost:3100 in your browser.
  • Documentation: README

Highlighted Details

  • Code Extraction: Extracts complete DOM, CSS, and assets via Playwright, enabling accurate reproduction rather than guesswork from screenshots.
  • Multi-Agent Architecture: Specialized agents work in parallel, distributing tasks to handle large-scale web pages effectively and ensuring consistent output.
  • Agent + Tools + Sandbox: Leverages a structured workflow with over 40 tools and the BoxLite micro-VM for secure, isolated code generation, testing, and live preview.
  • Features: Includes full page capture, theme detection, component analysis, framework identification, and asset extraction.

Maintenance & Community

This project is maintained by Eric Shang. No specific community channels (like Discord or Slack) or additional contributor/sponsorship information is detailed in the README.

Licensing & Compatibility

The project is licensed under the MIT License, which is permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

Complex animations are noted as being difficult to extract perfectly, a limitation attributed to web crawling challenges rather than the agent architecture itself.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.