Progression

The first-party progression plugin (plugins/progression, providerType: progression, plugin API 1.3) adds levels and XP, achievements and missions to Poker Engine. Players earn XP for every hand and tournament finish, unlock achievements, complete daily, weekly and one-time missions for chips, tickets or bonuses, and compete on a weekly and an all-time XP leaderboard.

It’s sold separately as progression-<version>.tgz; Poker Engine releases don’t include it. Install it with Upload plugin on Extensions › Plugins, which shows the consent dialog (see Installing the First-Party Plugins). The admin side is described in Progression (admin).

For operators

What players see

WhereWhat
Header (layout.main.header.end)A level chip (Lv 3 · 1,240 XP), live over the socket, that opens the profile’s Progression tab; on phones (below 640px) it sits at the top of the menu drawer. Level-up, unlock and mission toasts appear on every page, the table included.
Table seat (table.seat.badge)Each seated player’s level. Levels are fetched in one batched request per table.
Table rail (table.hud.panel)The hero’s level bar, the XP of the last hand and the active missions.
Hand result (table.hand-result.after)+N XP for the hand just played, while the winners show.
Profile header (profile.header.badges)Level and up to three showcased achievements, on the player’s own profile and on every public profile /players/:username.
Own profile, Progression tab (profile.tabs)The full dashboard: level and XP bar, weekly XP, login streak, missions, every achievement with progress, recent history. Opens with /profile?tab=plugin:progression.
Public profile /players/:username, Progression tabRead-only: the player’s level and XP bar, how many achievements they unlocked, and the unlocked achievements. No missions, history, streak or rewards. Anyone can open it, signed out too.
Leaderboard, XP tab (leaderboard.tabs)This week and all time. Opens with /leaderboard?tab=plugin:xp.
Lobby (lobby.sidebar)Today’s missions, with an All progress link to the profile tab.
/ext/progression/progressionThe old dashboard page. Since plugin API 1.3 it redirects to /profile?tab=plugin:progression (links in notifications already sent keep working), and the plugin adds no entry to the player navigation.
NotificationsAn in-app message for each level-up, unlock and completed mission, linking to the profile tab. Push too for level-ups and unlocks when Push notifications is on. Players switch each kind per channel in Settings → Notifications (see below).

Notification categories

The plugin registers three categories (plugin API 1.3), listed under Progression in the player’s Settings → Notifications grid. All are on by default; none is marketing.

CategoryLabelChannelsSent
level-upLevel-upsIn-app, pushWhen the player reaches a new level
achievementsAchievementsIn-app, pushWhen the player unlocks an achievement
missionsMissionsIn-appWhen the player completes a mission

Push is only sent while Push notifications (pushOnUnlock) is on; a player who switched a category off for a channel gets nothing on that channel, and the toasts on screen are unaffected.

Admin overview

Progression overview (/admin/plugins/progression/progression/overview) is listed under Players in the admin sidebar: it finds a player, shows their level and badges, grants XP and recomputes their progress, next to the other per-player tools. It also shows totals, the all-time top players, the catalog state and the scheduled jobs.

Settings

Every setting is optional; an empty value uses the default.

