A high-performance payment processing backend built with Supabase Edge Functions, supporting dual authentication providers and automated order management.
# Install dependencies
npm install -g supabase
# Setup environment
cp example.env .env.local
# Start local development
npx supabase start
npx supabase functions serve --env-file .env.local- System Architecture - Tech stack, project structure, and core functions
- Merchant Status & PIN System - Authentication, merchant management, and security
- Order System - Order lifecycle, status management, and expiration
- Performance & Caching - Currency caching, monitoring, and optimization
- Development Guide - Coding patterns, testing, and best practices
- Deployment Guide - Production setup and deployment instructions
- Dual Authentication: Dynamic + Privy wallet authentication
- Payment Processing: Daimo Pay integration with webhooks
- Order Management: Automatic expiration and status tracking
- Currency Conversion: High-performance caching system
- Real-time Notifications: Pusher integration
- Security: PIN code system with merchant status management
- Database: PostgreSQL (Supabase)
- Compute: Supabase Edge Functions (Deno + TypeScript)
- Authentication: Dynamic + Privy
- Payments: Daimo Pay
- Notifications: Pusher
- Framework: Hono (for deposits)
├── docs/ # Documentation
├── supabase/
│ ├── _shared/ # Shared utilities
│ ├── functions/ # Edge Functions
│ └── migrations/ # Database migrations
└── example.env # Environment template
See Deployment Guide for complete environment setup.
Required variables:
SUPABASE_URL&SUPABASE_SERVICE_ROLE_KEYDYNAMIC_ENV_ID&PRIVY_APP_ID&PRIVY_APP_SECRETDAIMO_*variables for payment processingPUSHER_*variables for notifications
# Deploy to production
npx supabase link --project-ref <project-ref>
npx supabase db push --include-seed
npx supabase functions deploy- Merchant Status:
ACTIVE|INACTIVE|PIN_BLOCKED - Order Status:
PENDING|PROCESSING|COMPLETED|FAILED|DISCREPANCY - Order Expiration: 5 minutes automatic cleanup
- Currency Caching: 5-minute TTL with LRU eviction
- Follow the Development Guide
- Use
deno fmtanddeno lintfor code quality - Test functions locally before deployment
- Update documentation for new features
See LICENSE file for details.