Rork Downloader

Intercepts Rork snapshot data and allows exporting code which stupidly is a premium feature of rork

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
deeeeone
Daily installs
0
Total installs
45
Ratings
0 0 0
Version
1.4
Created
2025-06-02
Updated
2025-06-02
Size
5.96 KB
License
N/A
Applies to

📦 Rork Snapshot Downloader – Tampermonkey Userscript

This userscript allows you to download the full snapshot of a project from rork.com as a ZIP archive, preserving its original folder and file structure.

✨ Features

  • 🧠 Auto-detects project snapshot via DevTools Network API.
  • 📁 Reconstructs full directory tree from snapshot JSON.
  • 🗂 Zips everything into a downloadable archive.
  • 🔘 Adds a "Download Snapshot" button to the Rork UI header.
  • 💾 Caches the snapshot in IndexedDB so you can re-download without reloading the page.

🧩 Requirements

  • Tampermonkey installed on your browser (Chrome, Firefox, Edge, etc.)

🚀 Installation

  1. Install Tampermonkey if you haven't already.
  2. Click here to install the script or manually add the script from the file:
  • rork_snapshot_downloader.user.js
    1. Visit any Rork project, e.g.:
   https://rork.com/p/nidk8d3iupmlk6lmelulr

🛠️ How It Works

  1. When the page loads, it waits for the https://api.rork-direct.workers.dev/trpc/projects.fetchSnapshot network request.
  2. Once received, it extracts and parses the returned JSON snapshot.
  3. It constructs a complete virtual filesystem tree from the snapshot.
  4. When you click the "Download Snapshot" button in the header, it:
  • Builds a ZIP archive from the file tree.
  • Triggers the download with the appropriate file/folder structure.

📸 Example Output

project.zip
├── app/
│   └── index.tsx
├── assets/
├── app.json

🧹 Troubleshooting

  • If the snapshot hasn’t been received yet, the button will wait and retry once it's available.
  • Reload the page if the button doesn’t appear (Tampermonkey might need to re-inject the script).

🧪 Dev Notes

  • Uses JSZip to generate ZIP archive in-browser.
  • Runs at document-start for maximum reliability.
  • Works entirely client-side; no external dependencies required.

📄 License

MIT — Free to use, modify, and distribute.