SettingDefaultMeaning
xpPerHand10XP for each hand played.
xpPerHandWon0Extra XP for each hand in which the player wins a pot (1.1.0).
xpPerBigBlindWon1Extra XP per big blind of net winnings in a hand, capped at 500 XP per hand.
xpShowdownWinBonusemptyExtra XP for winning at showdown. Empty uses xpPerHand (the behaviour before 1.1.0); 0 turns it off.
xpTournamentFinishBase100Tournament finish XP is base x (1 + (field - position) / field): the runner-up of two gets 100, the winner 150; the winner of ten gets 190.
xpDailyLogin20XP for the first login of a UTC day, plus 5 per streak day up to a week. 0 turns it off (1.1.0).
levelCurvequadraticquadratic: level n needs 100 x (n-1)^2 XP (level 2 at 100, level 5 at 1,600, level 10 at 8,100). linear: 250 XP per level. arithmetic (shown as "Growing", 1.1.0): going from level L to L+1 needs levelCurveBase + levelCurveStep x L XP.
levelCurveBase, levelCurveStep100, 60The growing curve’s numbers: with the defaults level 2 needs 160 XP, level 3 another 220 (380 in total).
levelCount50Highest level (2 to 1000). XP keeps counting past it.
levelUpChipsPerLevel0Virtual chips paid on reaching a level: this amount times the new level (20,000 pays 40,000 at level 2 and 60,000 at level 3). 0 turns it off. Paid on top of levelRewards, with its own idempotency key level-chips:<level>:<userId> (1.1.0).
missionClaimModeautoauto pays a mission when it completes. claim waits until the player presses Claim (the plugin’s mission lists show the button; themes call POST /missions/:id/claim). An unclaimed mission expires when its period resets (1.1.0).
stakeLevelsemptyLevel-locked stakes (1.1.0): [{ smallBlind, bigBlind, level, modes? }]. A player below level cannot join a cash table with those blinds: the plugin refuses the join through the player:eligibility filter (plugin API 1.4, capability player:eligibility) with reason LEVEL_REQUIRED and details.requiredLevel. modes defaults to play-chip tables (VIRTUAL_CHIPS); add REAL_MONEY to lock real-money tables too. Tournaments and private tables are never locked. GET /me lists the locks for themes. An invalid value locks nothing and turns the health check unhealthy.
tournamentLevelsemptyLevel-locked tournaments (1.1.0): [{ minBuyIn, level, currencies? }]. Registering for a tournament whose buy-in is at least minBuyIn needs level (the highest matching entry wins); refused with LEVEL_REQUIRED like the stakes. currencies defaults to play-chip tournaments (VIRTUAL_CHIPS); a freeroll is locked only by an entry with minBuyIn: 0. Sit & Gos (Jackpot Spin games included) count as tournaments. GET /me lists it. An invalid value locks nothing and turns the health check unhealthy.
achievementsCatalogbuilt-inJSON array of achievements. Empty means the built-in catalog.
missionsCatalogbuilt-inJSON array of missions.
levelRewardsbuilt-inJSON array of { level, reward }.
rewardsRealMoneyEnabledoffAllows rewards of type real and bonuses of type USD. While off they are recorded as skipped. The plugin’s daily real-money cap (Wallet daily caps in its details on Extensions › Plugins) still applies, and it is 0 until an admin raises it.
leaderboardResetCron0 0 * * 1When the weekly leaderboard is snapshotted and restarted (cron, UTC). Takes effect when saved.
announceUnlocksInTableChatoffShows other players at the table when someone unlocks an achievement (in the table rail and as a toast).
pushOnUnlockoffAlso sends a push notification for level-ups and unlocks.

The engine checks the three catalog settings against the JSON schema in the manifest when you save them. The plugin then validates them more strictly (known metrics, unique ids). If a catalog is invalid the built-in one is used, the health check turns unhealthy and the admin overview shows the error.

Daily XP, achievement progress and mission progress persist in plugin storage. Deleting the plugin deletes them.

XP sources

Event (hook)XP
Hand completed (game:hand:completed)xpPerHand, plus big blinds won, plus the showdown-win bonus.
Tournament finish (tournament:player:eliminated, tournament:finished)Position based (see above). An elimination is credited at once; the final standings top it up, so nothing is paid twice.
First login of the UTC day (auth:user:login)20, plus 5 per consecutive day up to 7 days (50).
Unlocking an achievementThe achievement’s xp.
Completing (auto) or claiming (claim mode) a missionThe mission’s xp (1.1.0).
Another plugin’s event named in a catalogNone; it counts for conditions (see "Other plugins’ events").
Admin grantAny amount (admin overview).

Built-in achievements

IdTitleCondition
first-handFirst handPlay 1 hand
hands-100 / hands-1000 / hands-10000Regular / Grinder / Iron buttPlay 100 / 1,000 / 10,000 hands
daily-grinderDaily grinderPlay 50 hands in one UTC day (repeatable)
first-winFirst winWin a pot
wins-100Pot collectorWin 100 pots
big-pot / monster-potBig pot / Monster potWin a pot of 100 / 500 big blinds
straight-winner, flush-winner, full-house-winner, quads-winner, straight-flush-winner, royal-flushWin with that hand (from the winner’s handRank). royal-flush is hidden until unlocked.
showdown-streak-5Hot streakWin 5 showdowns in a row
showdown-wins-50Showdown specialistWin 50 showdowns
variety-3Variety playerPlay 3 game types
bluffBluff masterBet or raise on the river and win without a showdown
all-in-survivorAll-in survivorGo all in and still have chips after the hand
first-tournament / tournaments-25First tournament / Tournament regularFinish 1 / 25 tournaments
final-tableFinal tableFinish 9th or better
in-the-moneyIn the moneyFinish with a prize
tournament-winChampionWin a tournament (1 ticket)
login-streak-7 / login-streak-30Week streak / Month streakLog in on 7 / 30 consecutive days
first-depositFirst depositFirst confirmed deposit
level-5 / level-10 / level-25Rising star / Seasoned / VeteranReach that level

