TWZNBooking Q4 2026
01Overview
Case05 / 05

The swiss army knife for freelancers — engineered from first principles.

Enterprise-grade file delivery for freelancers — 5 GB uploads, watermarked previews, and self-enforcing access controls, all without a single background worker.

Proof
uploads with zero background workers
Client
LOCKD
Industry
File Transfer / Productivity
Region
United Kingdom
Stack
Next.jsFastifyTypeScriptAWS LambdaS3SupabaseRailwayVercel
LOCKD platform screenshot
lockd.zip
02The challenge
Requirements07

The challenge.

Freelancers live in a gap between consumer file sharing and enterprise platforms. Consumer tools like WeTransfer cap out at 2 GB, strip metadata, and offer no preview controls. Enterprise solutions like Hightail or Aspera are built for post-production studios with IT departments — not a solo photographer sending proofs to a client.

LOCKD needed to bridge that gap: handle the file sizes and preview requirements of professional creative work, but with the simplicity of a consumer tool. No onboarding flow. No seat licenses. No IT department required.

The platform needed to:

Spec sheet07 req/07 mapped

The hard constraint: no background job infrastructure. No Redis, no Bull, no persistent workers. Every async operation — from watermarking to ZIP creation — had to be handled through Lambda functions with a callback webhook pattern, keeping the core API lean and stateless.

03The solution
Parts06

The solution.

01

Three-Tier Upload Strategy

A single upload strategy can't serve files that range from a 200 KB logo to a 4 GB video master. Small files need to be instant. Large files need resilience. Edge cases need a fallback that doesn't crash.

The system inspects file size at selection time and routes each file through the appropriate path automatically:

  1. 01

    Presigned Upload

    Files under 50 MB are uploaded directly to S3 via a presigned PUT URL — a single request, zero server load.

  2. 02

    Chunked Multipart

    Files between 50 MB and 5 GB are split into 25 MB chunks, uploaded in parallel, and reassembled by S3. Failed chunks retry automatically.

  3. 03

    Streaming Fallback

    For edge cases where presigned URLs aren't viable, the server proxies the upload as a stream — never buffering the full file in memory.

The user never sees this complexity. They drag a file, it uploads. The system decides how.

One drag. Three strategies. Zero config.

Fig.Upload tiers
Direct to S3Fallback
File picker
drag & drop · any size
At selection
Size check
routes each file by size
Presigned PUT
< 50 MB · one request
Chunked multipart
50 MB – 5 GB · 10 MB parts, resumable
Streaming fallback
server-proxied for edge cases
Private bucket
S3
files land encrypted, never public
6 events · play, or hover a node to trace its path
The upload strategy is selected automatically from the file's size — no user intervention required.
02

Streaming ZIP Creation

When a recipient wants to download all files at once, the platform needs to produce a ZIP archive — potentially gigabytes in size. Traditional approaches buffer the entire archive in memory or on disk. Neither scales when archives can reach multiple gigabytes.

Instead, a Lambda function streams files directly from S3 into a ZIP stream that writes back to S3 as it goes. No intermediate buffer. No disk. The function's memory footprint stays constant regardless of total file size.

  1. 01

    Request

    The client selects files and requests a ZIP. The API validates access and invokes a Lambda function.

  2. 02

    Stream & Compress

    The Lambda streams each file from S3 and compresses on-the-fly — no intermediate disk or memory buffer.

  3. 03

    Stale Detection

    If source files change during creation, the operation aborts and the client is prompted to retry.

  4. 04

    Delivery

    The completed ZIP is written to S3 and a presigned download URL is returned to the client.

Gigabytes compressed without touching the API server.

Fig.Streaming ZIP creation
LambdaDoneAbort
Recipient
“download all” · 14 files
API
queues the job, returns 202
S3
Source files
read as streams
Lambda
Streaming ZIP
compresses on the fly · constant memory
Guard
Stale detection
source changed → abort, client retries
S3
ZIP archive
written as it streams
Presigned URL
returned to the recipient
5 events · play, or hover a node to trace its path
ZIP creation runs entirely in Lambda — no server infrastructure to manage or scale.
03

Async Watermarking Pipeline

Freelancers need to share previews without giving away the originals. Watermarked previews solve this — but generating them synchronously during upload would make the experience painfully slow, especially for video.

The watermarking system runs as an asynchronous pipeline. Uploads complete instantly. Preview generation kicks off in the background across two specialised paths:

  1. 01

    Upload completes

    The user receives immediate confirmation. Watermarking begins asynchronously.

  2. 02

    Image pipeline

    A dedicated Lambda downloads the original from S3 and uses FFmpeg to composite the watermark overlay — typically under 5 seconds per image.

  3. 03

    Video pipeline

    FFmpeg generates a preview clip and burns in the watermark. A shared Lambda layer keeps the binary under 50 MB.

  4. 04

    Preview ready

    Watermarked previews are stored alongside the originals. The UI updates automatically when processing completes.

Previews without giving away the originals.

