Store Your Memories Forever with AI-Powered Intelligence
Live Demo: vault.coinsspor.com
- Overview
- The Problem We Solve
- Key Features
- Technology Stack
- Architecture
- Filecoin Integration
- AI-Powered Tagging
- Setup Instructions
- Project Structure
- Development Journey
- Roadmap
- Contributing
- License
MemoryVault AI is a decentralized photo storage platform that combines the permanence of Filecoin blockchain storage with the intelligence of AI-powered semantic search.
Your precious memories deserve more than temporary cloud subscriptionsβthey deserve forever.
- π Permanent Storage: Pay once, store forever on Filecoin
- π€ AI Intelligence: Automatic image tagging with OpenAI Vision
- π Semantic Search: Find photos by content, not just filename
- π° Cost Effective: No recurring subscriptions
- π Truly Decentralized: Your data, your control
- β‘ Fast Retrieval: IPFS + Filecoin gateway integration
β Subscription Fatigue: Monthly fees that never end
β Vendor Lock-in: Your memories trapped in one platform
β Manual Organization: Hours spent tagging and categorizing
β Search Limitations: Can only find what you manually labeled
β No Permanence Guarantee: Services can shut down or change terms
β
One-Time Payment: Pay once for permanent Filecoin storage
β
Blockchain Permanence: Cryptographically guaranteed durability
β
AI Auto-Tagging: Intelligent content recognition
β
Natural Search: "sunset beach" or "birthday cake" - just search naturally
β
True Ownership: You control your data via wallet address
- Wallet-Based Authentication: Secure login via MetaMask
- One-Click Upload: Drag-and-drop photo upload to Filecoin
- AI Auto-Tagging: OpenAI Vision API analyzes images and generates tags
- Semantic Search: Tag-based filtering and filename search
- Gallery View: Beautiful grid layout with hover previews
- Direct Download: Retrieve photos directly from Filecoin/IPFS
- Balance Tracking: Real-time FIL and USDFC balance display
- Responsive Design: Works on desktop, tablet, and mobile
- Progress Tracking: Real-time upload progress with status updates
- Hover Effects: Interactive gallery with smooth animations
- Dark Mode: Beautiful gradient UI optimized for viewing photos
- Next.js 14: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first styling
- RainbowKit: Wallet connection UI
- Wagmi: Ethereum wallet hooks
- Filecoin Calibration Testnet: Decentralized storage network
- Lighthouse.storage: IPFS + Filecoin gateway (production)
- Synapse SDK: Filecoin Onchain Cloud (attempted, see notes below)
- IPFS: Content-addressed storage
- OpenAI Vision API (gpt-4o-mini): Image analysis and tagging
- Supabase: Metadata storage and indexing
- PostgreSQL: Relational database
- Ethers.js v6: Ethereum interactions
- Vercel: Deployment platform
- Git: Version control
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User Interface β
β (Next.js + React + Tailwind) β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
βββββββββββββ΄ββββββββββββ
β β
ββββββΌββββββ ββββββΌβββββββ
β Wallet β β AI β
β (MetaMask)β β (OpenAI) β
ββββββ¬ββββββ ββββββ¬βββββββ
β β
β βΌ
β βββββββββββββββββββ
β β Auto-Tagging β
β β (Fallback) β
β βββββββββββ¬ββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββββ
β Lighthouse.storage β
β (IPFS + Filecoin Integration) β
ββββββββββββββ¬βββββββββββββββββββββ
β
βββββββββ΄βββββββββ
β β
ββββββΌββββββ ββββββΌβββββββ
β IPFS β β Filecoin β
β (Fast) β β(Permanent)β
ββββββββββββ βββββββββββββ
β β
ββββββββββ¬ββββββββ
β
βββββββββΌβββββββββ
β Supabase β
β (Metadata) β
ββββββββββββββββββ
We use Lighthouse.storage as our primary Filecoin storage solution:
Why Lighthouse?
- β Production-Ready: Stable, reliable API
- β Filecoin-Backed: Automatically creates Filecoin storage deals
- β IPFS Gateway: Fast retrieval via dedicated gateways
- β Simple Integration: API key authentication
- β Officially Supported: Listed in Filecoin documentation
How It Works:
- User uploads photo via web interface
- File sent to Lighthouse API
- Lighthouse stores on IPFS (immediate availability)
- Lighthouse creates Filecoin deals (permanent storage)
- Returns CID for future retrieval
Code Example:
import lighthouse from '@lighthouse-web3/sdk'
const output = await lighthouse.upload([file], apiKey)
const cid = output.data.Hash // IPFS CID
// Retrieve from IPFS gateway
const url = `https://gateway.lighthouse.storage/ipfs/${cid}`We also explored Filecoin Onchain Cloud (Synapse SDK) for deeper integration:
Implementation Status:
- β Payment setup completed (deposit + approveService)
- β Storage service creation successful
- β Upload fails with Exit Code 33 (contract revert)
Issue Details:
- Problem: Calibration testnet contract instability
- Error:
Exit Code 33 - Contract revert during upload() - Reported: Filed issue in #fil-builders Slack channel
- Verified: Other builders experiencing same issue
- Context: Recent FWSS contract upgrade may be related
Code Implemented (Ready for Mainnet):
// Payment setup
await synapse.payments.deposit(depositAmount, TOKENS.USDFC)
await synapse.payments.approveService(PANDORA_SERVICE, rate, lockup)
// Storage creation
const storage = await synapse.createStorage()
// Upload (currently fails on testnet)
await storage.upload(bytes, { callbacks... })Future Plans: Once Synapse SDK testnet stabilizes or mainnet alpha launches, we will:
- Integrate both Lighthouse and Synapse for redundancy
- Add PDP (Proof of Data Possession) verification
- Implement FilCDN for faster retrieval
- Enable USDFC stablecoin payments
Documentation:
- Synapse SDK code:
src/lib/synapse.ts - Attempted integration:
src/hooks/usePayment.ts - Issue logs available in Git history
Intelligent Content Recognition:
MemoryVault uses OpenAI's gpt-4o-mini vision model to automatically analyze uploaded images:
// AI analyzes image content
const tags = await analyzeImage(file)
// Returns: ["sunset", "beach", "ocean", "vacation", "summer"]What Gets Tagged:
- π¨ Objects: People, animals, food, vehicles
- π Colors: Dominant color palettes
- π Mood: Happy, serene, energetic
- π Location Type: Beach, mountain, urban, indoor
- π Activities: Swimming, dining, celebration
The AI tagging code is fully implemented and functional, but currently using fallback mode due to OpenAI API rate limits on the free tier.
Fallback Tags Generated:
- File type (jpeg, png, gif)
- Upload year (2025)
- Generic tags (photo, memory)
Why Fallback?
- OpenAI free tier: 3 requests/minute
- During testing, we exceeded rate limits
- Production deployment will use paid tier with higher limits
Code Location:
- Main AI logic:
src/lib/ai.ts - Integration:
src/hooks/useUpload.ts - Fallback generation:
generateFallbackTags()
Console Output Examples:
When AI Works:
π€ Analyzing image with OpenAI Vision...
β
AI generated tags: ["sushi", "food", "japanese", "salmon", "rice"]
When Fallback Activates:
β οΈ OpenAI API rate limit reached
π·οΈ Generated tags: ["photo", "2025", "jpeg", "memory"]
To test with real OpenAI Vision API:
- Add OpenAI API key with credits to
.env.local - Upload a new photo
- Check browser console for AI analysis
- Tags will appear in Search page
Production Ready:
- β Code tested and working
- β Graceful fallback implemented
- β Ready for deployment with proper API credits
- Node.js 18+
- npm or yarn
- MetaMask wallet
- Filecoin Calibration testnet FIL (from faucet)
git clone https://github.com/yourusername/memoryvault-ai.git
cd memoryvault-ainpm installCreate .env.local:
# Filecoin Calibration Testnet
NEXT_PUBLIC_FILECOIN_RPC=https://api.calibration.node.glif.io/rpc/v1
NEXT_PUBLIC_CHAIN_ID=314159
NEXT_PUBLIC_USDFC_ADDRESS=0xb3042734b608a1B16e9e86B374A3f3e389B4cDf0
# WalletConnect (optional)
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id
# Lighthouse Storage
NEXT_PUBLIC_LIGHTHOUSE_API_KEY=your_lighthouse_api_key
# OpenAI (optional, will use fallback if not provided)
NEXT_PUBLIC_OPENAI_API_KEY=your_openai_key
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyCreate a Supabase table:
CREATE TABLE memories (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
owner_address TEXT NOT NULL,
piece_cid TEXT NOT NULL,
file_name TEXT NOT NULL,
file_type TEXT NOT NULL,
file_size BIGINT NOT NULL,
tags TEXT[] DEFAULT '{}',
description TEXT DEFAULT '',
location TEXT,
mood TEXT,
created_at TIMESTAMP DEFAULT NOW(),
thumbnail_url TEXT
);
CREATE INDEX idx_owner_address ON memories(owner_address);
CREATE INDEX idx_tags ON memories USING GIN(tags);npm run devVisit http://localhost:3000
Filecoin Calibration FIL:
USDFC (if using Synapse SDK):
- Available in Filecoin Calibration testnet
memoryvault-ai/
βββ src/
β βββ app/
β β βββ page.tsx # Landing page
β β βββ upload/
β β β βββ page.tsx # Upload interface
β β βββ gallery/
β β β βββ page.tsx # Photo gallery
β β βββ search/
β β β βββ page.tsx # Semantic search
β β βββ layout.tsx # Root layout
β β βββ providers.tsx # Web3 providers
β β βββ globals.css # Global styles
β βββ components/
β β βββ Navbar.tsx # Navigation component
β βββ hooks/
β β βββ useUpload.ts # Upload logic + AI
β β βββ useBalance.ts # Wallet balance
β β βββ usePayment.ts # Synapse payments
β βββ lib/
β β βββ ai.ts # OpenAI Vision integration
β β βββ synapse.ts # Synapse SDK (testnet attempt)
β β βββ supabase.ts # Database client
β β βββ chains.ts # Filecoin network config
β βββ types/
βββ public/ # Static assets
βββ .env.local # Environment variables (not in repo)
βββ .gitignore # Git ignore rules
βββ package.json # Dependencies
βββ tsconfig.json # TypeScript config
βββ tailwind.config.ts # Tailwind config
βββ README.md # This file
Wave 1: Design & Planning
- β Problem identification
- β Architecture design
- β Technology selection
- β Filecoin research
Wave 2: Implementation
Initial Approach: Synapse SDK
- Implemented full payment flow
- Created storage services
- Blocker: Calibration testnet contract instability
- Decision: Pivot to production-ready alternative
Pivot: Lighthouse.storage
- Rapid integration (30 minutes)
- Stable and working immediately
- Filecoin-backed storage maintained
- Result: Working demo achieved
AI Integration
- OpenAI Vision API implementation
- Intelligent fallback system
- Tested with multiple image types
- Status: Code ready, rate limits encountered
UI/UX Polish
- Responsive gallery layout
- Real-time upload progress
- Tag-based search filtering
- Professional dark theme
| Challenge | Solution | Learning |
|---|---|---|
| Synapse SDK testnet errors | Pivot to Lighthouse | Have production-ready backup plans |
| OpenAI rate limits | Intelligent fallback system | Always design for graceful degradation |
| USDFC balance display | ERC20 contract integration | Deep understanding of token standards |
| Image layout consistency | CSS aspect-ratio + flexbox | Modern CSS solves complex layouts |
- β Reported Synapse SDK testnet issue in #fil-builders
- β Documented error logs for team reference
- β Provided feedback on Filecoin Onchain Cloud
- β Transparent development process
- Wallet authentication
- Filecoin storage integration (Lighthouse)
- AI-powered tagging
- Gallery view
- Search functionality
- Balance tracking
- Integrate Synapse SDK (when mainnet stable)
- PDP verification display
- FilCDN fast retrieval
- Video file support
- Batch upload
- Album organization
- Natural language search ("photos from last summer")
- Face recognition (privacy-first)
- Shared galleries (with access control)
- Mobile app (React Native)
- Photo editing tools
- Print service integration
- Multi-chain support
- NFT minting from stored photos
- Social features (comments, likes)
- Marketplace for prints
- Partner integrations
- Enterprise storage plans
We welcome contributions! This project is open source.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Add comments for complex logic
- Test on Filecoin Calibration testnet
- Update README for new features
- Maintain responsive design
- π Bug fixes
- π¨ UI/UX improvements
- π Documentation
- π§ͺ Testing
- π Internationalization
- βΏ Accessibility features
MIT License - see LICENSE file for details
- Filecoin Foundation - For decentralized storage infrastructure
- Lighthouse.storage - For production-ready Filecoin integration
- OpenAI - For Vision API and image analysis
- RainbowKit - For beautiful wallet connection UI
- Supabase - For reliable database infrastructure
Built as part of the Filecoin Onchain Cloud WaveHack hackathon.
Special thanks to:
- Filecoin developer community
- #fil-builders Slack channel
- WaveHack mentors and judges
-
Live Demo: vault.coinsspor.com
-
Developer: Coinsspor
-
Built for: Filecoin
- Visit vault.coinsspor.com
- Connect your MetaMask wallet (Filecoin Calibration testnet)
- Upload a cherished photo
- Watch AI automatically tag it
- Search and rediscover your memories
Your memories deserve permanence. Store them on Filecoin forever. π
Made with β€οΈ for the decentralized future