Built-in missions and level rewards

IdPeriodGoalReward
daily-play-1dailyPlay 1 hand100 virtual chips
daily-win-3dailyWin 3 pots250 virtual chips
daily-hands-25dailyPlay 25 hands500 virtual chips
weekly-tournamentweeklyFinish a tournament1 ticket
weekly-hands-200weeklyPlay 200 hands1,000 virtual bonus
welcome-tournamentonceFinish your first tournament200 virtual chips
deposit-matchonceFirst deposit100% USD bonus up to 50, 10x wagering, 30 days (needs rewardsRealMoneyEnabled)

Level rewards: level 5, 500 virtual chips; level 10, 1 ticket; level 20, 2,500 virtual chips; level 25, a 5,000 virtual bonus; level 50, 5 tickets.

Daily missions reset at 00:00 UTC, weekly missions on Monday 00:00 UTC (ISO weeks).

Presets

plugins/progression/presets/social-casino.json (shipped in the plugin archive) is a complete set of settings for a social-casino economy: 5 XP per hand dealt and 10 more per pot won, no big-blind, showdown or login XP, the growing curve 100 + 60 x level up to level 100, 20,000 chips times the new level on every level-up (no level rewards list), level-locked play-chip stakes (500/1,000 from level 2 up to 50,000/100,000 from level 25), claimable daily missions (Win 3 hands: 30,000 chips and 60 XP; See 10 flops: 20,000 chips and 40 XP; Play 1 Jackpot Spin: 40,000 chips and 80 XP) and eight trophies (First pot, 10 pots won, Flush, Four of a kind, Jackpot win, 10x Spin, Sit & Go win, 7-day streak). The Jackpot Spin mission and trophies count the events plugin:jackpot-spin:played and plugin:jackpot-spin:won (value: the multiplier), so they need a Jackpot Spin plugin that fires them; "Sit & Go win" counts any tournament win and "7-day streak" the login streak.

To apply it, copy each value under settings into the plugin’s settings (Extensions › Plugins, Settings on the Progression row) (JSON values into the JSON fields), or send the object to the settings API with every value as a string:

jq '{settings: (.settings | map_values(if type == "string" then . else tojson end))}' \
  plugins/progression/presets/social-casino.json > /tmp/progression-settings.json
# PUT /api/v1/admin/plugins/progression/settings with that body (super-admin session and CSRF token)

Saving merges: settings the preset does not name keep their values.

For developers

Catalog format

{
  "id": "big-pot",
  "title": "Big pot",
  "description": "Win a pot worth 100 big blinds or more.",
  "icon": "💎",
  "category": "wins",
  "condition": { "type": "threshold", "metric": "biggest_pot_bb", "target": 100 },
  "xp": 100,
  "reward": { "type": "virtual", "amount": 500 },
  "hidden": false,
  "repeatable": false,
  "showcase": true
}

Ids are ^[a-z0-9][a-z0-9_-]{0,39}$. Missions take period: daily | weekly | once, a required reward and (1.1.0) an optional xp granted with it; they have no window.

Condition typeComparesMetrics
counterAn all-time counter, or with `window: dailyweekly` the count in the current UTC day or ISO week
thresholdThe highest value seenbiggest_pot_bb, game_types, level, total_xp, or another plugin’s event plugin:<providerType>:<event> (its highest value, 1.1.0)
streakThe best consecutive run (missions use the current one)login_streak, showdown_win_streak, win_streak
eventHow often a named event happeneddeposit:first, deposit, login, tournament:win, level-up, or another plugin’s event plugin:<providerType>:<event> (1.1.0)

Rewards: { type: 'virtual' | 'real' | 'tickets' | 'bonus', amount, bonusType?: 'VIRTUAL' | 'USD' | 'TICKETS', wageringMultiplier?, wageringDeadlineDays?, matchPercent?, maxAmount? }. With matchPercent the plugin pays that percentage of the triggering amount (the deposit), capped at maxAmount (else amount). Wagering applies to USD bonuses only (until it is met the player cannot withdraw); on VIRTUAL and TICKETS bonuses wageringMultiplier has no effect and is ignored (the server logs a warning), so leave it out there. The deadline in days is recorded with the bonus but does not end the requirement: when it passes, the bonus is not taken back and the player still needs to finish the wagering before withdrawing.

