• Mahmoud Aglan's avatar
    feat: invite codes and links, player-side orgs, guest upgrade, and the game honouring the manager · 90ab18f7
    Mahmoud Aglan authored
    Invite codes and links (one system for org, tournament, group and promo codes)
    - Redeem screen, invitation card, reveal and history; a code box at signup and
      login; links (/r/CODE, ?org=, ?code=, ?join=) survive reloads, a closed tab
      and the Google redirect; WhatsApp/Telegram previews with a shaped Arabic share
      card. Canonical codes match the SQL exactly (tests share the vectors).
    - A guest who registers is upgraded in place: same account, coins, history and
      held invites.
    - Organisations, player side only (staff manage them in the manager): browse,
      read-only org page with announcements, join, apply with a private proof,
      leave, primary org on the profile. Proofs moved to a private bucket.
    - The groups join box resolves any code through the same rate-limited path.
    
    The game honours the manager
    - Feature flags and maintenance mode, which games are on and their order,
      daily reward and Elo K from reward_config, a ban screen with the reason,
      ads on the table with counted impressions and clicks.
    - Tournaments: drafts hidden, registration window, rating limits, members
      only, entry fee charged with the seat and refunded on withdraw or cancel,
      prizes paid once at the end, announcements and the live page link, a
      paused state, withdrawn players keep their opponents' points.
    - Draws and losses are paid; the battle pass counts per season; the shop
      respects availability; the game keeps its own art (the manager cannot
      change logos, tab icons or bot portraits).
    
    Fixes
    - Realtime channels get the refreshed token and rejoin when dropped; a chat
      that failed its first load keeps trying; no vibration before the first tap;
      org and redeem notices in the bell; Dockerfile adds intl and gd.
    
    Data: Arab countries and regions dataset for tournament forms. Docs: redeem
    API, tournament hosting spec.
    Co-Authored-By: 's avatarClaude Opus 5.5 <noreply@anthropic.com>
    90ab18f7