A zero-fee marketplace where creators sell digital products instantly using PyUSD stablecoins. No intermediaries, no waiting periods, no geographic restrictionsβjust creators and their audience, connected through borderless payments.
π Repository: https://github.com/0xdevrel/mintflow
graph LR
A[Creator] -->|1. Connect Wallet| B[Create Product]
B -->|2. Upload & Price| C[Publish]
C -->|3. Share Link| D[Buyer Visits]
D -->|4. Connect Wallet| E[Purchase with PyUSD]
E -->|5. Pay| F[Blockchain Verification]
F -->|6. Confirmed| G[Instant Delivery]
G -->|7. PyUSD| A
G -->|8. Download| D
Simple Flow:
- π¨βπ» Creator: Connect Wallet β Create Product β Get Paid Instantly
- π Buyer: Browse β Connect Wallet β Pay with PyUSD β Download
- βοΈ Verification: On-chain verification β Direct payment to creator β Zero fees
- Zero Fees: Keep 100% of your sales
- Instant Settlement: Receive payments directly to your wallet in seconds
- Global Access: Sell to anyone, anywhere
- Secure Payments: Direct PyUSD transfers with no intermediaries
- Beautiful Themes: Customizable sales pages with 3 preset themes
- File Delivery: Secure file downloads with time-limited access
- Frontend: Next.js 14, TypeScript, Tailwind CSS, Shadcn/ui
- Web3: Wagmi v2, Viem, RainbowKit
- Database: Cloudflare D1 (SQLite)
- Storage: Cloudflare R2
- Blockchain: Ethereum Sepolia testnet, PyUSD token
- Deployment: Vercel
src/
βββ app/ # Next.js app router pages
β βββ (auth)/ # Auth-related pages
β βββ (creator)/ # Creator dashboard & product management
β βββ (public)/ # Sales pages
β βββ api/ # API routes
βββ components/ # React components
β βββ ui/ # Shadcn components
β βββ wallet/ # Wallet connection components
β βββ shared/ # Shared components
βββ lib/ # Utilities
β βββ db/ # Database utilities
β βββ blockchain/ # Web3 utilities
β βββ storage/ # R2 file operations
βββ types/ # TypeScript types
- Node.js 18+
- npm or yarn
- Cloudflare account (for D1 and R2)
- WalletConnect project ID
-
Clone the repository
git clone https://github.com/0xdevrel/mintflow.git cd mintflow -
Install dependencies
npm install
-
Set up environment variables
cp env.example .env.local
Fill in your environment variables:
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: Get from WalletConnect CloudCLOUDFLARE_API_TOKEN: Get from Cloudflare DashboardJWT_SECRET: Generate a random secret key
-
Set up Cloudflare D1 and R2
# Login to Cloudflare npx wrangler login # Create D1 database npx wrangler d1 create mintflow_db # Create R2 bucket npx wrangler r2 bucket create mintflow-files # Update wrangler.toml with your database ID
-
Run database migrations
npx wrangler d1 execute mintflow_db --file=src/lib/db/schema.sql
-
Start development server
npm run dev
- D1 Database: Create a new D1 database named
mintflow_db - R2 Bucket: Create a new R2 bucket named
mintflow-files - API Token: Create an API token with D1 and R2 permissions
- Go to WalletConnect Cloud
- Create a new project
- Copy the Project ID to your environment variables
- Connect Wallet: Connect your MetaMask or other wallet
- Create Account: Set up your creator profile with username
- Create Product: Upload files, set pricing, customize theme
- Publish: Make your product live and share the link
- Get Paid: Receive PyUSD directly to your wallet
- Browse Products: Visit creator storefronts
- Connect Wallet: Connect your wallet to purchase
- Buy Product: Pay with PyUSD, get instant access
- Download: Access your purchases in your library
- Wallet Security: Users control their own wallets
- File Security: Files stored in private R2 bucket with signed URLs
- Transaction Verification: All payments verified on-chain
- No Private Keys: Platform never has access to private keys
- Connect to Vercel: Link your GitHub repository
- Set Environment Variables: Add all required environment variables
- Deploy: Vercel will automatically deploy on push
- Connect to Cloudflare Pages: Link your GitHub repository
- Set Build Settings:
- Build command:
npm run build - Build output directory:
.next
- Build command:
- Set Environment Variables: Add all required variables
- Deploy: Cloudflare Pages will build and deploy
- Get Testnet PyUSD: Use the Sepolia testnet faucet
- Test Creator Flow: Create account β Create product β Publish
- Test Buyer Flow: Visit sales page β Purchase β Download
- Verify Transactions: Check transactions on Sepolia Etherscan
- Contract Address:
0xCaC524BcA292aaade2DF8A05cC58F0a65B1B3bB9 - Faucet: Use the official PyUSD testnet faucet
- Network: Ethereum Sepolia testnet
- creators: User profiles and wallet addresses
- products: Digital products with pricing and files
- product_themes: Theme customization settings
- purchases: Transaction records and delivery status
See src/lib/db/schema.sql for complete schema.
POST /api/auth/signup- Create creator accountGET /api/auth/session- Get current user sessionGET /api/auth/username-check- Check username availability
POST /api/products- Create new productGET /api/products/[id]- Get product detailsPUT /api/products/[id]- Update productDELETE /api/products/[id]- Delete product
POST /api/checkout/initiate- Start purchase processPOST /api/purchases/verify- Verify transactionGET /api/downloads/[purchaseId]- Generate download link
- Minimal: Clean white background, generous whitespace
- Bold: Full-width hero, vibrant gradients, large typography
- Professional: Two-column layout, subtle shadows, conservative palette
- Primary accent color
- Font pairing (3 options per theme)
- Header style (image or solid)
- Creator bio visibility
- Social links visibility
- β Basic product creation and sales
- β Wallet integration
- β File upload and delivery
- β Transaction monitoring
- π Advanced analytics
- π Email notifications
- π Mobile app
- π Custom domains
- π Multi-chain support
- π Subscription products
- π Affiliate system
- π API for third-party integrations
We welcome contributions! Here's how to get started:
- Fork the repository: https://github.com/0xdevrel/mintflow
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes
- Add tests if applicable
- Commit your changes:
git commit -m '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.
- Documentation: Check this README and code comments
- Issues: Report bugs or request features
- Discussions: Join the conversation
- Built for ETHGlobal 2025
- Powered by PyUSD on Ethereum Sepolia
- Uses Cloudflare for global edge performance
- Inspired by the creator economy and Web3 payments
Mintflow - Instant Digital Sales, Powered by PyUSD π