Seamless bill payments on VeChainThor with B3TR rewards
VeGate is a modern payment infrastructure built on VeChainThor that enables seamless bill creation and payment with QR codes, minimal transaction fees, and automatic B3TR rewards from VeBetterDAO.
- Bill Creation & Management - Create payment bills with QR codes
- QR Code Payments - Scan and pay instantly via QR codes
- VeChain Integration - Native VeChainThor blockchain support
- B3TR Rewards - Earn 1-2 B3TR tokens per transaction
- Payment History - Track all your transactions
- VET Token Support - Pay with VET tokens
- Minimal Fees - Only
0.02 VET ($0.0002 USD) per transaction - Instant Confirmation - Transactions confirmed in ~10 seconds
- Social Impact Multiplier - 2x rewards for social impact payments
- Automatic Distribution - B3TR rewards credited automatically
- VeBetterDAO Integration - Powered by VeBetterDAO X2Earn
- Reward Tracking - View your total earnings
# Clone the repository
git clone https://github.com/Trojanhorse7/VeGate.git
cd VeGate
# Install dependencies
pnpm install
# Set up environment variables
cp apps/web/.env.example apps/web/.env
cp packages/contract/.env.example packages/contract/.env
cp packages/database/.env.example packages/database/.env
# Run database migrations
cd packages/database
pnpm prisma migrate dev
cd ../..
# Build the SDK
cd packages/sdk
pnpm build
cd ../..
# Start the development server
cd apps/web
pnpm devVisit http://localhost:3000 ๐
VeGate/
โโโ apps/
โ โโโ web/ # Next.js web application
โ โโโ app/ # App router pages
โ โโโ components/ # React components
โ โโโ hooks/ # Custom React hooks
โ โโโ lib/ # Utility functions
โ
โโโ packages/
โ โโโ contract/ # Smart contracts
โ โ โโโ contracts/ # Solidity contracts
โ โ โโโ scripts/ # Deployment scripts
โ โ โโโ deployments/ # Deployment records
โ โ
โ โโโ database/ # Database package
โ โ โโโ prisma/ # Prisma schema & migrations
โ โ
โ โโโ sdk/ # VeGate SDK
โ โโโ src/ # SDK source code
โ
โโโ docs/ # Documentation
โ โโโ ARCHITECTURE.md # System architecture
โ โโโ ...
โ
โโโ ROADMAP.md # Feature roadmap
โโโ PRODUCTION_CHECKLIST.md # Production deployment guide
โโโ README.md # This file
- Framework: Next.js 14 (App Router)
- Language: TypeScript 5.3
- Styling: Tailwind CSS + shadcn/ui
- State: React Hooks + React Query
- Network: VeChainThor (Testnet)
- Wallet: VeWorld via @vechain/dapp-kit-react
- Library: Connex 2.x
- Contracts: Solidity 0.8.20
- Database: PostgreSQL (Supabase)
- ORM: Prisma
- API: Next.js API Routes
- Monorepo: pnpm workspaces + Turbo
- Package Manager: pnpm 8+
- Linting: ESLint + Prettier
- Architecture - System design and architecture
- Roadmap - Feature roadmap and future plans
- Production Checklist - Deployment guide
- SDK Documentation - SDK usage guide
- Connect your VeWorld wallet
- Navigate to "Create Bill"
- Enter amount, category, and description
- Toggle "Social Impact" for 2x rewards
- Submit and get your shareable QR code
- Scan the QR code or visit the payment link
- Connect your VeWorld wallet
- Review the bill details and B3TR reward
- Click "Pay" and confirm in VeWorld
- Transaction confirmed + B3TR rewards credited! ๐
- Navigate to "Dashboard" โ "History"
- View all your payments and rewards
- Export transaction history
- VeChainThor's efficient blockchain enables extremely low fees
- Average cost:
0.02 VET ($0.0002 USD) per transaction - Predictable costs for users
- 1 B3TR per normal payment
- 2 B3TR for social impact payments
- Automatically credited via VeBetterDAO X2Earn
- Track earnings in dashboard
- Instant QR code creation
- Shareable payment links
- Works on any device
- No app installation required
- VeGate Contract - Handles bill creation and payments
- Secure & Audited - Built with OpenZeppelin standards
- Event Emission - Track all transactions on-chain
# Root directory
pnpm install # Install all dependencies
pnpm build # Build all packages
pnpm dev # Start dev server
pnpm clean # Clean all build artifacts
# Web app (apps/web)
pnpm dev # Start Next.js dev server
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLint
# SDK (packages/sdk)
pnpm build # Build SDK
pnpm dev # Watch mode
# Contracts (packages/contract)
pnpm compile # Compile contracts
pnpm deploy # Deploy to testnet
pnpm test # Run tests
# Database (packages/database)
pnpm prisma migrate dev # Run migrations
pnpm prisma studio # Open Prisma StudioSee each package's .env.example for required variables:
apps/web/.env- Web app configurationpackages/contract/.env- Contract deploymentpackages/database/.env- Database connection
- Push code to GitHub
- Import repository in Vercel
- Configure environment variables
- Deploy!
cd packages/contract
# Update hardhat.config.ts with mainnet settings
# Add VECHAIN_MAINNET_MNEMONIC to .env
pnpm run deploy:mainnet
# Update contract addresses in packages/sdk/src/vechain/contracts.tsSee PRODUCTION_CHECKLIST.md for detailed deployment instructions.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- WanBridge cross-chain integration
- UI/UX improvements
- Documentation
- Testing
- Bug fixes
This project is licensed under the MIT License - see the LICENSE file for details.
- Website: https://vegate.app (Coming Soon)
- GitHub: https://github.com/Trojanhorse7/VeGate
- VeChain Explorer (Testnet): https://explore-testnet.vechain.org
- VeBetterDAO: https://vebetterdao.org
- VeGate SDK: VeGate SDK on npm
- VeChain Foundation - For the VeChainThor blockchain
- VeBetterDAO - For the B3TR rewards system
- OpenZeppelin - For secure smart contract libraries
- Vercel - For hosting and deployment
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with โค๏ธ for the VeChain ecosystem