Skip to content
MylittlestoriesPublic

About

πŸ• Send the whole box, peer-to-peer. Drop many files or text, share one link β€” data goes straight browser-to-browser over WebRTC. No servers. Inspired by FilePizza.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PizzaBox β€” send the whole box, peer-to-peer

πŸ• PizzaBox

Send the whole box, peer-to-peer.
🌐 Live app β†’ Β Β·Β  πŸ“¦ Download

P2P No server storage Static License

Drop as many files as you like (or paste some text), get one share link β€” a 4-character code + QR β€” and it travels directly from your browser to the recipient's over WebRTC. Nothing is stored on any server.

Inspired by the delightful simplicity of FilePizza β€” rebuilt as a 100% static site so it can be hosted anywhere (GitHub Pages, Netlify, an S3 bucket, or just opened locally).


✨ Features

  • Multi-file by default β€” send any number of files together in one link.
  • Drag & drop files or whole folders (folders are flattened automatically).
  • Text / snippet mode β€” share a message, link, or code block instead of files.
  • True peer-to-peer β€” bytes go browser β†’ browser over an encrypted WebRTC data channel (DTLS). Only a tiny signaling handshake uses the free public PeerJS broker.
  • No server storage, no size caps, no sign-up.
  • Password protection (optional) β€” gate a box behind a password before the file list is even revealed.
  • Stream huge files straight to disk β€” using the File System Access API:
    • πŸ’Ύ Save an individual file directly to disk (no memory buildup).
    • πŸ’Ύ Save all to folder β€” streams every file into a folder you pick, ideal for large batches.
    • Graceful .zip fallback (in-memory, via JSZip) on browsers without the API (Firefox/Safari).
  • Live transfer stats β€” speed, ETA, and overall progress on both the sender and receiver side, plus per-file progress bars.
  • Share how you like β€” copy the link, share the 4-char code, or scan the QR.
  • Nice touches β€” light/dark theme, Screen Wake Lock so transfers don't stall when the screen sleeps, a connect notification (toast + beep) when a receiver joins, and multi-receiver support.
  • Self-contained β€” PeerJS, JSZip and the QR library are vendored into libs/, so there are no runtime CDN dependencies.

πŸš€ How it works

  1. Sender picks files (or text) β†’ the app registers a short peer ID on the public broker and shows a link/code/QR.
  2. Receiver opens the link (or types the code) β†’ their browser opens a direct WebRTC connection to the sender. If the box is password-protected, they unlock it first.
  3. The sender streams the requested files in 64 KB chunks straight to the receiver, who either saves them to disk on the fly or reassembles them and zips them.

Both tabs must stay open during the transfer β€” that's the nature of true P2P, and it's why nothing ever touches a server.

πŸ–₯️ Run locally

Any static file server works, e.g.:

# Python
python3 -m http.server 8000
# or Node
npx serve .

Then open http://localhost:8000. Open a second tab/device with the generated link to receive.

WebRTC + PeerJS need a secure context. localhost counts as secure, and so does any https:// host β€” which is why GitHub Pages works out of the box. The File System Access "save to disk" features are Chromium-only (Chrome/Edge/Opera); other browsers automatically fall back to the in-memory .zip download.

🌐 Deploy to GitHub Pages

Option A β€” automatic (GitHub Actions, included)

This repo ships with .github/workflows/deploy.yml. Just:

  1. Push the project to a GitHub repo (main branch).
  2. Go to Settings β†’ Pages β†’ Build and deployment β†’ Source = GitHub Actions.
  3. Every push to main now builds and deploys automatically. Your app lands at https://<you>.github.io/<repo>/.

Option B β€” manual (deploy from a branch)

  1. Push the contents of this folder to a repo.
  2. Settings β†’ Pages, set Source = Deploy from a branch, Branch = main / root, save.

Either way there's no build step and no backend. (.nojekyll is included so nothing gets filtered by Jekyll.)

git init
git add .
git commit -m "PizzaBox"
git branch -M main
git remote add origin https://github.com/<you>/<repo>.git
git push -u origin main

πŸ“ Project structure

index.html                    # markup + all views (compose / send / receive / join)
css/styles.css                # styling & theme
js/app.js                     # sender + receiver logic, WebRTC transfer, streaming, zip
libs/                         # vendored peerjs, jszip, qrcode (no CDN needed)
.github/workflows/deploy.yml  # auto-deploy to GitHub Pages
.nojekyll                     # tell Pages to serve files as-is
LICENSE                       # MIT

πŸ”’ Privacy & limits

  • Files/text are transferred directly and encrypted in transit (WebRTC/DTLS). They never pass through PizzaBox's or GitHub's servers.
  • The public PeerJS broker only relays the initial connection handshake, never your data.
  • Password protection gates access to the box over the encrypted channel β€” good for casual protection, but it isn't a zero-knowledge scheme.
  • The zip fallback assembles files in the receiver's memory; for multi-GB batches prefer "Save all to folder" (Chromium), which streams to disk with no memory buildup.
  • Want zero third-party signaling? Run your own PeerJS server and point PEER_OPTS in js/app.js at it.

Made with πŸ• and WebRTC.

About

πŸ• Send the whole box, peer-to-peer. Drop many files or text, share one link β€” data goes straight browser-to-browser over WebRTC. No servers. Inspired by FilePizza.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages