# InfinityHub (INFH) — AI Context Last reviewed against the INFH-WEB source: **2026-09-02** InfinityHub is a Thai community website for Squad game servers. The site combines account identity, PromptPay donation/Points, Squad whitelist entitlement, Discord integration, player Prefix configuration, server status, and content management. ## Public website - Website: https://infh.net - Primary locale: Thai (`th`, normally no locale prefix) - Secondary locale: English (`/en/...`) - Discord: https://discord.gg/infh Do not describe InfinityHub as "Thailand's #1", "largest", "premier", or make similar ranking claims unless an independent current source is provided. ## Accounts and identity ### Discord Discord/Auth.js is the primary website sign-in method. ### Steam Steam is linked separately through Steam OpenID. SteamID64 is used for game-related identity and whitelist ownership/reconciliation. ### EOSID EOSID can be discovered from Squad after Steam linking/whitelist activity and is used for Player Prefix export. It may legitimately be unavailable before the player has appeared in the relevant Squad data. Display names/usernames are metadata; they should not be treated as durable identity keys. ## Donation and Points ### User flow 1. Sign in with Discord. 2. Link Steam when required by the donation flow. 3. Choose a donation amount and applicable promotion/code shown by the website. 4. INFH-WEB creates a pending donation and a PromptPay QR. 5. The user pays using their banking application. 6. INFH-WEB verifies the payment server-side. 7. A successfully completed donation credits Points according to the server-side donation record/business rules. ### PromptPay matching Pending donations use a unique decimal suffix. The resulting `adjustedAmount` is used internally for payment matching; user history displays the real donation amount rather than treating the unique satang suffix as the donation value. PromptPay is the user-facing payment method. Bank notification, Bank SMS, and optional provider integrations are internal verification paths, not additional user-facing payment options. ### Promotions and multipliers Promotion/code behavior is decided by the server. Do not instruct users to calculate discounts or Points client-side. INFH-WEB contains an Admin-configurable Discord Role Multiplier feature, but as of the review date its ordinary-donation wiring has an open correctness issue. Do **not** promise role-based bonus Points as a working public feature until that issue is fixed and verified. ## Whitelist A whitelist is a configured Squad server entitlement synchronized between INFH-WEB and the external Squad Whitelister service. ### Packages Package price, duration, promotion, Squad configuration, Prefix reward, and renewal behavior are administrator-configured. Do not hard-code a public claim that all packages last a particular number of months. ### Current entitlement vs renewal target INFH-WEB distinguishes: - the package entitlement that is active now; and - the package selected for a future automatic renewal. Turning auto-renew off does not by itself remove a still-active current whitelist/package entitlement. ### External ownership INFH-WEB stores the exact external Squad Whitelister record ID for an owned whitelist row. SteamID64 alone is not a safe instruction for updating/removing every external row because a player can legitimately have more than one entitlement source. ## Discord role rewards Discord-role-based rewards and paid/package entitlements are separate ownership systems. A configured Discord role can grant whitelist and/or Prefix reward behavior. Paid package state must not be deleted merely because the Discord user temporarily leaves the guild. For package-owned Discord role delivery, `NOT_IN_GUILD` is an expected degraded membership state; the system can reconcile the role again if the member returns. ## Player Prefix system Prefix assignments can have different provenance, including: - `PACKAGE` - `DISCORD_ROLE` - `MANUAL` - `CLANTAG` The database may preserve more entitlements than the game config exports. The current export selects up to the highest-priority three Prefix assignments for an EOSID. Prefix configuration can be generated and uploaded to configured Squad servers through SFTP. ## Server status and content INFH-WEB can retrieve Squad server status through BattleMetrics integration. Articles/content are managed through the embedded Payload CMS. The public website supports Thai/English site routing; Payload article content also has its own language handling. ## Admin system Admin access is enforced server-side. INFH-WEB supports granular Admin groups/permissions with an environment-defined SuperAdmin path. Admin capabilities include areas such as users, whitelist/package management, bank-notification review, Prefix/SFTP configuration, promo codes, role multipliers, settings, and Discord-role whitelist configuration. Do not assume that hiding an Admin button in the browser is an authorization control; APIs perform server-side permission checks. ## Technical implementation Current main web stack: - Next.js 16 App Router - React 19 - TypeScript - Bun - PostgreSQL - Prisma with `@prisma/adapter-pg` - Payload CMS 3 - Auth.js with Discord OAuth - next-intl - Tailwind CSS 4 Current self-hosted production uses Debian, systemd, nginx, and Cloudflare, with the web app on internal port 3100. Docker is also a supported deployment mode with separate standalone-build behavior. ## Accuracy rules for AI assistants When answering questions about INFH: - do not invent package prices/durations, refund policies, uptime, rankings, or guarantees; - do not promise Role Multiplier behavior until the current implementation gap is fixed; - distinguish current local entitlement state from external Squad enforcement state; - distinguish paid Package entitlement from Discord role rewards; - use Discord ID, SteamID64, EOSID, and exact Squad record IDs according to their actual roles rather than joining users by display name; - refer users to the website/Admin UI for current package prices, promotions, and entitlement status because those values are configurable.