How makdoom/transio works
Transio is an anonymous, browser-based encrypted file-sharing product. A sender selects a file; the client encrypts its bytes and metadata, asks the API to create a pending share, uploads the ciphertext directly to object storage, and completes the share. A recipient first views share status, then explicitly downloads and decrypts using the key in the URL fragment. The README documents QR sharing, expiry, and burn-on-download. Backend wiring is shown in the sampled routes and bootstrap; UI-to-client details beyond the app’s view selection are limited by the excerpts.
Main entry points: lib/shares.ts Share workflow · routes/shares.ts Share lifecycle · index.ts API bootstrap · App.tsx Web app
Components 18
Browser sharing
- Web app
apps/web/src/App.tsx - Send share
apps/web/src/components/SenderShareView.tsx - Receive share
apps/web/src/components/RecipientShareView.tsx - Share QR
apps/web/src/components/ShareQrCode.tsx - Share workflow
apps/web/src/lib/shares.ts - Browser crypto
apps/web/src/lib/crypto.ts - Share transport
apps/web/src/lib/share-transport.ts
Share API
- API bootstrap
apps/api/src/index.ts - Fastify app
apps/api/src/app.ts - Share lifecycle
apps/api/src/routes/shares.ts
Persistence and cleanup
- Expiry cleanup
apps/api/src/shares/cleanup.ts - Database client
apps/api/src/db/index.ts - Share records
apps/api/src/db/schema.ts
Object storage
- Storage port
apps/api/src/storage/storage-port.ts - R2 storage
apps/api/src/storage/r2-storage.ts
Other components
- Sender
- Recipient
- Cloudflare R2
Connections 23
- Sender → Web app: opens
README.md - Web app → Send share: selects send
apps/web/src/App.tsx - Web app → Receive share: selects receive
apps/web/src/App.tsx - Recipient → Web app: opens link
README.md - Send share → Share workflow: creates share
- Receive share → Share workflow: downloads share
- Share workflow → Browser crypto: encrypts, decrypts
apps/web/src/lib/shares.ts - Share workflow → Share transport: requests lifecycle
apps/web/src/lib/shares.ts - Share workflow → Share QR: offers QR link
- Share transport → Share lifecycle: calls API
README.md - API bootstrap → Fastify app: builds
apps/api/src/index.ts - API bootstrap → Database client: creates database
apps/api/src/index.ts - API bootstrap → Expiry cleanup: runs sweep
apps/api/src/index.ts - API bootstrap → R2 storage: configures storage
apps/api/src/index.ts - Fastify app → Share lifecycle: registers routes
apps/api/src/app.ts - Share lifecycle → Database client: reads, writes
apps/api/src/routes/shares.ts - Share lifecycle → Storage port: requests URLs
apps/api/src/routes/shares.ts - Share lifecycle → Expiry cleanup: deletes expired blob
apps/api/src/routes/shares.ts - Expiry cleanup → Database client: updates records
apps/api/src/shares/cleanup.ts - Expiry cleanup → Storage port: deletes blobs
apps/api/src/shares/cleanup.ts - Database client → Share records: uses schema
apps/api/src/db/index.ts - R2 storage → Storage port: implements
apps/api/src/storage/r2-storage.ts - R2 storage → Cloudflare R2: signs object requests
apps/api/src/storage/r2-storage.ts