FutureBase is a decentralized platform that enables users to send encrypted messages to their future selves, securely stored on the blockchain. By combining advanced encryption, decentralized storage, and smart contract technology, FutureBase preserves personal thoughts, dreams, and important moments that unlock at predetermined future dates.
The platform allows users to create time capsules containing personal messages that remain encrypted and inaccessible until their specified unlock date. Messages are encrypted using military-grade AES-GCM encryption, stored on IPFS for decentralization, and their metadata is recorded on the blockchain for immutability and transparency.
- Secure Message Creation: Write encrypted letters with custom unlock dates and times
- Blockchain Storage: Immutable record of letter metadata on Ethereum-compatible networks
- Decentralized Content Storage: Encrypted message content stored on IPFS
- Wallet Integration: Support for Coinbase Wallet, MetaMask, and WalletConnect
- User Dashboard: Comprehensive interface for managing letters and viewing statistics
- Time-Based Access Control: Messages automatically become available at specified future dates
- Cross-Platform Compatibility: Web-based application with responsive design
- Framework: Next.js 15 with React 19
- Language: TypeScript
- Styling: Tailwind CSS with custom design system
- UI Components: Radix UI primitives with custom theming
- Animations: Framer Motion for smooth interactions
- 3D Graphics: Three.js with React Three Fiber for visual effects
- Smart Contracts: Solidity ^0.8.30
- Libraries: OpenZeppelin contracts (Ownable, ReentrancyGuard)
- Networks: Base Sepolia (testnet) and Base (mainnet)
- Web3 Integration: Wagmi and Viem for wallet connections and contract interactions
- Identity: Coinbase OnchainKit for user profiles and basenames
- Decentralized Storage: IPFS via Pinata SDK
- Encryption: AES-GCM encryption using Web Crypto API
- Key Derivation: PBKDF2 with wallet address as entropy source
- Build System: Next.js with custom configuration
- Linting: ESLint with TypeScript support
- Styling Processing: PostCSS with Tailwind CSS
- Package Management: npm/pnpm with lockfile management
futurebase-fe/
├── app/ # Next.js app router pages
│ ├── about/ # About page
│ ├── contact/ # Contact page
│ ├── dashboard/ # User dashboard
│ ├── letters/ # Letters management
│ ├── time-travel/ # Main letter creation interface
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # Reusable React components
│ ├── ui/ # UI component library
│ ├── gl/ # 3D graphics components
│ └── ... # Feature-specific components
├── contract/ # Smart contract source code
│ └── src/
│ └── futureBase.sol # Main smart contract
├── hooks/ # Custom React hooks
├── lib/ # Utility libraries and configurations
├── services/ # External service integrations
└── public/ # Static assets
The FutureBase smart contract manages letter creation, storage, and retrieval:
Key Functions:
createLetter(string _ipfsHash, uint256 _releaseTime): Creates a new letter with encrypted content hash and unlock timestampclaimLetter(uint256 _letterId): Claims and returns IPFS hash for available lettersgetLetter(uint256 _letterId): Retrieves letter metadata with access-controlled content hashgetUserLetter(address _user): Returns array of letter IDs owned by user
Security Features:
- Reentrancy protection using OpenZeppelin's ReentrancyGuard
- Owner-only administrative functions
- Input validation for release times and IPFS hashes
- Access control for letter content based on ownership and timing
- Key Generation: Encryption key derived from user's wallet address using PBKDF2
- Content Encryption: Message content encrypted with AES-GCM using generated key
- IPFS Storage: Encrypted content uploaded to IPFS, receiving a content hash
- Blockchain Record: Letter metadata (IPFS hash, unlock time) stored on smart contract
- Decryption: At unlock time, content retrieved from IPFS and decrypted using same key derivation
- Node.js 18+
- npm or pnpm
- Git
- Clone the repository:
git clone <repository-url>
cd futurebase-fe- Install dependencies:
npm install
# or
pnpm install- Set up environment variables:
Create
.env.localwith required configuration:
NEXT_PUBLIC_GATEWAY_URL=your-ipfs-gateway-url
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your-walletconnect-project-id- Start the development server:
npm run dev- Open http://localhost:3000 in your browser.
- Navigate to the contract directory:
cd contract- Install Foundry (if not already installed):
curl -L https://foundry.paradigm.xyz | bash
foundryup- Install dependencies:
forge install- Deploy to testnet:
forge script script/Deploy.s.sol --rpc-url $BASE_SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --broadcast- Connect your wallet using Coinbase Wallet, MetaMask, or WalletConnect
- Navigate to the Time Travel page
- Enter recipient email address
- Write your message content
- Select unlock date and time
- Submit the letter (requires gas fee for blockchain transaction)
- Access your dashboard to view letter statistics
- Navigate to the Time Travel page to see individual letters
- Letters become available when their unlock time is reached
- Click "Reveal Letter" to decrypt and view content
LetterCreated(uint256 indexed letterId, address indexed owner, string ipfsHash, uint256 releaseTime)LetterClaimed(uint256 indexed letterId, address indexed owner, uint256 releasedTime)PlatformFeeUpdated(uint256 indexed newFeeBps)TreasuryUpdated(address indexed newTreasury)
useFutureBaseContract(): Contract interaction functionsuseIPFS(): IPFS upload and retrieval operationsuseEncryption(): Message encryption and decryption utilities
- Encryption: AES-GCM with 256-bit keys derived from wallet addresses
- Access Control: Smart contract enforces ownership and timing restrictions
- Input Validation: Comprehensive validation of user inputs and contract parameters
- Reentrancy Protection: OpenZeppelin guards prevent reentrancy attacks
- Immutability: Blockchain ensures letter metadata cannot be altered
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes and ensure tests pass
- Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/your-feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Email: hello@futurebase.com
- Twitter: @futurebase
- Discord: FutureBase Community
- Mobile application development
- Multi-chain support expansion
- Advanced encryption options
- Social features for shared time capsules
- Integration with additional decentralized storage solutions