Fig.Watermark pipeline
PipelineShared layerOutput
S3 event
Upload complete
the user is already done
Resize
scale to preview size
Watermark
sharp · overlay
Shared
Lambda layer
one static FFmpeg build
Transcode
preview clip
Watermark
ffmpeg · burn-in
S3
Preview ready
watermarked · presigned
5 events · play, or hover a node to trace its path
Both pipelines share a single FFmpeg Lambda layer — keeping cold starts under 2 seconds.
04

File Requests & Collaborative Preview

Sharing files is only half the workflow. Freelancers also need to collect files from clients — brand assets, content for editing, signed contracts — and get feedback on deliverables before final handoff.

File Requests generate a branded upload portal with a unique link. The client uploads directly — no account required. Files land in the freelancer's transfer, organised and ready for download. The upload portal inherits the sender's branding: logo, colours, and a custom message.

Collaborative Preview turns any transfer into a review surface. Recipients can view watermarked previews in a gallery and leave threaded comments on individual files — including timestamp-linked feedback on audio and video (e.g. “at 2:34, the transition feels abrupt”). No account required — commenters just provide a display name. The freelancer sees all feedback in one place — no email chains, no scattered messages.

05

Access Control & File Lifecycle

Files shouldn't live forever. Every transfer in LOCKD has a lifecycle governed by four independent controls — each enforced at the API level, not the frontend.

Expiry timers auto-disable access after 24 hours, 7 days, or 30 days. Download limits cap the number of times each recipient can access a file. Password protection adds an optional passphrase gate. And when any condition triggers, auto-cleanup purges the files from S3 entirely — not just the links.

The result is a system where files are available exactly as long as they need to be, and not a second longer. The audit trail — who accessed what, when, how many times — is preserved even after the files are gone.

Fig.Transfer lifecycle
GateLimitPurge
Recipient
opens the share link
Password
optional passphrase
Expiry timer
24h · 7d · 30d
Download limit
max per recipient
Download
short-lived presigned URL
Auto-cleanup
files purged from S3
Final state
Expired transfer
files gone, audit trail kept
6 events · play, or hover a node to trace its path
Every control is enforced at the API level — the frontend only reflects the current state.
06

MIME Detection & Structured Errors

Two foundational systems run beneath every feature: content-based file type detection, and a structured error framework.

MIME detection reads magic bytes from the file header rather than trusting the uploaded file extension. A file named photo.jpg that's actually a PDF will be identified correctly — and routed to the right preview renderer. This prevents spoofing, ensures correct thumbnails, and means the watermarking pipeline always knows what it's processing.

Structured errors ensure every API endpoint returns a typed, machine-readable error object with a stable error code and a human-friendly message. The frontend maps these to contextual UI — a file too large shows the size limit, an expired transfer shows when it expired, a rate-limited request shows when to retry. No generic “something went wrong” modals.

04Architecture
Decisions08

Architecture.

Frontend
Next.js 15 / React 19 / TypeScript / Tailwind CSS
Backend
Fastify 5 / AWS Lambda
Database
Supabase (PostgreSQL + Row-Level Security)
Auth
AWS Cognito (JWT / RS256 / JWKS)
Storage
AWS S3 (presigned URLs + multipart upload)
Media Processing
FFmpeg Lambda Layer (images + video)

Key Architecture Decisions

Rather than a single upload strategy, the system selects from presigned PUT, chunked multipart, or streaming fallback based on file size. This keeps small files instant while supporting multi-gigabyte uploads without timeout or memory issues.

05Key features
Features12

Key features.

01

Large file uploads

Multi-gigabyte files via chunked multipart with automatic resume

02

Watermarked previews

Image and video previews with burned-in watermarks

03

Bulk ZIP download

Lambda-powered ZIP creation streamed directly from S3

04

File requests

Request files from clients with branded upload portals

05

Collaborative preview

Share preview links with comments and approval workflow

06

Access controls

Expiry, download limits, and password protection per transfer

07

Pay-to-unlock

Gate file access behind Stripe payment links

08

MIME detection

File type identified from magic bytes, not extensions

09

Responsive UI

Full mobile support for uploading, previewing, and downloading

10

Structured errors

Typed error responses with stable codes and contextual UI

11

Transfer analytics

Track views, downloads, and access patterns per transfer

12

Custom branding

Upload portals and preview pages match the sender's brand

    • 01Large file uploadsMulti-gigabyte files via chunked multipart with automatic resume
    • 02Watermarked previewsImage and video previews with burned-in watermarks
    • 03Bulk ZIP downloadLambda-powered ZIP creation streamed directly from S3
    • 04File requestsRequest files from clients with branded upload portals
    • 05Collaborative previewShare preview links with comments and approval workflow
    • 06Access controlsExpiry, download limits, and password protection per transfer
    • 07Pay-to-unlockGate file access behind Stripe payment links
    • 08MIME detectionFile type identified from magic bytes, not extensions
    • 09Responsive UIFull mobile support for uploading, previewing, and downloading
    • 10Structured errorsTyped error responses with stable codes and contextual UI
    • 11Transfer analyticsTrack views, downloads, and access patterns per transfer
    • 12Custom brandingUpload portals and preview pages match the sender's brand
06Next project
Next01 / 05

Need a platform that handles large files without compromises?

Whether you need multi-gigabyte uploads, async media processing, or secure file delivery — we'd love to talk.