Skip to content

sudo-ajayverse/QuickDROP

Repository files navigation

QuickDrop

QuickDrop is a lightweight, single-page web app for temporary personal file transfers. It uses Supabase Storage for file blobs and a Supabase table to index metadata, then lets you search, filter, download, view, or delete uploads from a clean UI.

Features

  • Drag-and-drop or click-to-upload
  • Upload progress feedback (overall progress across multiple files)
  • Search by file name
  • Filter by date (today, week, month)
  • Download, view, rename, and delete actions
  • Soft-delete + restore workflow (restore page)
  • Multi-select bulk actions (Select Multiple → Confirm → bulk actions)

Tech Stack

  • HTML, CSS, JavaScript
  • Supabase (Storage + Postgres)

Project Structure

  • index.html: Main page (upload + uploaded files list)
  • restore.html: Restore page (deleted files list)
  • styles.css: App styling
  • app.js: Main page logic (upload/list/actions)
  • restore.js: Restore page logic (restore/permanent delete/retention cleanup)

Supabase Setup

  1. Create a Supabase project.
  2. Create a public storage bucket named files.
  3. Create a table named files with the following columns:
    • id (uuid, primary key, default: gen_random_uuid())
    • name (text, not null)
    • url (text, not null)
    • created_at (timestamptz, default: now())
    • deleted_at (timestamptz, nullable)
  4. Allow public reads from the bucket if you want view/download without auth.
  5. Add Row Level Security (RLS) policies based on your needs.

Configure the App

Update the Supabase config in:

Values to update:

  • SUPABASE_URL
  • SUPABASE_ANON_KEY

Run Locally

Because this is a static app, you can run it with any static server.

Example using PowerShell:

python -m http.server 5173

Then open http://localhost:5173 in your browser.

Restore page:

Android APK Download (Static Hosting)

This repo is a static website. To host your signed Android APK here:

  1. Put the file at downloads/QuickDrop.apk.
  2. The main page top-right download button links to downloads/QuickDrop.apk.

Netlify

If you deploy via Netlify (linked to this Git repo), commit the APK to the repo so Netlify can publish it. This repo includes a Netlify headers file (_headers) to serve APKs with the correct content-type and as an attachment.

If you want a different filename/path, update the link in index.html.

Server-Side Auto-Rename (Async) (Future Idea)

This is not enabled by default. The website works without it.

QuickDrop can optionally trigger a server-side rename job after an upload completes. This keeps uploads fast (no OCR in the browser) and can also be used to backfill existing files.

How it works:

  • The web app uploads the file and inserts a row in the files table.
  • Supabase triggers a rename service (Render) via a Database Webhook whenever a new row is inserted.
  • The rename service downloads the file, extracts text (OCR/PDF/DOCX), and updates files.name only if the current name still matches the original filename in the URL (so it won’t overwrite user edits).

Rename service code location:

Rename service (local):

  1. Copy future-ideas/rename-service/.env.example to future-ideas/rename-service/.env and fill:
    • SUPABASE_URL
    • SUPABASE_SERVICE_ROLE_KEY
  2. Start the service:
    • cd future-ideas/rename-service
    • npm install
    • npm start

Production (Render) + Supabase webhook:

  1. Deploy the service in future-ideas/rename-service/ to Render as a Web Service.
  2. Set Render environment variables:
    • SUPABASE_URL
    • SUPABASE_SERVICE_ROLE_KEY
    • (optional) RENAME_WEBHOOK_SECRET (recommended)
  3. In Supabase Dashboard → Database → Webhooks:
    • Create a new webhook for table: public.files
    • Events: INSERT
    • URL: https://<your-render-app>.onrender.com/rename-file
    • If using RENAME_WEBHOOK_SECRET, add header: x-rename-secret: <same value>

This setup means the browser never calls the rename service, and Render sleeping/cold-starts won’t cause lost rename requests.

Backfill existing files:

  • POST http://localhost:8787/rename-existing with JSON body like { "limit": 25 }.

Upload Size Limit

On Supabase Free, the maximum upload size is enforced by your Storage bucket configuration (often set to 50 MB). If uploads fail around that size, check your bucket's max file size in the Supabase dashboard.

Delete Key

Delete actions are protected by a simple prompt. The current key is:

  • delme

Change the key in:

Restore + Retention

  • Deleting a file on the main page sets deleted_at (soft delete).
  • Restore clears deleted_at.
  • Deleted items are retained for RETENTION_DAYS (currently 30 days) and then permanently removed.

Notes

  • Filenames are stored as-is. Avoid uploading sensitive data in a public bucket.
  • If you enable RLS, update policies so the app can read/write.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors