Authorized website cloning for redesign & development.
cloneX crawls websites you own or have permission to clone, downloads their assets, strips proprietary branding, and hands you back a clean, editable project template β ready for your own redesign.
- What cloneX Does
- Quick Start (Docker)
- Step-by-Step Usage Guide
- Configuration
- Local Development
- API Documentation
- Security & Authorization
- Tech Stack
- Troubleshooting
- Deploy to Production
- License & Disclaimer
- Support
cloneX turns any authorized website into a ready-to-edit local project in five steps:
| Step | Description |
|---|---|
| π·οΈ Crawl | Follows internal links, detects sitemaps, respects robots.txt |
| π₯ Download | Saves HTML, CSS, JS, images, fonts, icons, and media |
| π Rewrite | Converts absolute URLs to local paths and repairs broken links |
| π§Ή Sanitize | Strips analytics, tracking scripts, and proprietary branding |
| π¦ Export | Generates a ready-to-edit project with README.md and package.json |
The fastest way to run cloneX is with Docker Compose.
git clone https://github.com/hakkachhamza/cloneX.git
cd cloneXcp .env.example .envThe defaults work for local development β edit .env only if you need to customize something.
docker compose up --build -dGive it ~60β90 seconds for the database, backend, worker, and frontend to spin up.
| Service | URL |
|---|---|
| π₯οΈ Frontend | http://localhost:3000 |
| π API Docs | http://localhost:8000/api/docs |
| β€οΈ Health | http://localhost:8000/health |
A default admin account is created automatically on every startup:
| Field | Value |
|---|---|
admin@cloneforge.local |
|
| Password | admin |
β οΈ Note: This password is reset on every backend restart, so the login always works β even against an existing database. Change it immediately in any shared or production environment.
- Open the dashboard at http://localhost:3000/dashboard
- Click Projects in the sidebar
- Click New project
- Enter:
- Project name:
My Site Clone - Website URL:
https://example.com(a site you own or are authorized to clone)
- Project name:
- Click Create & clone
- The crawl starts automatically
- Track progress on the project detail page
- Pause, resume, or cancel the job at any time
Once the crawl completes, open the project and switch between:
- Original preview β the live source site
- Generated preview β your cloned template
- Split screen β side-by-side comparison
# Log in and get a token
curl -X POST "http://localhost:8000/api/v1/auth/login" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin@cloneforge.local&password=admin"
# Download the project as a ZIP (replace PROJECT_ID)
curl "http://localhost:8000/api/v1/projects/PROJECT_ID/download?format=zip" \
-H "Authorization: Bearer YOUR_TOKEN" \
-o project.zipThe exported ZIP is structured as:
project/
βββ pages/ # Crawled HTML pages
βββ assets/
β βββ css/ # Stylesheets
β βββ js/ # JavaScript files
β βββ images/ # Image assets
β βββ fonts/ # Font files
βββ README.md
βββ package.json
Open any exported HTML file and replace the placeholders with your own content:
{{COMPANY_NAME}}{{EMAIL}}{{PHONE}}{{ADDRESS}}{{COPYRIGHT}}
Key environment variables in .env:
| Variable | Description | Default |
|---|---|---|
SECRET_KEY |
JWT signing key | change in production |
DATABASE_URL |
PostgreSQL connection string | local Docker |
REDIS_URL |
Redis connection string | local Docker |
STORAGE_TYPE |
local or s3 |
local |
MAX_CRAWL_DEPTH |
Maximum crawl depth | 5 |
ALLOW_PRIVATE_NETWORKS |
Allow local/private crawl targets | false |
FIRST_SUPERUSER_EMAIL |
Seed admin email | admin@cloneforge.local |
FIRST_SUPERUSER_PASSWORD |
Seed admin password | admin |
For S3-compatible storage, also set:
STORAGE_TYPE=s3
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_REGION=...
S3_BUCKET_NAME=...
S3_ENDPOINT_URL=...Backend
cd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
playwright install chromium
alembic upgrade head
python -m app.initial_data
uvicorn app.main:app --reload --port 8000Worker
cd backend
source .venv/bin/activate
celery -A app.workers.celery_app worker --loglevel=infoFrontend
cd frontend
npm install
npm run devInteractive API docs are available once the backend is running:
- Swagger UI: http://localhost:8000/api/docs
- ReDoc: http://localhost:8000/api/redoc
cloneX is designed for legitimate, authorized use only:
- β
Only
http://andhttps://URLs are accepted - β Private networks and localhost are blocked by default
- β
robots.txtis respected by default - β Analytics, tracking, and authentication tokens are stripped from exports
- β Credentials are never included in exported projects
You must only clone websites you own or have explicit written permission to clone.
| Layer | Technology |
|---|---|
| Frontend | Next.js 14 Β· React 18 Β· TypeScript Β· Tailwind CSS Β· Framer Motion |
| Backend | FastAPI Β· SQLAlchemy Β· Pydantic |
| Database | PostgreSQL 15 |
| Queue | Redis Β· Celery |
| Crawler | Playwright Β· BeautifulSoup Β· requests |
| DevOps | Docker Β· Docker Compose Β· GitHub Actions |
Database is unhealthy
docker compose down -v
docker compose up --build -dPort 5432 already in use
netstat -ano | findstr :5432Stop the conflicting service, or change the port in .env and docker-compose.yml.
Crawl gets stuck
Check the worker logs:
docker compose logs worker -fThen reduce max_depth and max_pages for faster results.
Full reset
docker compose down
docker compose up --build -d- Change
SECRET_KEYto a secure random string - Use managed PostgreSQL and Redis
- Configure S3-compatible storage
- Run migrations with Alembic
- Put a reverse proxy (nginx/traefik) with TLS in front of the app
- Set
NODE_ENV=productionandDEBUG=false
cloneX is provided for legitimate website redesign and template extraction on sites you own or are authorized to clone. Users are responsible for complying with applicable laws, terms of service, and robots.txt directives.
Found a bug or have a feature request? Open a GitHub issue.
Made with βοΈ by hakkachhamza