Secure, blockchain-based file storage with emergency access controls and wallet-based encryption.
π Live App: http://blaut.vercel.app/
π Smart Contract: 0x06cc01278b3e60fFAF4096ccd08e9Cc6D1D51722 (View on Explorer)
| Feature | Demo Link | Description |
|---|---|---|
| File Upload & Encryption | Watch Demo | See how files are encrypted and stored securely |
| File Sharing | Watch Demo | Learn to share files with wallet addresses |
| Emergency Access | Watch Demo | Emergency responder access for medical scenarios |
| Folder Organization | Watch Demo | Create and manage folder structures |
Your Device β Encrypt file with unique key
β
Blockchain β Record ownership & access permissions
β
Supabase β Store encrypted file + encrypted keys
- Select File β Choose file (max 50MB)
- Generate Key β Create unique encryption key
- Encrypt File β AES-256 encryption on your device
- Sign Message β Wallet signs unique challenge for key derivation
- Derive Encryption Key β SHA256 hash of signature creates encryption key
- Upload β Store encrypted file in cloud
- Blockchain Record β Record ownership on blockchain
- Select File β Choose file to share
- Enter Address β Input recipient's wallet address
- Owner Signs β Owner wallet signs to decrypt original key
- Re-encrypt Key β Encrypt file key for recipient's wallet
- Grant Access β Update blockchain permissions
- Verify Access β Check blockchain permissions
- Get Encrypted Key β Retrieve your encrypted file key
- Sign Challenge β Wallet signs verification message
- Derive Decryption Key β Generate key from signature
- Decrypt File Key β Use derived key to decrypt file key
- Download & Decrypt β Get and decrypt original file
Blaut uses a unique approach where each user's wallet signature generates deterministic encryption keys:
// 1. Create unique challenge message
const challenge = `Blaut File Key Encryption
Wallet: ${walletAddress.toLowerCase()}
Timestamp: ${Date.now()}`;
// 2. User signs the challenge with their private key
const signature = await signMessage({ message: challenge });
// 3. Derive encryption key from signature
const encryptionKey = SHA256(signature).toString();
// 4. Use key for AES encryption/decryption
const encrypted = AES.encrypt(fileKey, encryptionKey);- Unique Keys: Each signature produces a unique encryption key
- Non-Deterministic: Same wallet can generate different keys each time
- Wallet-Bound: Only the wallet owner can recreate the signature
- Secure: Requires private key access to decrypt
- Traceable: Each signature is linked to wallet address on blockchain
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β File Upload β β Signature Process β β Blockchain Link β
β β β β β β
β 1. Select File β β 3. Create Challenge β β 6. Record on Chain β
β 2. Generate File Keyβ β 4. Sign with Wallet β β 7. Link Signature β
β β β 5. Derive Enc Key β β 8. Explorer Link β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β
ββββββββββββββββββββ
β Key Storage β
β β
β β’ Encrypted Keys β
β β’ Challenge Data β
β β’ Wallet Mapping β
ββββββββββββββββββββ
Every file operation creates a blockchain transaction that can be verified:
- Contract Address:
0x9C87587f06B43dEF7e0b7FA0fB0F12fFB4337454 - Network: Sepolia Testnet
- Explorer:
https://sepolia.etherscan.io/address/0x9C87587f06B43dEF7e0b7FA0fB0F12fFB4337454
Transaction Types:
uploadFile()- Records file ownership and initial accessgrantAccess()- Adds new user to file access listrevokeAccess()- Removes user from file access listaddEmergencyResponder()- Authorizes emergency personnelmarkFileAsEmergency()- Enables emergency access for file
Blaut implements a sophisticated signature-based encryption system that generates unique keys for each operation:
const generateChallenge = (walletAddress: string, operation: string) => {
return `Blaut ${operation} Operation
Wallet: ${walletAddress.toLowerCase()}
Timestamp: ${Date.now()}
Nonce: ${crypto.getRandomValues(new Uint32Array(1))[0]}`;
};const deriveEncryptionKey = async (challenge: string, wallet: any) => {
// User signs challenge with wallet private key
const signature = await wallet.signMessage(challenge);
// Create deterministic but unique encryption key
const keyMaterial = `${signature}:${challenge}`;
const encryptionKey = await crypto.subtle.digest('SHA-256',
new TextEncoder().encode(keyMaterial)
);
return Array.from(new Uint8Array(encryptionKey))
.map(b => b.toString(16).padStart(2, '0'))
.join('');
};Each wallet generates a unique queue of encryption keys that are:
- Non-reversible: Cannot derive private key from encryption key
- Deterministic: Same signature always produces same encryption key
- Unique per operation: Different challenges create different keys
- Wallet-bound: Only the wallet owner can recreate signatures
interface EncryptionQueue {
walletAddress: string;
keyIndex: number;
encryptedKeys: {
fileId: string;
encryptedKey: string;
challenge: string;
timestamp: number;
signature: string;
}[];
}Every file operation is recorded on the blockchain and can be verified through the explorer:
Network Details:
- Network: Awakening Testnet
- Chain ID: 1043
- RPC URL:
https://rpc.awakening.bdagscan.com - Currency: BDAG
- Explorer:
https://explorer.awakening.bdagscan.com
Contract Information:
- Contract Address:
0x06cc01278b3e60fFAF4096ccd08e9Cc6D1D51722 - Contract Name: FileStorageV3
- Network: Ethereum Mainnet / Sepolia Testnet
- Verification: View all transactions and contract interactions
- Explorer: View Contract on Etherscan
Transaction Hash Lookup:
// Example transaction verification
const verifyTransaction = async (txHash: string) => {
const explorerUrl = `https://explorer.awakening.bdagscan.com/tx/${txHash}`;
// View transaction details, gas usage, and contract interactions
};Key Transaction Events:
FileUploaded(address indexed owner, string fileId, string ipfsHash)AccessGranted(string indexed fileId, address indexed user, address indexed grantedBy)AccessRevoked(string indexed fileId, address indexed user, address indexed revokedBy)EmergencyResponderAdded(address indexed user, address indexed responder, string nickname)EmergencyFileAccessed(string indexed fileId, address indexed responder)
The contract is live and all transactions can be verified on the blockchain explorer:
Contract Overview:
- Address:
0x06cc01278b3e60fFAF4096ccd08e9Cc6D1D51722 - Creator:
0x170F099B...A3E2bcd13 - Total Transactions: 4 successful deployments
- Latest Activity: Recent contract interactions visible
- Gas Usage: Optimized for file operations
Recent Transactions:
- Contract deployment and initialization
- File upload operations with encrypted storage
- Access permission grants and revokes
- Emergency responder management
- Ownership verification transactions
How to Verify Your Transactions:
- Copy your transaction hash from the app
- Visit the contract explorer page
- Check the "Transactions" tab for your specific operation
- Verify gas fees, block confirmation, and transaction status
src/
βββ components/ # React UI components
β βββ DashboardUI.tsx # Main dashboard interface
β βββ VaultUI.tsx # File management interface
β βββ EmergencyAccess.tsx # Emergency access portal
β βββ Header.tsx # Navigation header
β βββ Sidebar.tsx # Navigation sidebar
β βββ modals/ # Modal dialogs
β βββ ShareModal.tsx
β βββ RenameModal.tsx
β βββ FileActionsModal.tsx
βββ lib/
β βββ crypto.ts # Encryption/decryption utilities
β βββ supabase.ts # Database client configuration
β βββ hooks/ # Custom React hooks
β βββ useFileManager.ts # File CRUD operations
β βββ useFileUpload.ts # File upload logic
β βββ useFileSharing.ts # File sharing logic
β βββ useFolderManager.ts # Folder operations
β βββ useEmergencyAccess.ts # Emergency access hooks
βββ utils/
β βββ file.ts # File utility functions
β βββ folder.ts # Folder utility functions
β βββ emergencyAccess.ts # Emergency access utilities
βββ constant/
β βββ abi.ts # Smart contract ABI
β βββ contract.ts # Contract address configuration
β βββ index.ts # Application constants
βββ pages/
β βββ DashboardPage.tsx # Main dashboard page
β βββ VaultPage.tsx # File vault page
β βββ EmergencyAccessLearnPage.tsx # Emergency access info
βββ wagmi.ts # Web3 configuration
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β User Interface β β Business Logic β β Data Layer β
β β β β β β
β β’ React Components β β β’ Custom Hooks β β β’ Supabase DB β
β β’ Modal Dialogs β β β’ Crypto Functions β β β’ Supabase Storage β
β β’ Form Validation β β β’ File Operations β β β’ Smart Contract β
β β’ State Management β β β’ Access Control β β β’ IPFS (Future) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β
ββββββββββββββββββββ
β External APIs β
β β
β β’ Wallet Providers β
β β’ RPC Endpoints β
β β’ Block Explorers β
ββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client-Side Security β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β’ File Encryption (AES-256) β
β β’ Key Generation (Crypto-secure random) β
β β’ Wallet Signature Verification β
β β’ Zero-Knowledge File Processing β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Blockchain Layer β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β’ Access Control Lists β
β β’ Ownership Verification β
β β’ Emergency Responder Registry β
β β’ Immutable Audit Logs β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Storage Layer β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β’ Encrypted File Storage β
β β’ Encrypted Key Storage β
β β’ Metadata Storage β
β β’ Row-Level Security β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Visit the deployed application: http://blaut.vercel.app/
- Connect your wallet (MetaMask recommended)
- Ensure you're on the correct network
- Start uploading and managing files immediately
- Node.js 18+
- MetaMask wallet
- Sepolia ETH for gas fees
git clone https://github.com/canhamzacode/blaut.git
cd blaut
npm installcp .env.example .envRequired Environment Variables:
VITE_PUBLIC_SUPABASE_URL=your_supabase_url
VITE_PUBLIC_SUPABASE_ANON_KEY=your_supabase_key
VITE_WALLET_CONNECT_ID=your_walletconnect_id- Open Supabase SQL Editor
- Run
supabase-complete-schema.sql - Creates all tables, functions, and storage buckets
npm run dev- Frontend: React 18 + TypeScript + Vite
- Web3: Wagmi + RainbowKit
- Blockchain: Ethereum Sepolia Testnet
- Storage: Supabase Storage + Database
- Encryption: AES-256 (CryptoJS)
- Styling: Tailwind CSS
| File | Purpose | Location |
|---|---|---|
| Contract Address | Smart contract: 0x06cc01278b3e60fFAF4096ccd08e9Cc6D1D51722 |
src/constant/contract.ts |
| Contract ABI | Interface for blockchain calls | src/constant/abi.ts |
| Network Config | Wallet & chain setup | src/wagmi.ts |
| Database Schema | Supabase tables & functions | supabase-complete-schema.sql |
Current Contract: 0x9C87587f06B43dEF7e0b7FA0fB0F12fFB4337454 (Sepolia)
- Upload: Drag-and-drop with client-side encryption
- Download: Automatic decryption with wallet verification
- Share: Grant access to any wallet address
- Delete/Rename: Full file lifecycle management
- Folders: Create hierarchical folder structures
- Navigation: Breadcrumb paths and folder browsing
- Permissions: Folder-level sharing with role controls
- Medical Scenarios: Emergency responder access to critical files
- Blockchain Verification: Verified emergency personnel only
- Audit Trail: Complete logging of emergency access events
- Time-Limited: Automatic access expiration
- Multiple Views: Grid and list display modes
- Real-time Updates: Live file and folder synchronization
- Responsive Design: Mobile-friendly interface
- Progress Tracking: Upload/download progress indicators
- End-to-End Encryption: Files encrypted before upload
- Zero-Knowledge Storage: Cloud providers can't read files
- Blockchain Access Control: Immutable permission records
- Wallet-Based Security: Your keys, your files
- Emergency Protocols: Secure emergency access with full audit trails
const {
files, // Array of accessible files
isLoading, // Loading state
downloadFile, // Download and decrypt file
deleteFile, // Delete file
renameFile, // Rename file
refreshFiles // Refresh file list
} = useFileManager();const {
uploadFile, // Upload and encrypt file
uploadState, // Upload progress state
resetUpload // Reset upload state
} = useFileUpload();const {
shareFile, // Share file with address
sharingState, // Sharing progress state
resetSharingState // Reset sharing state
} = useFileSharing();// Encrypt file with generated key
encryptFileWithKey(file: File, key: string): Promise<EncryptedFileData>
// Decrypt file with key
decryptFileWithKey(encryptedData: string, key: string, metadata: FileMetadata): Blob
// Encrypt key for wallet
encryptKeyForWallet(key: string, walletAddress: string, signMessage: Function): Promise<string>
// Decrypt key with wallet
decryptKeyForWallet(encryptedKey: string, walletAddress: string, signMessage: Function): Promise<string>// Upload encrypted file to storage
uploadEncryptedFileToStorage(encryptedData: EncryptedFileData): Promise<string>
// Download encrypted file from storage
downloadEncryptedFile(filePath: string): Promise<string>
// Get files accessible to user
getAccessibleFiles(walletAddress: string): Promise<FileWithAccess[]>
// Grant file access to user
grantFileAccess(fileId: string, walletAddress: string, encryptedKey: string, grantedBy: string): Promise<void>- Developer: Hamza Abdul-Muizz
- Repository: github.com/canhamzacode/blaut
- Issues: Use GitHub Issues for bug reports
- Demo: Live Demo (Coming Soon)
npm run build
# Deploy to Vercel, Netlify, or preferred hosting- Contract source:
FileStorageV2.sol - Deploy to desired network
- Update
src/constant/contract.tswith new address
- Wallet Security: Your wallet private key = master key to all files
- Key Loss Warning: Lost wallet = lost file access (by design)
- Network Fees: Blockchain transactions require gas fees
- File Limits: 50MB maximum file size
- Testnet Only: Currently on Sepolia testnet
MIT License - See LICENSE file for details
Built for secure, decentralized file storage
- About 30% of emergency cases in developing nations fail because crucial records canβt be accessed quickly.
- In Nigeria alone, thousands lose lives or assets yearly due to missing identity or medical details.
Blault was built to change that β ensuring that life-saving data is never locked away when itβs needed most.
Blault blends encryption, blockchain, and smart access control to keep your data safe yet instantly accessible to trusted people.
With Blault, you can:
β Upload and encrypt files directly from your wallet. π Grant access to trusted contacts like doctors or family. π¨ Assign emergency responders who can view your files only in crisis. π Track all file activities transparently on-chain.
No central servers, no leaks β only full control and privacy.
-
File Upload
- Files are encrypted locally using your walletβs unique signature.
- Encrypted content is stored in Supabase.
- File metadata and permissions are stored on the BlockDAG chain.
-
Access Management
- You can add or remove wallet addresses for file access.
- Authorized users receive their own encrypted decryption keys.
-
Emergency Mode
- You can mark files as βemergency accessible.β
- Assigned responders (e.g. hospital, next of kin) can access them in verified emergencies.
-
Transparency
- Every access event is logged immutably on-chain β no disputes, no hidden edits.
| Component | Description |
|---|---|
| Smart Contract (FileStorageV3.sol) | Stores file ownership, access control, and emergency logic. |
| Supabase | Handles encrypted file storage & metadata. |
| Supabase Schema (supabase_schema.sql) | Predefined structure for replicating the same backend instantly. |
| Encryption Layer | Uses AES + wallet signature for encryption/decryption. |
| Frontend (Vite + React) | User dashboard for file upload and management. |
| WalletConnect | For authentication and signing transactions. |
root/
β
βββ src/
β βββ components/ # Reusable UI components
β βββ pages/ # App screens
β βββ utils/ # Encryption & wagmi config
β
βββ FileStorageV3.sol # Smart contract file
βββ supabase_schema.sql # Database schema for easy setup
βββ .env.example
βββ vite.config.ts
βββ wagmi.ts # Blockchain setup
βββ README.md
1οΈβ£ Duplicate .env.example and rename it .env.
2οΈβ£ Fill in your Supabase and WalletConnect details.
# Supabase
VITE_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
VITE_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# WalletConnect
VITE_WALLET_CONNECT_ID=your_wallet_connect_project_idExample:
VITE_PUBLIC_SUPABASE_URL=https://abcd1234.supabase.co VITE_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... VITE_WALLET_CONNECT_ID=abcd1234567890abcd1234567890abcd
To create your own database structure:
- Log in to your Supabase Dashboard.
- Create a new project.
- Navigate to SQL Editor.
- Copy all content from
supabase_schema.sql(found in the root folder). - Paste and run it.
β This will automatically generate all tables and relationships needed for Blault to work.
File: FileStorageV3.sol
Network: BlockDAG Sepolia Testnet
Compiler: Solidity ^0.8.0
Address: 0x06cc01278b3e60fFAF4096ccd08e9Cc6D1D51722
- Upload & encrypt file metadata
- Grant/revoke access
- Manage emergency responders
- Mark and auto-enable emergency access
- View immutable access logs
# Clone repo
git clone https://github.com/canhamzacode/blault
cd blault
# Install dependencies
npm install
# Run locally
npm run devVisit β http://localhost:5173
- User signs a message β generates AES key.
- File is encrypted client-side with that key.
- Encrypted file uploaded to Supabase.
- File hash & access metadata stored on BlockDAG.
- Only authorized wallets can decrypt using their keys.
π‘οΈ No one, not even Blaultβs team, can read your files.
Q1: What if I lose access to my wallet? π’ Your trusted emergency contacts can access your marked files.
Q2: Are my files stored on-chain? π’ No, only file hashes and permissions. The encrypted file itself lives securely in Supabase.
Q3: Why BlockDAG? π’ BlockDAG offers faster confirmation times and low gas fees β ideal for real-time access control.
Q4: Can I revoke someoneβs access? π’ Yes, instantly on-chain. Their keys are invalidated immediately.
π Watch Demo: Loom β Blault Secure File & Emergency System
π View the full Blault Pitch Deck: π https://www.figma.com/deck/kO73drXWEKgr9j6YE1K440/Blault-Presentation?node-id=49-133&t=LpFXpHVHn0ccYScE-0&scaling=min-zoom&content-scaling=fixed&page-id=0%3A1