PocketChest: Secure Temporary File Sharing for Modern Workflows
“
Effortless sharing with built-in expiration – Your digital file chest for secure collaboration
The Universal Challenge of File Sharing
Professionals across industries face consistent file-sharing hurdles:
-
Sending large design files to clients when email attachments fail -
Securely sharing sensitive documents without permanent cloud exposure -
Quickly transferring project assets between remote team members
PocketChest addresses these pain points directly by creating temporary, secure sharing containers. Like a digital safety deposit box, your files remain accessible only during their specified lifespan before automatic deletion.
Understanding the PocketChest System
The “Chest” Concept Explained
Each chest functions as a secure digital container holding:
-
📁 Files of any type (up to 200GB each) -
📝 Text content (configuration details, code snippets)
Upon upload, the system generates a unique 6-character code (e.g., X3K9MN) for retrieval. Recipients simply enter this code to access contents.
Core Capabilities Overview
Technical Architecture Demystified
File Journey Visualization
graph LR
A[User Upload] --> B(Frontend Chunking)
B --> C{Large File?}
C -->|Yes| D[Multipart Storage in R2]
C -->|No| E[Direct Storage]
D & E --> F[Generate 6-digit Code]
F --> G[Recipient Enters Code]
G --> H[Automatic File Assembly]
Foundational Technologies
-
Global Content Delivery
Leverages Cloudflare’s 300+ global data centers ensuring low-latency access worldwide -
Automated Expiration System
Hourly cleanup process:for chest in database: if current_time > chest.expiry_time: delete_associated_files(chest) remove_database_entry(chest)
-
Security Infrastructure
-
Code entropy: 62^6 ≈ 56.8 billion combinations -
Time-based OTP: 30-second rotating codes -
JWT tokens: Session-based authorization
-
Hands-On Implementation Guide
Local Development Setup (Under 10 Minutes)
Step 1: Configuration Preparation
# Backend configuration
cp pocket-chest-backend/wrangler.jsonc.template pocket-chest-backend/wrangler.jsonc
# Frontend environment
cp pocket-chest-frontend/.env.local.template pocket-chest-frontend/.env.local
Step 2: Service Initialization
# Launch backend service
cd pocket-chest-backend
npm install
npm run dev # API available at http://localhost:8787
# Launch frontend interface
cd pocket-chest-frontend
npm install
npm run dev # Access at http://localhost:3000
File Upload Process
Drag-and-drop interface with live progress tracking
File Retrieval Process
Simple code-based access system
Real-World Application Scenarios
Case Study: Architectural Firm Collaboration
-
Challenge: Sharing 15GB BIM models with contractors -
Solution: -
Upload Revit files with 7-day expiration -
Enable TOTP protection -
Share access code: T7B4R2
-
Case Study: Medical Research Team
-
Challenge: Securely sharing sensitive patient data samples -
Workflow: -
Upload encrypted datasets -
Set 24-hour automatic deletion -
Include text instructions in the same chest
-
Cross-Platform Comparison
Technical Implementation Details
Database Architecture
-- Core data structures
CREATE TABLE chests (
id TEXT PRIMARY KEY, -- 6-character access code
expiry_time INTEGER, -- Unix timestamp expiration
totp_secret TEXT -- Encrypted authentication secret
);
CREATE TABLE files (
chest_id TEXT REFERENCES chests(id),
r2_key TEXT, -- Cloud storage identifier
file_name TEXT -- Original filename
);
Large File Handling Process
-
Frontend splits 150GB video into 100MB chunks -
Parallel upload of chunks to Cloudflare R2 -
Server maintains chunk sequence mapping -
Download triggers automatic reassembly
Frequently Asked Questions
How secure are the 6-digit codes?
“
With 56.8 billion possible combinations (62^6), even at 1,000 guesses/second, brute-forcing would require approximately 1.8 years
Are files truly deleted after expiration?
“
Two deletion mechanisms ensure compliance:
Scheduled hourly cleanup of expired content Runtime expiration verification during access attempts
How does TOTP authentication work?
“
Enable “Authenticator Protection” during upload Scan QR code with apps like Authy or Google Authenticator Recipients must provide current code for access
What file types are supported?
“
All file formats including:
Application executables (.exe, .dmg) Design source files (.psd, .sketch) Media archives (.zip, .rar)
Project Structure Overview
PocketChest/
├── Backend Core pocket-chest-backend/
│ ├── Multipart processing src/multipart-upload.ts
│ ├── Authentication engine src/auth/totp-validator.ts
│ └── Test suite test/ (32 validation cases)
│ ├── Large file tests multipart-upload.spec.ts
│ └── Collision tests retrieval.spec.ts
│
└── Frontend Interface pocket-chest-frontend/
├── Configuration components ExpirySelector.tsx
├── Progress visualization UploadProgress.tsx
├── API integration hooks/usePocketChest.ts
Why Self-Hosted Beats Commercial Alternatives
Key Advantages
-
Data Sovereignty
Complete control over storage location and access policies -
Customization Flexibility
Modify core parameters including:-
Access code length and complexity -
Custom expiration timelines
-
-
Cost Efficiency
Cloudflare’s free tier includes:-
100,000 daily API requests -
10GB D1 database storage -
5GB monthly R2 storage
-
“
Full deployment guide available in DEPLOYMENT.md – deployable in under 30 minutes
Operational Best Practices
Security Protocols
-
Mandatory TOTP for Confidential Files
Adds second authentication layer beyond access codes -
Expiration Guidelines
-
Secure Code Distribution
-
Prefer encrypted messaging channels -
Avoid public code posting
-
“
Open-source project: [GitHub Repository] · MIT Licensed · Contributions welcome
PocketChest transforms temporary file sharing from a security concern into a streamlined workflow. Whether sharing 1KB configuration snippets or 200GB video projects, it maintains the crucial balance between accessibility and data control.