Every reward goes through registry.wallet or registry.bonus with an idempotency key: achievement:<id>:<userId> (plus :<n> for repeats), mission:<id>:<periodKey>:<userId> (period key 2026-11-07, 2026-w45 or once), level:<n>:<userId>, level-chips:<n>:<userId> (levelUpChipsPerLevel). A retry never pays twice. A failed payment is recorded on the achievement or mission and retried by the admin Recompute action.

Hooks and capabilities

The manifest declares storage, wallet:credit-virtual, wallet:credit-real, wallet:credit-tickets, bonus, realtime, scheduler, notify:in-app, notify:push, hooks:player-actions, users:read (leaderboard names) and (1.1.0) player:eligibility (level-locked stakes; installs upgrading from 1.0.0 grant it in the consent dialog, and without it nothing is locked), plus hooks.optIn: ['game:player:action']. Player actions only feed the bluff and all-in flags. Without them, all-in is derived from contributed >= startingStack and bluffs are not counted.

Listened to: game:hand:completed, game:player:action, tournament:player:eliminated, tournament:finished, auth:user:login, cashier:deposit:confirmed, plugin:settings:saved, server:routes:admin, and every plugin:<providerType>:<event> a catalog condition names.

Fired for other plugins (1.1.0): plugin:progression:level-up with { userId, from, level, totalXp } after every level-up (the social plugin’s invite reward listens to it).

Other plugins’ events

A condition can name another plugin’s event as its metric: plugin:<providerType>:<event> (not plugin:progression:*). The plugin subscribes to every such hook when it starts and when its settings are saved. The other plugin fires it with registry.doAction('plugin:<providerType>:<event>', { userId, value? }); only that plugin can fire its own namespace. An event condition counts how often it fired for the player (within the mission’s period for missions); a threshold condition compares the highest value it carried, such as a multiplier:

{ "type": "event", "metric": "plugin:jackpot-spin:played", "target": 1 }
{ "type": "threshold", "metric": "plugin:jackpot-spin:won", "target": 10 }

Payloads without a valid userId are ignored; value must be a finite number.

Flops seen and VPIP

From the opt-in game:player:action hook (1.1.0): flops_seen counts a hand in which the player did not fold preflop and the flop was dealt (someone acted after it, or the hand ran out to a showdown the player was in); vpip_hands counts a hand in which the player called, bet, raised or went all in preflop. Only board games count flops. Both are counter metrics for catalogs and appear in GET /me stats. They start counting when the plugin is installed.

Claiming missions

With missionClaimMode: claim, a completed mission’s reward waits for POST /missions/:id/claim in its period. The claim takes a first-writer marker (mclaim:<id>:<periodKey>, one atomic merge), so two tabs, a double click or two nodes claim once and grant the mission’s XP once; the payment carries the mission’s idempotency key mission:<id>:<periodKey>:<userId>, so a retry after a refused payment (a daily cap: 502 REWARD_FAILED, the claim stays open) moves the chips at most once. Errors: 409 CLAIM_DISABLED (auto mode), 404 NOT_FOUND, 409 NOT_COMPLETED, 409 ALREADY_CLAIMED.

Storage layout

Per player (storage.user(userId)): xp ({ total, level, streak, name?, updatedAt }, the all-time leaderboard row), xp-weekly ({ season, xp, level, name? }), metrics, periods, achievements, missions (with claimedAt in claim mode), level-rewards, level-chips, mclaim:<missionId>:<periodKey>, game-types, tournaments, history (last 30 entries).

Global (storage.global): leaderboard:season, leaderboard:snapshot:<n> (top 100 of season n), leaderboard:last-snapshot, missions:rollover, stats.

Achievement and mission entries are written with merge (only the changed entries). A per-player lock serialises the read-modify-write of one player on a node. A player’s hands and logins are handled by the node they are connected to, so concurrent writes for one player from two nodes are not expected. The global stats counters are best effort under multi-node load.

Display names: hook payloads carry user ids only. The leaderboard looks up every row’s current username with users:read when it is read, so players who earned XP from an admin grant or never opened the web client still show by name and link to /players/<username>. The plugin also records a player’s username when their client loads GET /me; that stored name is only used when users:read has not been granted (Player <id> when there is none).

Scheduled jobs

JobScheduleDoes
missions:rollover0 0 * * * UTCClears last period’s daily and weekly mission entries and records the run (missions:rollover). Reads are period-keyed, so missions are correct without it.
leaderboard:weekly-resetleaderboardResetCronSaves the top 100 of the current weekly season to leaderboard:snapshot:<n> and starts season n+1. Weekly XP is keyed by season, so no per-player writes are needed.

