A professional payment platform built on the Flow blockchain, enabling businesses to accept crypto payments with ease.
- Flow Blockchain Integration - Accept USDC.e and FLOW token payments
- Payment Links - Create shareable payment links for products/services
- Real-time Dashboard - Track payments, analytics, and revenue
- Mobile Responsive - Works seamlessly on all devices
- User Authentication - Flow wallet integration with email registration
- Password Security - Secure email sign-in with bcrypt password hashing
- Notification System - Real-time payment confirmations
- Settings Management - API keys, webhooks, and preferences
- Frontend: Next.js 15, TypeScript, Tailwind CSS
- Blockchain: Flow Client Library (FCL)
- Backend: Supabase (PostgreSQL, Auth, Storage)
- Payments: Flow blockchain, Transak integration
- Email: Resend API
- Security: bcryptjs password hashing, CSRF protection
- Deployment: Vercel-ready
flowpay/
├── app/ # Next.js App Router
│ ├── api/ # API Routes
│ │ ├── admin/ # Admin authentication & management
│ │ ├── auth/ # User authentication
│ │ ├── payment-links/ # Payment link management
│ │ ├── payments/ # Payment processing
│ │ ├── settings/ # Settings management
│ │ └── transak/ # Transak integration
│ ├── dashboard/ # Dashboard pages
│ │ ├── analytics/ # Analytics dashboard
│ │ ├── create/ # Create payment links
│ │ ├── customers/ # Customer management
│ │ ├── links/ # Payment links list
│ │ ├── payments/ # Payments list
│ │ └── settings/ # User settings
│ ├── checkout/ # Checkout pages
│ ├── debug/ # Debug pages
│ ├── pay/ # Payment pages
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Landing page
├── components/ # React Components
│ ├── auth/ # Authentication components
│ ├── checkout/ # Checkout components
│ ├── dashboard/ # Dashboard components
│ ├── debug/ # Debug components
│ ├── onboarding/ # Onboarding components
│ ├── providers/ # Context providers
│ ├── shared/ # Shared components
│ └── ui/ # UI components
├── lib/ # Utility libraries
│ ├── hooks/ # Custom React hooks
│ ├── flow-account-service.ts # Flow account management
│ ├── flow-config-official.ts # Flow blockchain configuration
│ ├── flow-transactions.ts # Flow transaction utilities
│ ├── network-status.ts # Network status checking
│ ├── rate-limit.ts # Rate limiting
│ ├── real-settings-service.ts # Settings management
│ ├── resend.ts # Email service
│ ├── simple-user-service.ts # User management
│ ├── supabase.ts # Database client
│ ├── transak.ts # Transak integration
│ ├── utils.ts # Utility functions
│ ├── validation.ts # Input validation
│ └── webhook-delivery.ts # Webhook management
├── scripts/ # Utility scripts
│ ├── check-schema.js # Database schema checker
│ ├── security-check.js # Security audit script
│ ├── setup-database.sql # Database setup
│ ├── setup-supabase.js # Supabase setup
│ └── test-database.js # Database testing
├── public/ # Static assets
│ └── logo.svg # App logo
├── docs/ # Documentation
│ ├── README.md # Main documentation
│ ├── SECURITY_GUIDE.md # Security best practices
│ ├── SUPABASE_PRODUCTION_SETUP.md # Database setup
│ ├── WEBHOOK_SETUP_GUIDE.md # Webhook configuration
│ ├── ADMIN_SECURITY_SETUP.md # Admin setup
│ └── PRODUCTION_READY.md # Production deployment
├── .env.template # Environment variables template
├── .gitignore # Git ignore rules
├── next.config.js # Next.js configuration
├── package.json # Dependencies
├── tailwind.config.js # Tailwind CSS config
└── tsconfig.json # TypeScript config
└── README.md # This file
-
Clone the repository
git clone https://github.com/omoke1/Flowpay.git cd flowpay -
Install dependencies
npm install
-
Set up environment variables
cp env.template .env.local
Configure your
.env.localwith the required values:# Database (Required) NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key # Flow Blockchain (Required) NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id # Email (Optional) RESEND_API_KEY=your_resend_api_key NEXT_PUBLIC_FROM_EMAIL=noreply@useflopay.xyz # App (Required) NEXT_PUBLIC_APP_URL=http://localhost:3000
-
Set up database
- Create a Supabase project
- Run the SQL migration:
supabase-setup.sql - Configure Row Level Security (RLS)
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Connect Wallet - Use Magic.link email wallet or external wallet
- Create Payment Link - Set amount, description, and payment methods
- Share Link - Send to customers for payments
- Track Payments - Monitor in real-time dashboard
- Manage Settings - Configure API keys and preferences
POST /api/payment-links- Create payment linkGET /api/payment-links- List payment linksPATCH /api/payment-links/[id]- Update payment linkDELETE /api/payment-links/[id]- Delete payment linkPOST /api/payments- Record paymentGET /api/payments- List paymentsPOST /api/transak/create-order- Create Transak orderPOST /api/transak/webhook- Handle Transak webhooks
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main
- Netlify: Build command:
npm run build - Railway: Connect GitHub repo and set env vars
- Render: Connect GitHub repo and set env vars
- Password Security: bcryptjs hashing with 12 salt rounds
- Database Security: Row Level Security (RLS) enabled on all tables
- API Protection: Rate limiting and input validation
- Transaction Verification: On-chain transaction verification
- CSRF Protection: Same-origin policy and security headers
- XSS Protection: DOMPurify sanitization for all inputs
- Webhook Security: Payload validation and origin checking
See SECURITY.md for detailed security documentation.
MIT License - see LICENSE file for details
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For support, email support@useflopay.xyz or create an issue on GitHub.
Built with ❤️ for the Flow ecosystem