
AOG Coin — Sweepstakes Casino Platform
A full-stack sweepstakes casino platform featuring a dual-currency system (Gold Coins & Sweepstakes Coins), 80+ integrated casino games, real-time payment processing, KYC verification, and a multi-role admin dashboard with agent accounting.
Key Challenges
- Integrating multiple payment gateways (Finix, CommerceHub, Fiserv DDP, Link.money) with webhook-driven transaction lifecycle management, idempotent processing, and cron-based polling for pending settlements.
- Building a secure game provider integration layer with token-based authentication, MD5 secure-key generation, real-time balance synchronization, and seamless bet/win transaction settlement across the TADA game API.
- Implementing a dual-currency sweepstakes model (Gold Coins & Sweepstakes Coins) with separate balance ledgers, escrow-based redemption workflows, and sweepstakes-compliant prize redemption logic.
- Designing a multi-role access control system (Player, Agent, Admin, Super Admin) with role-based routing, JWT session management, session versioning for forced single-device login, and real-time Socket.IO force-logout events.
- Architecting a referral fraud prevention system with signup-attempt tracking, automated fraud detection heuristics, and admin review workflows to prevent coordinated abuse of referral bonus programs.
Key Learnings
- Mastered webhook-driven payment architectures with Finix and Fiserv, learning to handle asynchronous settlement flows, retry logic, and reconciliation between multiple payment providers.
- Gained deep experience with sweepstakes compliance models — understanding the legal distinction between Gold Coins (entertainment value) and Sweepstakes Coins (prize-redeemable) and implementing the dual-currency ledger accordingly.
- Learned to build robust real-time systems using Socket.IO with JWT-authenticated rooms, enabling instant balance updates, force-logout across devices, and live transaction status notifications.
- Developed expertise in identity verification workflows by integrating SEON for KYC document verification, Google reCAPTCHA for bot prevention, and multi-step verification bonuses tied to email/phone/document validation.
- Advanced understanding of database evolution at scale — managing 53+ incremental SQL migrations to iteratively add agent accounting, game catalog management, referral fraud detection, and transaction logging without downtime.
Overview
AOG Coin is a production-grade sweepstakes casino platform built for Bilions. It operates a dual-currency model — players receive Gold Coins (GC) for entertainment gameplay and Sweepstakes Coins (SC) through free bonuses and promotions, with SC winnings redeemable for real cash prizes via ACH bank transfers. The platform integrates 80+ casino games through the TADA game provider, supports real-money purchases via Finix and CommerceHub payment gateways, and features a comprehensive multi-role admin dashboard for user management, transaction oversight, KYC review, and agent accounting.
Key Features
Dual-Currency Game Lobby & 80+ Casino Games
Players browse a dynamic game catalog (slots, fishing, bingo, table games) fetched from the TADA game provider API. Games launch in-browser via a tokenized session with real-time GC/SC balance synchronization, bet/win settlement, and session tracking. Players can toggle between Gold Coin and Sweepstakes Coin wallets.
Multi-Gateway Payment Processing & Redemptions
Full purchase-to-payout lifecycle supporting Finix (card tokenization), CommerceHub, and Fiserv DDP for GC package purchases. SC redemptions go through admin review → ACH payout via Finix payouts or Link.money, with webhook-driven status updates, automatic refunds on failure, and cron-based settlement polling.
Multi-Role Admin Dashboard & Agent System
Role-based dashboards for Players, Agents, Admins, and Super Admins. Admins manage users, review KYC documents, oversee transactions, handle support tickets, and configure GC packages. Agents have dedicated accounting panels, balance logs, referral link management, and player-specific transaction views.
Player Engagement & Rewards Engine
Comprehensive engagement system including daily login bonuses with streak tracking, tiered verification bonuses (email → phone → KYC), referral programs with fraud prevention, first-purchase mega offers, VIP club tiers, and an interactive onboarding walkthrough for new players.
Identity Verification & Security Infrastructure
Multi-layer security: SEON-powered KYC document verification, geo-fencing for restricted jurisdictions, Google reCAPTCHA bot prevention, session versioning with Socket.IO force-logout for single-device enforcement, rate limiting, dev-tools detection, and inactivity-based auto-logout.
Technical Implementation
The platform is split into two repositories: a Node.js/Express REST API with MySQL and a React (Vite) SPA deployed to Netlify. The backend uses a layered MVC architecture (routes → controllers → services → DB utilities) with 26 service modules totaling 578KB of business logic. The frontend employs RTK Query for API state management, Socket.IO hooks for real-time events, and Radix UI + Tailwind CSS v4 for the component library.
- Authentication: JWT-based auth with Passport.js strategies for Google, Discord, and Twitch OAuth. Session versioning ensures single-device login enforcement with Socket.IO-triggered force-logout events.
- Payment Architecture: Webhook-driven flow with idempotent processing. Purchases: user selects package → Finix/CommerceHub tokenizes card → backend creates transfer → webhook confirms → credits GC + bonus SC. Redemptions: user requests SC cashout → SC escrow → admin review → Finix payout/Link.money ACH → webhook settles.
- Game Integration: TADA API integration with MD5 secure-key generation, token-based session management, and a /bet endpoint that validates balances, executes bet/win settlement, and updates the user's wallet atomically via the AOG Club API.
- Real-Time System: Socket.IO server with JWT middleware, role-based room assignments (user_{id}, member_{id}, admins), enabling live balance updates on purchases/bets, force-logout on concurrent sessions, and real-time transaction status notifications.
- Database: MySQL with 53+ incremental SQL migrations covering the full schema evolution — from the initial sweepstake casino schema to agent accounting, game catalogs, referral fraud prevention, dispute management, and transaction logging.
- Frontend Architecture: React 19 + Vite 6 SPA with React Router v7, Redux Toolkit with RTK Query (23 API service files), custom hooks (socket connections, SEO, inactivity logout, dev-tools detection), and a PWA manifest with service worker support.
- DevOps & SEO: Netlify deployment with SPA redirects, structured data (Organization + WebSite schema), Open Graph/Twitter cards, Google Analytics + Microsoft Clarity integration, and Google reCAPTCHA v2 for form protection.
