You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Personal media cold-storage archive and media server built on Azure Blob Storage.
Browse, upload, stream, and share photos & videos from iPhone/Mac via a web app.
1. Vision
A lightweight, personal "Google Photos" replacement backed by Azure Blob Storage (Cool tier).
Store all media originals cheaply. Browse via a responsive web gallery. Stream videos directly
in the browser. Share albums with family/friends via time-limited links.
2. Stack
Layer
Technology
Frontend
React 18 + Vite + TypeScript
Backend
C# / .NET 8 LTS (ASP.NET Core Web API)
Database
PostgreSQL (existing B1ms — new cleansweep database alongside n8n)
1000 RU/s, Central India (available, not used — relational model doesn't fit NoSQL)
rv-storage
Need to create:
Resource
Details
Estimated Cost
App Service Plan
B1 Linux, Central India
~$13/mo
App Service
.NET 8 API (deployed on above plan)
$0 (included)
Blob Containers
originals, playback, thumbnails in existing storage account
$0 (part of existing account)
Postgres Database
CREATE DATABASE cleansweep; on existing server
$0
4. Feature Requirements
Phase 1 — MVP
#
Feature
Description
1.1
Auth
Azure AD App Registration. Users sign in with Microsoft account. Roles (owner/viewer) assigned via Azure AD App Roles + RBAC in Azure Portal. No user management in app.
1.2
Upload (Web UI)
Drag-and-drop / file picker. Browser uploads directly to Azure Blob via SAS URL (API generates write-only SAS, transfers zero file bytes). Chunked upload for large files via Azure Block Blob API from browser. Bulk upload with per-file progress, retry on throttle (HTTP 429/503), and configurable concurrency.
1.3
Download
Download originals via backend-generated SAS tokens (302 redirect — API serves zero bytes).
1.4
Gallery / Browse
Paginated grid view with lazy-loaded thumbnails. Filter by date range, media type.
1.5
Timeline View
Auto-organize by EXIF capture date → year/month groups.
1.6
Thumbnail Generation
Async via Azure Storage Queue + BackgroundService. Triggered after upload completes. ImageSharp for JPEG/PNG, Magick.NET for HEIC, FFmpeg keyframe for video.
1.7
Real-time Status (SignalR)
WebSocket push for processing status updates. Thumbnail ready, transcode complete/failed — no polling.
1.7
HEIC → JPEG
Convert iPhone HEIC photos to JPEG on upload for browser compatibility. Original preserved.
1.8
HEVC → H.264
Background transcoding via ACI + FFmpeg. Direct MP4 streaming (no HLS). Original preserved.
1.9
Video Playback
HTML5 <video> with range-request support from blob. Seeking works natively.
Phase 2 — Albums, Search & Sharing
#
Feature
Description
2.1
Custom Albums
Create named albums, add/remove media. Cover thumbnail denormalized on album row.
2.2
Search & Filter
By date range, media type, album.
2.3
Sharing Links
Time-limited tokens for individual files or albums. No login required for shared content.
2.4
Bulk Upload Progress
Per-file and overall progress for multi-file uploads.
Phase 3 — Polish
#
Feature
Description
3.1
Lifecycle Management
Auto-tier blobs Cool → Cold → Archive by age via Azure Lifecycle policies.
3.2
Duplicate Detection
Content hash stored in DB. Check before upload.
3.3
PWA
Installable on iPhone/Mac. Offline thumbnail cache.
5. Blob Path Strategy — Hash-Partitioned Naming
Inspired by production systems handling billions of files. The media item's GUID serves as
the blob filename. First 8 hex characters define directory depth (4 levels × 2 chars).
On upload:
1. Generate: Guid.NewGuid().ToString("N") → "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
2. Extension: from original filename → ".jpg"
3. Blob path:
originals/a1/b2/c3/d4/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.jpg
thumbnails/a1/b2/c3/d4/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.jpg
playback/a1/b2/c3/d4/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.mp4
Benefits:
No filename collisions — GUID is unique
No sanitization needed — no special chars, unicode, spaces
Even blob partition distribution — prevents hot partitions at scale
Same GUID = DB primary key + blob path base (one ID, three containers)
Original human-readable filename stored in media_items.file_name column only