End-to-end encrypted file drops using ML-KEM in the browser (Rust → WebAssembly), an Express API on Node, and Supabase (Postgres + Auth + Storage). The server stores ciphertext and metadata only; decryption happens client-side.
| Doc | Contents |
|---|---|
backend/README.md |
API routes, env vars, rate limits, tests, Supabase notes |
design.md |
Schema intent, storage layout, high-level API & flows |
frontend/README.md |
Vite app, env vars, WASM build, deployment build notes |
supabase/README.md |
SQL migrations to apply in Supabase |
ADOPTION.md |
Production readiness: stress testing & security audit expectations before adoption |
This project is not a turnkey certified product. Before relying on it for sensitive or high-scale use, read ADOPTION.md: it explains why load/soak testing and independent security (and crypto) review are required, what scope they should cover, and how they differ.
- Frontend (
frontend/) — React + Vite; Supabase Auth (anon key); calls backend overVITE_API_URLin production. - Backend (
backend/) — Express; service role for DB/Storage; validates JWTs for owner routes. - Crypto —
frontend/src/wasm/crypto-module/pkg/holds wasm-pack output (tracked in git so Vercel / CI can build without Rust). Rust sources live underfrontend/public/crypto-module/.
- Node.js (LTS recommended)
- A Supabase project (URL, anon key, service role key)
- For regenerating WASM locally: Rust +
wasm-pack
Browsers need both the UI and the API:
- Web UI (Vite) — default http://localhost:5173
- API (Express) — default http://localhost:3001
cd post-quantum-file-sharing
npm install
npm install --prefix backend
npm install --prefix frontend
npm run dev(npm run dev at the repo root starts API + Vite via concurrently; each app needs its own node_modules.)
Open http://localhost:5173. The API is on 3001; with VITE_API_URL unset, Vite proxies /me, /boxes, and /files to the backend (see frontend/vite.config.ts).
# Terminal 1 — API
cd backend && npm install && npm run dev
# Terminal 2 — UI
cd frontend && npm install && npm run devbackend/.env—SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEY, optionalFRONTEND_URL(e.g.http://localhost:5173), see backend README.frontend/.env—VITE_SUPABASE_URL,VITE_SUPABASE_ANON_KEY; optionalVITE_API_URL(e.g.http://localhost:3001if not using the proxy). Copy fromfrontend/.env.example.
Do not commit real .env files; they are gitignored.
Deploy frontend and backend separately (e.g. Vercel + Railway).
- Backend — set
PORTfrom the host,SUPABASE_*,FRONTEND_URL(public SPA origin),TRUST_PROXY=1behind a reverse proxy, and optional upload rate-limit vars (see backend README). - Frontend — set
VITE_API_URLto the public API URL at build time (Vercel project env). SetVITE_SUPABASE_*the same way. - Supabase — Auth Site URL and Redirect URLs must include your production SPA origin. For Google sign-in, enable the Google provider and set the Google OAuth redirect URI to Supabase’s callback (see
supabase/README.md).
After deploy, confirm share links use FRONTEND_URL and that the upload page can reach the API (CORS + correct VITE_API_URL).