Both run once per cluster through the scheduler’s database lease.

Realtime events

To the player (realtime.toUser): xp { total, level, gained, reason, tableId?, handNumber?, info }, level-up { from, level }, achievement-unlocked { id, title, icon, times }, mission-completed { id, title, reward }, mission-claimed { id, periodKey } (claim mode). To the table (realtime.toTable): seat-level { userId, level } after a level-up during a hand, and announcement when announceUnlocksInTableChat is on. The core has no plugin API for table chat, so the announcement is shown by the plugin’s own table rail and toast, not in the chat log.

HTTP API

Player routes, under /api/v1/plugins/progression:

RouteAccessReturns
GET /mesigned inLevel info, weekly XP, streak, every achievement with progress, missions with progress, resetsAt, xp, claimable and claimedAt, history, stats (handsPlayed, handsWon, flopsSeen, vpipHands, showdowns, showdownWins, tournamentWins, biggestPotBb), stakeLevels, tournamentLevels and missionClaimMode. Themes read this one route for the level chip, missions and trophies
POST /missions/:id/claimsigned inClaim mode: pays a completed mission of the current period once; { missionId, periodKey, reward, rewardStatus, xp, xpInfo }
GET /leaderboard?period=weekly|alltimepublic{ period, season, rows: [{ rank, userId, name, level, xp }] } (top 50)
GET /users/summaries?ids=a,b,cpublic{ [userId]: { level, total } }, at most 50 ids (seat badges)
GET /users/:id/summarypublic{ level, total, badges, showcase }
GET /users/:id/publicpublicPublic progression for the public profile tab: { userId, xp, achievementCount, unlockedCount, showcase, achievements }, where achievements lists unlocked achievements only (id, title, description, icon, unlockedAt, times). Never missions, history, streaks, weekly XP, rewards or locked progress.
GET /catalogpublicAchievements (hidden ones masked), missions, level thresholds and levelUpChipsPerLevel

Admin routes, on the engine’s admin router (authenticate + requireAdmin + CSRF), under /api/v1/admin:

RouteBodyDoes
GET /progression/statsPlayer count, top 10, totals, unlocks per achievement, catalog state, jobs, last rollover, current season
POST /progression/users/:id/grant-xp{ amount: 1..1000000, reason? }Adds XP with every side effect (level-up, rewards, notifications)
POST /progression/recompute/:userIdRe-evaluates the player against the current catalog and retries failed rewards

Client

src/client/plugin.tsx registers the fills (the profile tab with audience: 'everyone': the full dashboard when isOwnProfile, the public view otherwise), the admin page (nav.section: 'users') and the redirect engine.pages.redirect({ providerType: 'progression', from: '/progression', to: '/profile?tab=plugin:progression' }), also declared in the manifest redirects so it works before the bundle loads; store.ts holds /me, the per-table hand XP and cached seat levels, and listens on engine.socket.for('progression'). Strings go through engine.i18n.for('progression').t with src/locales/en.json (shipped as dist/locales/en.json).

Test ids for end-to-end tests: progression-level-chip (data-level, data-xp), progression-seat-badge (data-user-id, data-level), progression-hand-xp (data-xp), progression-hud, progression-hud-last-hand, progression-hud-mission-<id>, progression-achievement-<id> (data-unlocked), progression-mission-<id> (data-completed), progression-lobby-missions, progression-lobby-mission-<id>, progression-leaderboard, progression-leaderboard-row (data-user-id), progression-tab (data-own), progression-public (data-user-id), progression-public-summary (data-level, data-xp), progression-public-achievement-<id>, progression-summary, progression-history, progression-profile-badges, progression-showcase-<id>, progression-announcement, progression-admin-overview, progression-admin-totals, progression-admin-catalog (data-valid), progression-admin-search, progression-admin-search-submit, progression-admin-player-row (data-user-id, data-level), progression-admin-grant-amount, progression-admin-grant-submit.

Building and testing

npm run plugin:build progression     # sync catalog defaults into the manifest, type-check, bundle
npm run plugin:test progression      # vitest: engines, routes, client components
npm run plugin:validate progression

dist/ is committed so auto-discovery works without a build step. sync-manifest.mjs copies src/catalog/*.json into the manifest’s json field defaults, and a test fails if they drift.

More about Progression

Try the live demo Pricing

Have questions about Poker Engine? We reply fast.