The Problem
Rebuilding an existing website as a React app is slow, manual work: scrape the content, reimplement the layout, wire up interactivity. This project automates that loop — point it at a URL, describe changes in chat, and it generates and applies React code live in a sandbox. It's the open-source demo of Firecrawl's AI site-cloning workflow, forked here without the original's 28k-star history.
What This Does
Open Lovable is a chat-driven React app builder. The pipeline lives in app/api/ (36 route files): scrape-website/route.ts pulls a target site, analyze-edit-intent/route.ts turns a chat message into an edit plan, generate-ai-code-stream/route.ts streams generated code, and the install-packages, run-command, and sandbox-* routes manage a live execution environment. The UI is app/page.tsx and app/generation/page.tsx.
This is a collection of 9 self-contained projects, not one codebase. The substantial ones: the site-cloning engine, the AI generation/sandbox orchestrator, and a marketing site (components/app/(home)/) showcasing Firecrawl's API endpoints with Pixi-based animated hero components.
How It Is Wired
Execution starts in app/page.tsx — the chat UI — and flows into the API routes that own the side effects: sandbox creation, package installation, code application, Vite log monitoring. The import graph (274 modules, 102 edges) shows three hubs: components/shared/header/Nav/Nav (13 imports, instability 1.0), the Hero section (7 imports), and AnimatedRect (imported by 8 modules). Five modules sit in circular dependencies — cell.ts, crawl.ts, mapping.ts in the Pixi tickers feature — which makes those files risky to change in isolation.
The widest blast radius is generate-ai-code-stream/route.ts at 1,472 lines: it handles generation, streaming, and error handling in one file. Deep nesting (depth 9) and 23 branch points over 62 lines in Title.tsx compound the maintenance cost.
How To Use It
git clone https://github.com/moses-y/open-lovable
cd open-lovable
pnpm install
Add .env.local with FIRECRAWL_API_KEY (required) and one AI provider key (GEMINI_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, or GROQ_API_KEY). Choose a sandbox provider: Vercel (default, via OIDC token or personal access token) or E2B (E2B_API_KEY). Run pnpm dev and open http://localhost:3000.
Real-World Use
A product team wants to modernize a legacy landing page. Paste the URL into Open Lovable, chat "rebuild this with a dark theme and a pricing section," and the tool scrapes the source, generates the React code, applies it in the sandbox, and shows a live preview — iterating on the result conversationally instead of hand-porting HTML.
Code Health & Issues
Static analysis found 38 findings (12 high, 26 medium) across 5 kinds: 5 circular import members, 629 duplicated 6-line blocks across 92 files (worst in the app/api/ routes), 11 deeply nested control flows, 7 oversized files, and 14 high-branching modules. The health audit adds: High — no test suite across 274 source files; High — no CI workflow; Medium — no Dependabot/Renovate for the 2 manifests; Low — missing .editorconfig, .gitattributes, and formatter config. No secrets were found committed.
The Bottom Line
The core idea is sound and the API surface is well-organized, but the heavy route files and duplicated logic will hurt anyone extending it. Add tests and CI before relying on it, and expect to refactor generate-ai-code-stream/route.ts if you touch generation. Best for teams prototyping AI-driven site cloning, not for production use as-is.