A modern, privacy-focused payment card issuance platform built on Solana blockchain. Issue instant virtual cards, receive SOL payments, and manage digital payments with complete privacy.
PrivatePay is a web application that allows users to:
- Issue instant virtual cards in under 2 minutes
- Make payments with Solana for card activation
- Complete privacy - no KYC required
- Global acceptance - cards work anywhere Visa/Mastercard accepted
- Real-time QR code payments - pay via Solana wallet
Built for hackathons showcasing blockchain payment integration, privacy preservation, and modern fintech infrastructure.
- Instant Card Issuance: Create virtual cards in seconds without paperwork
- Solana Integration: Direct SOL payments with real-time exchange rates
- Privacy First: No KYC verification required, non-custodial architecture
- QR Code Payments: Scan and pay directly from Solana wallets
- Responsive Design: Mobile-optimized UI with smooth animations
- Real-time Status: Live order tracking and payment confirmation
- Global Coverage: Support for 180+ countries
- Next.js 16 - React framework with App Router
- React 19.2 - Latest React with concurrent features
- TypeScript - Type-safe development
- Tailwind CSS v4 - Utility-first CSS
- Shadcn/ui - High-quality UI components
- Recharts - Data visualization
- Lucide React - Beautiful icons
- Next.js API Routes - Serverless backend
- Supabase - PostgreSQL database + Auth
- Solana Web3.js - Blockchain interactions
- Starpay API - Card issuance & payment processing
- Vercel - Deployment & hosting
- Helius - Solana RPC provider
Before running the project, you'll need:
- Node.js 18+ and npm/yarn
- Starpay API Key - Sign up at Starpay
- Supabase Account - Create at Supabase
- Helius API Key - Create at Helius
- Solana Wallet - For master wallet setup (private key)
git clone <repository-url>
cd privatepaynpm install
# or
yarn installCreate a .env.local file in the root directory:
# Supabase (Public - safe for client)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Starpay API (Server-only)
STARPAY_API_KEY=your_starpay_api_key
# Master Wallet (Server-only - KEEP SECRET)
MASTER_WALLET_PRIVATE_KEY=your_base64_encoded_private_key
MASTER_WALLET_ADDRESS=your_master_wallet_address
# Helius RPC (Server-only)
HELIUS_API_KEY=your_helius_api_key
# Supabase (Server-only)
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_keynpm run dev
# or
yarn devOpen http://localhost:3000 in your browser.
npm run build
npm start
# or
yarn build
yarn startβββ app/
β βββ api/ # API endpoints
β β βββ starpay/ # Card & payment APIs
β β β βββ create-order/ # Create Starpay order
β β β βββ check-order-status/ # Check order status
β β β βββ me/ # Get account info
β β βββ price/
β β βββ sol/ # Get SOL/USD price
β βββ components/ # React components
β β βββ card-purchase.tsx # Card purchase flow
β βββ context/ # React context
β βββ page.tsx # Main landing page
β βββ layout.tsx # Root layout
β βββ globals.css # Global styles & theme
βββ lib/ # Utilities & helpers
β βββ starpay-client.ts # Starpay API client
β βββ solana-verify.ts # Solana verification
β βββ utils.ts # Helper functions
βββ scripts/ # Database setup
βββ public/ # Static assets
βββ package.json # Dependencies
POST /api/starpay/create-order- Create payment orderPOST /api/starpay/check-order-status- Check order statusPOST /api/starpay/me- Get account information
GET /api/price/sol- Get current SOL/USD price
- Primary:
#7c3aed(Violet/Purple) - Secondary:
#6366f1(Indigo) - Accent:
#fbbf24(Amber) - Background:
#0f0f0f(Near Black) - Surface:
#1a1a1a(Dark Gray)
- Font: Geist (primary), Geist Mono (code)
- Headings: Bold, 24px-64px
- Body: Regular, 14px-16px
- Line Height: 1.5-1.6
- Private Keys: Never exposed to client, server-only
- API Keys: Environment variables, not in code
- HTTPS Only: Enforced in production
- Input Validation: Zod schema validation
- SQL Injection Prevention: Parameterized queries via Supabase
- CORS: Configured for allowed origins
# Install Vercel CLI
npm i -g vercel
# Deploy
vercelSet environment variables in Vercel dashboard:
- Go to Settings β Environment Variables
- Add all variables from
.env.local
The application is fully responsive and works on:
- Desktop browsers (Chrome, Firefox, Safari, Edge)
- Tablets (iPad, Android tablets)
- Mobile devices (iOS Safari, Chrome Mobile)
- Valid Range: $5 - $10,000
- Issuance Speed: < 2 minutes
- Currency: USD
- Network: Visa & Mastercard
- Regions: 180+ countries
- Fee: 2.5% (Starpay markup)
- User selects card amount ($5-$10,000)
- System creates Starpay order
- User receives QR code with SOL address
- User scans with Solana wallet and sends payment
- System confirms payment via Starpay
- Card details displayed to user
- Card ready for use within 2 minutes
Check browser console for debug logs:
[v0] Order status poll result: {...}
[v0] Expected SOL: 0.021333
[v0] Payment received: pending- Lighthouse Score: 90+
- Core Web Vitals: All green
- Build time: < 30s
- API response: < 200ms
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push branch:
git push origin feature/amazing-feature - Open a Pull Request
MIT License - feel free to use this for your hackathon!
For issues or questions:
- Check the documentation
- Review API error messages in console
- Verify environment variables are set correctly
- Check Starpay & Supabase dashboard for API limits
- Multiple card designs
- Card spending limits
- Transaction history
- Wallet connectivity improvements
- Mobile app (Flutter)
- Admin dashboard
- Analytics & reporting
Built with β€οΈ for hackathons.