How pskth/event-driven-file-sharing works
This is a serverless, temporary file-sharing system: a sender requests an upload link, transfers the file directly to S3, and shares a short code; a recipient exchanges that code for a download link and downloads directly from S3. The gatekeeper coordinates presigned URLs and metadata, while DynamoDB TTL expiration drives cleanup of stored files. The excerpts show the web, gatekeeper, download, and cleanup implementations. The TTL-to-cleanup event wiring is documented in the README, not shown in the sampled source.
Main entry points: server.py Web broker · app.js Sharing interface · gatekeeper_api/app.py Upload gatekeeper · download_handler/app.py Download handler
Components 9
Web client
- Sharing interface
src/web_app/static/app.js - Web page
src/web_app/templates/index.html - Web broker
src/web_app/server.py
Link services
- Upload gatekeeper
src/gatekeeper_api/app.py - Download handler
src/download_handler/app.py
File and metadata storage
- S3 file bucket
- DynamoDB metadata
Expiration cleanup
- Automated cleanup
src/automated_cleanup/app.py
Other components
- Sender / recipient
Connections 12
- Sender / recipient → Sharing interface: uses
src/web_app/static/app.js - Web broker → Web page: renders
src/web_app/server.py - Sharing interface → Web broker: requests links
src/web_app/static/app.js - Web broker → Upload gatekeeper: invokes upload
src/web_app/server.py - Web broker → Download handler: invokes download
src/web_app/server.py - Upload gatekeeper → S3 file bucket: creates upload URL
src/gatekeeper_api/app.py - Upload gatekeeper → DynamoDB metadata: writes status
src/gatekeeper_api/app.py - Download handler → DynamoDB metadata: reads record
src/download_handler/app.py - Download handler → S3 file bucket: creates download URL
src/download_handler/app.py - Sharing interface → S3 file bucket: transfers directly
src/web_app/static/app.js - DynamoDB metadata → Automated cleanup: TTL removal triggers
README.md - Automated cleanup → S3 file bucket: deletes expired file
src/automated_cleanup/app.py