Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

🌐 SiteClonePro

The Ultimate Website Mirroring & Offline Asset Archiver

Next.js TypeScript React TailwindCSS License: MIT

Download entire websites with their exact directory hierarchy preserved and all assets rewritten to 100% offline relative paths.
No broken styles. No missing fonts. Zero remaining live-domain requests. Instant local browsing via file:///.


Key Features β€’ Why SiteClonePro? β€’ How It Works β€’ Quick Start β€’ Crawl Depth Controls β€’ Tech Stack



πŸ’‘ Why SiteClonePro vs. Others?

Most website copiers (like legacy wget, HTTrack, or basic scraper scripts) produce broken offline copies because modern web apps use dynamic CSS url() fonts, CDNs, srcset, lazy-loaded images, and JavaScript loaders that freeze offline. SiteClonePro was built from the ground up to solve all of these problems.

Feature Legacy Copiers (wget, HTTrack) Basic Browser Extensions ⚑ SiteClonePro
Directory Preservation Cluttered / Mangled Flat / Single folder Exact Mirror of Original Paths
Recursive CSS & Font Scraping Often misses @font-face / @import Misses fonts & SVGs Recursive Deep Extraction
Offline Relative Rewriting Hardcoded or broken Often stays absolute Mathematically Computed ../ Levels
CDN & External Asset Archiving Leaves live CDN links Blocks external calls Mirrored under external/<domain>/...
Zero Lingering Remote Links ❌ (leaves many live URLs) ❌ 100% Zero Live Links Remaining
Missing Image Protection Ugly broken image boxes Broken icons Automated Clean Fallback Placeholders
Preloader Spinner Freeze Stuck on spinner forever Often fails Auto-Dismiss Offline Script Injected
Speed & Concurrency Slow single-thread Browser tab heavy High-speed 14x Concurrent Engine

✨ Key Features

πŸ—‚οΈ 1. True Hierarchy & Directory Preservation

SiteClonePro analyzes the original server's URL pathnames and mirrors them directly on your disk:

  • https://example.com/assets/css/main.css βž” assets/css/main.css
  • https://example.com/assets/img/logo/brand.png βž” assets/img/logo/brand.png
  • https://example.com/assets/fonts/font.woff2 βž” assets/fonts/font.woff2
  • https://example.com/products/item-42 βž” products/item-42/index.html

πŸ”— 2. Intelligent Offline Relative Path Rewriter

Every single reference in every HTML and CSS file is converted to point to its corresponding local file based on directory depth:

  • In index.html: assets/css/main.css
  • In products/index.html: ../assets/css/main.css
  • In products/category/item/index.html: ../../../assets/css/main.css
  • In assets/css/main.css: ../fonts/font.woff2

🎨 3. Deep Recursive Asset & Font Extraction

  • CSS Dependencies: Automatically scans @import url(...), @font-face { src: url(...) }, background-image: url(...), and cursor/mask URLs recursively.
  • HTML Tags: Extracts link[href], script[src], img[src], picture, source[srcset], video[src/poster], audio[src], and SVG <use xlink:href>.
  • Lazy Load Attributes: Automatically discovers data-src, data-lazy-src, data-original, data-bg, and data-srcset.

πŸ›‘οΈ 4. Offline Resilience & Self-Healing

  • Broken Image Protection: If a remote server returns 404 Not Found for an asset, SiteClonePro provides a transparent placeholder buffer so your offline pages never show broken image icons.
  • Offline Preloader Bypass: Modern sites often freeze on loading spinners offline because analytics or tracking scripts are blocked. SiteClonePro injects a micro-script that auto-dismisses preloaders once the DOM is ready.

🌐 5. Full Site Deep Crawling & Sitemap Integration

  • Automatically checks /sitemap.xml and /sitemap_index.xml to discover all pages immediately.
  • Crawls internal pages concurrently, filtering out external domains, auth routes, and anchor fragments.

⚑ 6. Instant ZIP Packaging & Smart Caching

  • An in-memory cache saves discovered assets after scanning. Clicking Download ZIP reuses the scan results instantlyβ€”no redundant crawling!

πŸ”„ How It Works

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ Input Site URL β”‚ βž” Validate & emulate modern browser headers
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
 β”‚
 β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ Sitemap & Crawl β”‚ βž” Concurrently crawl internal pages & build link graph
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
 β”‚
 β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ Deep CSS & Font β”‚ βž” Recursively parse stylesheets for fonts, icons & bg images
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
 β”‚
 β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ Concurrent Down β”‚ βž” Download all assets in parallel (14x concurrency + retries)
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
 β”‚
 β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ Relative Rewriteβ”‚ βž” Convert all URLs to local relative paths (zero remote links)
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
 β”‚
 β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ ZIP Generation β”‚ βž” Stream compressed offline-ready ZIP archive
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Node.js (v18.18 or higher recommended)
  • npm, pnpm, or yarn

1. Clone the Repository

git clone https://github.com/lobdp/WebMirror.git
cd WebMirror

2. Install Dependencies

npm install

3. Run the Development Server

npm run dev

Visit http://localhost:3000 in your browser.

4. Production Build

npm run build
npm run start

βš™οΈ Crawl Depth Controls

Select the crawl depth that matches your needs:

Option Depth / Page Cap Best Used For
🌐 Full Site (All Pages - Unlimited) Up to 5,000 pages Complete archives of blogs, portfolios & e-commerce sites
Single Page Only (Instant) 1 Page Landing pages, single-page promotional sites
Standard Site Up to 20 pages Small corporate websites, basic portfolios
Large Site Up to 50 pages Company sites with service catalogues
Deep Crawl Up to 150 pages Content-heavy publications and news sites
Very Large Site Up to 500 pages Product stores and documentation hubs
Massive Archive Up to 1,500 pages Complete library or documentation repositories

πŸ’» Tech Stack


πŸ“‚ Output Folder Structure

When you unzip the downloaded archive, your website will be ready to open locally:

my-site-offline-site/
β”œβ”€β”€ index.html <-- Main homepage (double-click to open!)
β”œβ”€β”€ about/
β”‚ └── index.html <-- Clean relative subpage
β”œβ”€β”€ products/
β”‚ β”œβ”€β”€ index.html
β”‚ └── item-1/
β”‚ └── index.html
β”œβ”€β”€ assets/
β”‚ β”œβ”€β”€ css/
β”‚ β”‚ β”œβ”€β”€ bootstrap.min.css
β”‚ β”‚ └── main.css
β”‚ β”œβ”€β”€ js/
β”‚ β”‚ β”œβ”€β”€ jquery.min.js
β”‚ β”‚ └── main.js
β”‚ β”œβ”€β”€ img/
β”‚ β”‚ β”œβ”€β”€ logo/
β”‚ β”‚ └── banner.jpg
β”‚ └── fonts/
β”‚ └── font.woff2
β”œβ”€β”€ external/ <-- External CDN libraries mirrored locally
β”‚ └── code.jquery.com/
β”œβ”€β”€ DOWNLOAD-REPORT.txt <-- Complete audit report of all mirrored assets
└── README.txt <-- Offline instructions

🀝 Contributing

Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.


πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

Built with ❀️ by lobdp. Star ⭐ this repository if you found it useful!

About

Download entire websites for 100% offline browsing with rewritten relative assets and zero remote links.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /