Skip to content

Streamers

Purpose

Streamers are a specialized affiliate subtype with a Twitch handle, on-stream bonus offers, and dedicated referral landing pages. The Streamers screen is where partnerships configures the streamer profile, vets uploaded clip / banner art, and reviews referral-from-stream metrics.

Audience

Partnerships team for onboarding / config; risk for stream-fraud (fake-bet rebroadcasts) review.

Path in admin-fe

Screen URL Page
Streamers list /streamers ebit-admin-fe/src/app/(dashboard)/streamers/page.tsx
Streamer drill-in /streamers/[id] ebit-admin-fe/src/app/(dashboard)/streamers/[id]/page.tsx

Backing API endpoints

Endpoint Source
POST /admin/affiliate/streamer (create / upsert) apps/api/src/affiliate/streamer/admin-affiliate-streamer.controller.ts:39
GET /admin/affiliate/streamer/:id apps/api/src/affiliate/streamer/admin-affiliate-streamer.controller.ts:50
POST /admin/affiliate/streamer/referrals apps/api/src/affiliate/streamer/admin-affiliate-streamer.controller.ts:62

Frontend wiring: ebit-admin-fe/src/queries/streamer/.

Key actions

Action Required permission API call DB tables touched Audit-logged?
List / find streamer affiliate.streamer.view GET /admin/affiliate/streamer/:id Affiliate, StreamerProfile yes
Create / update streamer profile affiliate.streamer.view (write) POST /admin/affiliate/streamer Affiliate, StreamerProfile yes
Get referrals attributed to streamer affiliate.streamer.view POST /admin/affiliate/streamer/referrals Referral, User (joined) yes

Filters and views

  • Search — twitch handle, display name.
  • Status — active / paused.
  • Sort — referrals count, NGR, recent-activity.
  • Drill-in tabs: Profile (banner / bio / Twitch handle / payout currency), Referrals, Stream stats, Payouts.

Common workflows

  1. Onboard streamer. Partnerships creates the underlying affiliate record first, then promotes via POST /admin/affiliate/streamer with twitch handle, payout config, profile artwork. Streamer can then claim a custom code.
  2. Review weekly stream attribution. Open a streamer, scroll the Referrals table (POST /admin/affiliate/streamer/referrals). Cross-check with their reported viewer count (out-of-band).
  3. Pause a streamer. Edit profile, toggle active=false. New referrals from their landing page redirect generically; existing referrals retain attribution.
  4. Audit suspicious traffic spike. Streamer's referral count spikes 5×. Open referrals tab, examine User.RegistrationInfo per referred user (cross-link to per-user audit feed at admin-logs.md). If shared IPs / device fingerprints, escalate to risk.
  5. Custom landing artwork. Partnerships uploads banner via the game-management.md image endpoint pattern; the streamer profile references the URL.

Edge cases / gotchas

  • Twitch handle is the unique key for streamer-specific role grants — see admin.user.controller.ts:207 (add-single-role matches by twitchUsername). Inconsistencies between affiliate Twitch handle and User Twitch handle break this.
  • Profile artwork uploads have no size validation in admin-fe. Backend rejects > 5 MB; frontend will surface the 413 awkwardly.
  • No "promo bonus on stream" specific endpoint — those are regular promo codes that the streamer announces. The admin doesn't model "stream-only" codes.
  • Payout currency is per-streamer. Some take BTC, some take USDT. See StreamerProfile.payoutCurrency. Finance must reconcile per-streamer.
  • Streamer status does NOT block existing players from using the code — only the landing page redirect changes. Use code-delete on affiliates.md to fully kill attribution.

Sequence — creating a streamer profile

sequenceDiagram
    actor admin
    participant admin-fe
    participant api
    participant pg as Postgres
    admin->>admin-fe: open /streamers, click "New streamer", fill form
    admin-fe->>api: POST /admin/affiliate (if not yet affiliate)
    api-->>admin-fe: Affiliate created
    admin-fe->>api: POST /admin/affiliate/streamer { affiliateId, twitchHandle, displayName, banner, payout }
    api->>api: PermissionGuard('affiliate.streamer.view')
    api->>pg: UPSERT StreamerProfile
    api->>pg: INSERT AdminActionLog
    api-->>admin-fe: created profile DTO