Rork Downloader

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

Autor
deeeeone
Instalaciones diarias
0
Instalaciones totales
0
Calificaciones
0 0 0
Versión
1.4
Creado
2/6/2025
Actualizado
2/6/2025
Tamaño
5,96 KB
Licencia
Desconocida
Funciona en

📦 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.