A multi-chain cryptocurrency checkout platform that enables simple link-based transfers and embeddable merchant widgets across multiple blockchain networks.
Watch the platform in action: https://www.loom.com/share/133fea097d354ea6ae44d82c86f5bdb8?sid=33a8f195-685e-4dd9-a39c-ba4a80c879df
Polychain is a comprehensive cryptocurrency payment platform that simplifies cross-chain transactions and provides merchants with easy-to-integrate payment solutions. The platform supports multiple blockchain networks including Ethereum, Solana, Polygon, Bitcoin, and DeSo, enabling users (consumers and merchants both) to send and receive payments through simple, shareable links.
- Ethereum (ETH): Full support for Ethereum mainnet transactions
- Solana (SOL): Native Solana blockchain integration
- Polygon (MATIC): Layer 2
- Bitcoin (BTC): QR code-based Bitcoin payments
- DeSo: Social blockchain integration
- Link-Based Payments: Generate your custom crypto home page, which you can share with others (as opposed to long addresses), who can then use that to send crypto to you.
- Embeddable Widgets: Merchant integration tools for websites and applications
- NFT Showcase: Display and manage NFT collections
- Wallet Integration: Support for MetaMask, WalletConnect, and Phantom wallets
- Real-time Exchange Rates: Live cryptocurrency price feeds via Coinbase API
- User Profiles: Customizable user profiles with bio and profile pictures
- Merkle Tree Distribution: Efficient token distribution system
- Promo Code System: Built-in promotional code functionality
- JWT Authentication: Secure user authentication and session management
- Responsive Design: Mobile-first, responsive user interface
- Real-time Notifications: Toast notifications for transaction status
- Framework: Next.js 12 with React 17
- Styling: Tailwind CSS with custom components
- State Management: React Context API
- Wallet Integration: Web3Modal, WalletConnect, MetaMask
- UI Components: Headless UI, Heroicons
- Runtime: Node.js with TypeScript
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT with cookie-based sessions
- Blockchain Integration: Ethers.js, Solana Web3.js
- API Integration: Coinbase API for exchange rates
- ERC-20 Token: Standard Ethereum token implementation
- Merkle Distributor: Gas-efficient token distribution contract
- OpenZeppelin: Security-audited contract libraries
- Cloud Platform: AWS with EC2 Auto Scaling
- Containerization: Docker for consistent deployments
- CI/CD: Automated deployment pipelines
- Monitoring: Prometheus and Grafana for system monitoring
- CDN: CloudFront for global content delivery
Polychain/
├── frontend/ # Next.js React application
│ ├── pages/ # Application routes and components
│ ├── lib/ # Utility functions and blockchain integrations
│ └── public/ # Static assets and contract ABIs
├── backend/ # Node.js Express API server
│ ├── src/ # TypeScript source code
│ ├── models/ # MongoDB data models
│ └── utils/ # Server-side utilities
├── erc20/ # Smart contract implementations
│ └── contracts/ # Solidity smart contracts
└── embed/ # Embeddable widget system
└── src/ # Widget JavaScript bundle
- Node.js 18.0.0 or higher
- MongoDB database
- Ethereum wallet (Phantom recommended)
- Solana wallet (Phantom recommended)
-
Clone the repository
git clone https://github.com/yourusername/polychain.git cd polychain -
Install frontend dependencies
cd frontend npm install -
Install backend dependencies
cd ../backend npm install -
Install smart contract dependencies
cd ../erc20 npm install -
Install embed widget dependencies
cd ../embed npm install
-
Backend Environment Variables Create a
.envfile in the backend directory:MONGODB_URI=your_mongodb_connection_string COOKIE_SECRET=your_jwt_secret NODE_ENV=development JWT_SECRET=123123 TWITTER_ACCESS_TOKEN=your_twitter_api_token ETHERSCAN_API_KEY=your_etherscan_api_key POLYGONSCAN_API_KEY=your_polygonscan_api_key
-
Frontend Environment Variables Create a
.envfile in the frontend directory:NEXT_PUBLIC_BACKEND_URL=http://localhost:3001 NEXT_PUBLIC_NFTPORT_API_KEY=your_nftport_api_key_here
-
Start the backend server
cd backend npm run start -
Start the frontend development server
cd frontend npm run dev -
Build the embed widget
cd embed npm run build
The application will be available at http://localhost:3000 and the API at http://localhost:3001.
- JWT-based authentication with secure cookie storage
- Input validation and sanitization
- Rate limiting on API endpoints
- Secure wallet integration with signature verification
- Smart contract security audits
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the GitHub repository
- Contact the development team
- Check the documentation wiki
Built with ❤️ by the Spindl team