Case study · File Share

Share the file, skip the account.

A self-hosted file sharing app with one deliberate asymmetry: a single admin signs in to upload, and everyone else needs nothing at all. Send a link, they click it, done. Unguessable addresses, uploads streamed to disk, and everything auto-deletes in an hour unless it is pinned.

github.com/8exgh/share_files ↗Next.js · TypeScript · Tailwind · iron-session
Watch it, two minutes

The full feature walkthrough: logging in, drag-and-drop uploads, inline notes, one-click share links, and the auto-delete badges doing their thing.

The idea

Most file-sharing tools tax the wrong person. The sender already has an account; it is the recipient who gets marched through sign-up walls, download quotas, and consent banners just to receive one PDF. File Share inverts that: authentication exists only where it earns its keep.

One admin holds a password, kept in a secure httpOnly session cookie. Every download link is anonymous: no login, no account, no tracking of the person clicking it. The link itself is the credential.

How it holds together
  • Unguessable addresses. Files live at /f/{uuid}/{filename} — a link only exists if you were given it. No directory to enumerate, nothing to brute-force.
  • Streamed to disk. Uploads up to 100 MB are written as they arrive, so a big file never balloons server memory. Drag and drop or pick a file; same path either way.
  • Ephemeral by default. Everything expires an hour after upload, swept every thirty minutes. Something worth keeping gets pinned and kept forever — deleting is the default, keeping is the decision.
  • Notes, not just files. Paste a snippet and it becomes a shareable .txt with the same link semantics, for the times the thing to share is three lines of text, not an attachment.
  • Honest logging. Every request is logged with the real client IP, Cloudflare headers understood, so the admin can see what was fetched and when.
Proof it works

The repository tests the promises, not just the code: a dockerized Playwright suite drives the real UI through login, upload, note creation, link copying, and deletion on every push — 15 of 15 passing, in about fourteen seconds.

The same discipline as everything else we build: a green check means the feature was literally exercised, not assumed.