FotoDrop: Live Photo Cloud Storage & Tethered Event Streaming
A photo cloud storage and live distribution platform built with C# and .NET 8 using Cloudflare R2 object storage, decoupled background worker services, and real-time USB-tethered camera streaming for instantaneous live event delivery.
This system is currently under active development as a closed-source solution. The repository and source code are private. Architectural documentation, tech stack notes, and milestones are outlined below as progress continues.
Overview
In traditional event photographyβweddings, corporate galas, conferences, and sports tournamentsβattendees often wait days or weeks for edited galleries. FotoDrop eliminates this bottleneck by transforming cameras into live cloud broadcast devices: photographs taken by a professional camera appear in a live guest gallery within seconds.
The platform combines a companion Android mobile application (built on a custom USB-OTG camera tethering engine) with a distributed C# / .NET 8 backend, Cloudflare R2 object storage, and an asynchronous ImageSharp background worker pipeline.
System Architecture
βββββββββββββββββββ USB-OTG / PTP ββββββββββββββββββββββββββ
β DSLR / Camera β ββββββββββββββββββββββββ> β Android Companion App β
βββββββββββββββββββ ββββββββββββββββββββββββββ
β
HTTPS Upload β (Immediate ACK)
v
ββββββββββββββββββββββββββ
β FotoDrop Web API β
β (ASP.NET Core 8) β
ββββββββββββββββββββββββββ
β
Local Staging Bufferβ (Atomic enqueue)
v
ββββββββββββββββββββββββββ Async Poll / Batch ββββββββββββββββββββββββββ
β Cloudflare R2 CDN β <βββββββββββββββββββββ β PhotoProcessingWorker β
β (Zero-Egress Storage) β Upload Renditions β (SixLabors ImageSharp)β
ββββββββββββββββββββββββββ ββββββββββββββββββββββββββ
β β
β Fast Edge Distribution β Watermark & Resize
v v
ββββββββββββββββββββββββββ ββββββββββββββββββββββββββ
β Live Event Gallery β <βββββββββββββββββββββ β Relational Metadata β
β (QR Code / Web App) β Share Tokens & Slugs β (SQLite / PostgreSQL) β
ββββββββββββββββββββββββββ ββββββββββββββββββββββββββ
Core Engineering & Design Patterns
1. Instant Camera-to-Cloud Mobile Bridge
The ingest workflow is driven by a companion Android application built on the authorβs native CamToPhoneUSB tethering architecture:
- Hardware PTP Link: Connects directly to Sony, Canon, Nikon, and Fujifilm cameras over a standard USB-OTG cable.
- Automated Shutter Detection: As soon as the camera shutter fires, the Android service detects the incoming high-res JPEG/RAW payload on camera storage.
- Immediate Streaming: Streams the binary file to the FotoDrop ingestion endpoint (
MobilePhotosController) over cellular 5G or local Wi-Fi without manual intervention.
2. High-Throughput Ingestion & Staging Buffer
Blocking the photographerβs camera buffer while waiting for heavy cloud transformations would degrade shooting cadence:
- The API accepts the multipart payload, records initial metadata, and immediately streams the raw file into a localized staging buffer (
LocalPhotoStagingService). - An immediate
202 Acceptedresponse is returned to the mobile app in milliseconds, ensuring zero shutter lag during rapid burst shooting.
3. Asynchronous Worker & ImageSharp Transformation Pipeline
Offloaded to an isolated background service (PhotoProcessingWorker):
- Worker Polling & Batching: Continuously polls pending staging items in configurable batches, claiming jobs through atomic database status transitions (
UploadedβProcessingβCompleted). - Dynamic Orientation & Clamping: Automatically evaluates EXIF orientation tags and downsamples oversized images to configurable target bounds (
MaxPhotoEdgePixels). - Custom Watermarking Engine: Supports dynamic text watermarks and alpha-blended graphic branding logos with configurable anchors (
BottomRight,Center, etc.) and variable opacity. - Multi-Resolution Generation: Concurrently produces optimized web-display variants and crisp micro-thumbnails (
ThumbnailEdgePixels) for snappy mobile gallery rendering.
4. Zero-Egress Cloud Storage via Cloudflare R2
- Processed images and original master copies are pushed directly to Cloudflare R2 object storage using S3-compatible API abstractions (
IR2ObjectStorage). - Leveraging Cloudflare R2 eliminates egress bandwidth costs, enabling high-volume event audiences to stream and download high-resolution photos simultaneously without escalating hosting expenses.
5. Live Event Albums & Instant Sharing
- Album Visibility & Permissions: Organizers can generate event-specific albums with custom slugs, access policies, and optional invite codes (
InviteCodeGenerator). - Attendee Distribution: Guests scan a venue QR code to view live-updating photo feeds as the event unfolds in real time.
- Packaging & Downloads: Built-in manifest service (
IPhotoDownloadService) enables attendees and hosts to download filtered sets or full-resolution archives.
6. Containerized Deployment
The complete stack is containerized with multi-stage Docker builds and managed via Docker Compose:
snaprelay-api: ASP.NET Core 8 RESTful API.snaprelay-worker: Dedicated .NET background processing worker.snaprelay-frontend: Nuxt / Vue responsive web gallery interface.
Note: In accordance with proprietary project guidelines, raw production source code and internal keys are withheld. The above analysis highlights system architecture, queuing mechanics, and data flow patterns.