Turn any online purchase email into a beautiful, cryptographically verified NFT in seconds — impossible to fake.
Powered by vlayer ZK technology, Receipilot transforms ordinary receipts into verified digital assets on the Base blockchain.
The MVP is just the door. The real product is enterprise partnerships.
- We solve real pain for e-commerce: receipt forgery and warranty claim disputes
- Users can earn real money when product prices rise or items become discontinued
- Freemium model: 2 free mints/week, then premium ($9/mo or $79/yr)
- Coming soon as a smart mobile app
- ✅ Dynamic SVG NFTs with auto logo, order ID, date, category icons
- ✅ Three upload methods: .eml file, paste text, or forward to
prove@receipilot.xyz - ✅ ZK Email verification using vlayer's DKIM + regex proofs
- ✅ Freemium model: 2 free mints per week per wallet (on-chain tracked)
- ✅ Gas-free minting via Base paymaster (sponsored transactions)
- ✅ Full-text search by order ID, product, date, store
- ✅ Beautiful proof animation matching vlayer demo quality
- ✅ Demo mode with simulated flow
- ✅ Privacy-first: Emails deleted within 5 seconds, only proof hash on-chain
- ✅ Sanity CMS for managing partners and FAQ content
- ✅ Dark/light theme with glassmorphism design
- Frontend: Next.js 15, TypeScript, Tailwind CSS, shadcn/ui, Framer Motion
- Wallet: wagmi, viem, RainbowKit
- Blockchain: Base mainnet + Sepolia testnet
- Smart Contracts: Solidity 0.8.28, Foundry
- Verification: @vlayer/sdk (ZK Email + Web Proofs)
- Database: Supabase
- Storage: IPFS/Web3.Storage
- CMS: Sanity.io
- Email: Resend API
Before you begin, ensure you have:
- Node.js 18.x or higher
- pnpm or npm or yarn
- Foundry (for smart contracts)
- Git
git clone https://github.com/yourusername/receipilot.git
cd receipilotnpm install
# or
pnpm install
# or
yarn installcurl -L https://foundry.paradigm.xyz | bash
foundryupcd contracts
forge install OpenZeppelin/openzeppelin-contracts
cd ..Copy the example environment file:
cp .env.example .envFill in the following variables in .env:
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id
NEXT_PUBLIC_BASE_RPC_URL=https://mainnet.base.org
NEXT_PUBLIC_SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR_INFURA_KEY
# After deployment
NEXT_PUBLIC_CONTRACT_ADDRESS_BASE=0x...
NEXT_PUBLIC_CONTRACT_ADDRESS_SEPOLIA=0x...
NEXT_PUBLIC_PAYMASTER_ADDRESS_BASE=0x...
NEXT_PUBLIC_PAYMASTER_ADDRESS_SEPOLIA=0x...
# For deployment only (NEVER commit these)
PRIVATE_KEY_DEPLOYER=your_deployer_private_key
PRIVATE_KEY_SPONSOR=your_sponsor_wallet_private_keyWhere to get:
- WalletConnect Project ID: WalletConnect Cloud
- Infura API Key: Infura
NEXT_PUBLIC_VLAYER_API_KEY=your_vlayer_api_key
VLAYER_PROVER_URL=https://prover.vlayer.xyzWhere to get:
- vlayer API Key: vlayer.xyz
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_keySetup Supabase:
- Create a new project at Supabase
- Go to Project Settings > API to get your keys
- Create the
receiptstable:
CREATE TABLE receipts (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
wallet_address TEXT NOT NULL,
proof_hash TEXT NOT NULL UNIQUE,
order_id TEXT NOT NULL,
store_name TEXT NOT NULL,
product_name TEXT NOT NULL,
purchase_date DATE NOT NULL,
category TEXT NOT NULL CHECK (category IN ('physical', 'digital', 'virtual')),
ipfs_url TEXT NOT NULL,
token_id TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE INDEX idx_wallet_address ON receipts(wallet_address);
CREATE INDEX idx_order_id ON receipts(order_id);
CREATE INDEX idx_created_at ON receipts(created_at);WEB3_STORAGE_TOKEN=your_web3_storage_tokenWhere to get:
- Web3.Storage Token: web3.storage
RESEND_API_KEY=your_resend_api_key
NEXT_PUBLIC_FORWARD_EMAIL=prove@receipilot.xyzSetup Email Forwarding:
- Sign up at Resend
- Verify your domain (or use Resend's testing domain for development)
- Create an API key
- Set up email forwarding to your API endpoint:
- Endpoint:
https://your-domain.com/api/forward-email - Method: POST
- Endpoint:
NEXT_PUBLIC_SANITY_PROJECT_ID=mbgeq55v
NEXT_PUBLIC_SANITY_DATASET=production
NEXT_PUBLIC_SANITY_API_VERSION=2024-03-11
SANITY_API_TOKEN=your_sanity_api_tokenSetup Sanity CMS:
- The project is already configured to use Organization ID:
oVb58dKGZand Project ID:mbgeq55v - Install Sanity CLI globally:
npm install -g @sanity/cli
- Login to Sanity:
sanity login
- Initialize the studio:
npm run sanity:dev
- Open Studio at
http://localhost:3000/studio - Create content:
- Add partners (name, logo, coming soon status)
- Add FAQs (question, answer, category)
Get API Token:
- Go to Sanity Manage
- Select your project
- Go to API > Tokens
- Create a new token with Editor permissions
cd contracts
# Set environment variables
export PRIVATE_KEY_DEPLOYER="your_deployer_private_key"
export SEPOLIA_RPC_URL="https://sepolia.infura.io/v3/YOUR_KEY"
export BASESCAN_API_KEY="your_basescan_api_key"
# Deploy
forge script script/DeploySepolia.s.sol --rpc-url $SEPOLIA_RPC_URL --broadcast --verify
# Copy the deployed contract address to .envexport BASE_RPC_URL="https://mainnet.base.org"
forge script script/Deploy.s.sol --rpc-url $BASE_RPC_URL --broadcast --verifyThe paymaster wallet needs ETH to sponsor gas fees:
# Send ETH to PRIVATE_KEY_SPONSOR address
# Recommended: 0.1 ETH for testing, 1+ ETH for productioncd contracts
forge testnpm run devIn a separate terminal:
npm run sanity:devOpen http://localhost:3000/studio
npm run build
npm run start- User forwards receipt email to
prove@receipilot.xyz - Resend webhook sends email to
/api/forward-email - Email is parsed and verified with vlayer ZK Email (DKIM signature)
- ZK proof is generated
- Metadata uploaded to IPFS
- Email content is deleted within 5 seconds
- User receives confirmation with mint link
Option A: Using Resend (Recommended)
- Verify your domain in Resend
- Add MX records to your domain DNS
- Create an email route:
- Forward from:
prove@receipilot.xyz - Forward to:
https://your-domain.com/api/forward-email
- Forward from:
Option B: Using Gmail/Other (Development)
- Set up email forwarding to a webhook service like Zapier or Make
- Configure the webhook to POST to your API endpoint
curl -X POST http://localhost:3000/api/forward-email \
-H "Content-Type: application/json" \
-d '{
"from": "orders@amazon.com",
"to": "prove@receipilot.xyz",
"subject": "Your Amazon order #112-8475638",
"text": "Thank you for your order!\n\nOrder ID: AMZ-112-8475638\nProduct: MacBook Pro 16\"\nDate: 2026-03-01\nTotal: $3,499.00"
}'Edit the SVG generation in lib/ipfs.ts:
// lib/ipfs.ts
generateReceiptSVG(data: ReceiptNFTData): string {
// Customize colors, layout, fonts, etc.
}- Go to Sanity Studio:
/studio - Click "Partner" → "Create new"
- Fill in name, upload logo, set order
- Mark as "Coming Soon" if not yet active
- Publish
- Go to Sanity Studio:
/studio - Click "FAQ" → "Create new"
- Add question, answer, category, order
- Publish
- Push your code to GitHub
- Go to Vercel
- Import your repository
- Add all environment variables
- Deploy
The app can be deployed to any platform supporting Next.js 15:
- Netlify
- Railway
- Render
- AWS Amplify
- Self-hosted with Docker
Receipilot/
├── app/ # Next.js 15 App Router
│ ├── api/ # API routes (mint, forward-email)
│ ├── demo/ # Demo page
│ ├── my-receipts/ # User's receipts page
│ ├── privacy/ # Privacy policy
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ └── globals.css # Global styles
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ ├── Hero.tsx # Hero section
│ ├── PartnersCarousel.tsx
│ ├── UploadFlow.tsx
│ ├── ProofAnimation.tsx
│ └── ...
├── lib/ # Utilities
│ ├── vlayer.ts # vlayer SDK integration
│ ├── ipfs.ts # IPFS storage
│ ├── email-parser.ts # Email parsing
│ ├── supabase.ts # Supabase client
│ ├── contracts.ts # Contract hooks
│ └── wagmi-config.ts # Web3 configuration
├── contracts/ # Solidity smart contracts
│ ├── src/
│ │ └── ReceipilotNFT.sol
│ ├── script/ # Deployment scripts
│ ├── test/ # Contract tests
│ └── foundry.toml
├── sanity/ # Sanity CMS
│ ├── schemas/ # Content schemas
│ └── lib/ # Sanity client
└── public/ # Static assets
npm run testcd contracts
forge test -vvvUse the demo page at /demo to test the full flow without real wallet/email.
- Email content is NEVER stored: Processed in memory and deleted within 5 seconds
- Only proof hashes on-chain: No personal data ever touches the blockchain
- Client-side processing: Text paste option processes entirely in browser
- Zero-knowledge proofs: vlayer ensures cryptographic verification without revealing data
- OpenZeppelin contracts for ERC721
- ReentrancyGuard on mint function
- Proof hash uniqueness enforced
- Weekly mint limits tracked on-chain
- Owner-only functions for premium subscriptions
Before mainnet launch, consider:
- Smart contract audit (Trail of Bits, OpenZeppelin, etc.)
- Penetration testing for API endpoints
- Code review for vlayer integration
- 2 mints per week per wallet
- Resets every Sunday at midnight UTC
- Tracked on-chain via
getUserMintCount() - Gas fees sponsored by paymaster
- Unlimited mints
- Batch processing
- Custom NFT designs
- Priority support
- Early access to enterprise features
To upgrade users to premium:
// Call from owner account
receipilotNFT.subscribePremium(userAddress, 30 days);We welcome contributions! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details
"Smart contract not deployed"
- Run deployment scripts for Sepolia or Base
- Update contract addresses in
.env
"Email forwarding not working"
- Check Resend API key and domain verification
- Verify webhook endpoint is publicly accessible
- Check
/api/forward-emaillogs
"Sanity Studio not loading"
- Run
sanity login - Verify project ID matches Organization ID
oVb58dKGZ - Check SANITY_API_TOKEN permissions
"vlayer proof generation failing"
- Verify VLAYER_API_KEY is correct
- Check email has valid DKIM signature
- Ensure prover URL is accessible
"IPFS upload failing"
- Check WEB3_STORAGE_TOKEN is valid
- Verify token has upload permissions
- Try using IPFS gateway for testing
- Email: hello@receipilot.xyz
- Discord: Join our community
- Twitter: @receipilot
- GitHub Issues: github.com/receipilot/receipilot/issues
- ✅ MVP launch
- ✅ Freemium model
- ✅ Base mainnet deployment
- 🔄 Mobile app (iOS/Android)
- 🔄 Batch minting
- 🔄 Custom NFT templates
- 🔄 Stripe integration for premium
- 🔜 Enterprise API
- 🔜 E-commerce integrations (Shopify, WooCommerce)
- 🔜 Warranty claims portal
- 🔜 Secondary market for rare receipts
- 🔜 Cross-chain support (Ethereum, Polygon)
- 🔜 AI-powered receipt categorization
- 🔜 Loyalty rewards program
- 🔜 B2B partnerships with major retailers
- vlayer for powerful ZK technology
- Base for gas-efficient blockchain
- OpenZeppelin for secure contracts
- Vercel for hosting
- Sanity for CMS
Made with ❤️ by the Receipilot team
Turn receipts into wealth. Prove what you own.