Technical Architecture
System Overview
┌─────────────────────────────────────────────────────────────┐
│ User's Browser │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ ZKFile Web App (React/Next.js) │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐ │ │
│ │ │ Encryption │ │ ZK Proofs │ │ Wallet │ │ │
│ │ │ Service │ │ Service │ │ Connector │ │ │
│ │ └──────────────┘ └──────────────┘ └─────────────┘ │ │
│ └────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
│ HTTPS (Encrypted Data Only)
▼
┌─────────────────────────────────────────────────────────────┐
│ ZKFile Backend API │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Next.js API Routes │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐ │ │
│ │ │ Upload │ │ Download │ │ Auth │ │ │
│ │ │ Handler │ │ Handler │ │ Service │ │ │
│ │ └──────────────┘ └──────────────┘ └─────────────┘ │ │
│ └────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
┌────────────┼────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ IPFS │ │ AWS S3 │ │ Solana │
│ Storage │ │ Backup │ │ Metadata │
└──────────┘ └──────────┘ └──────────┘Data Flow
Upload Process
User selects file in browser
Encryption Service encrypts file with AES-256-GCM
ZK Proof Service generates proof (e.g., size validation)
Wallet signs authentication message
Backend verifies signature
Encrypted file uploaded to IPFS + S3 backup
Metadata stored in database with IPFS hash
Decryption key stored locally (or derived from password)
Download Process
User requests file by ID or hash
Wallet signs access request
Backend verifies signature and permissions
Encrypted file retrieved from IPFS (or S3 fallback)
Client decrypts file with user's key
Original file restored in browser
Sharing Process
Owner generates time-locked access grant
Access grant signed with owner's private key
Recipient receives shareable link
Recipient's wallet verifies access grant signature
If valid, recipient can download and decrypt (with shared key)
Last updated