Shop & economy¶
/admin/shop is the operator surface for the Splintertoken
storefront, the gametime subscription system, and the keycode
redemption pipeline.
Categories¶
shop.categoriesrows: key, default English label, per-localelabel_i18nJSONB, sort order.- Inline edit table at
/admin/shop— POST creates, PUT (per category key) updates, DELETE removes (items keep the orphaned category string). - The launcher / web shop renders the matching
label_i18n[locale]with English fallback.
Items¶
shop.items: id, name, category, price (in Splintertokens), payload JSONB, applies_to_game_ids array, enabled / hidden flags, featured flag, time-window availability.- "Featured" promotes an item into the shop hero strip.
- Hidden items stay queryable by ID (for promo links) but don't appear in the catalogue list.
applies_to_game_ids[]empty = all games; populated = scoped.
Splintertoken balance¶
shop.balanceper account (read byGET /api/v1/shop/balance).- Manual credit / debit form with audit reason; goes through
auth.account_activityfor traceability.
Gametime keycodes¶
shop.keycodesrow per code, formatXXXX-XXXX-XXXX-XXXX. Each carrieskind(gametime / tokens / shop_item) plus payload (days, token_amount, item_id).- Bulk generator: pick kind + count + expiry → CSV export of new codes with redemption URL pre-baked.
- Audit page: every redemption with redeemer account, IP, time.
Subscription¶
auth.account.subscription_expires_atis the unix epoch the sub expires on;unlimited = TRUEmeans GM-grant eternal access.- Admin can extend a sub by N days, or set unlimited.
- The launcher's <7 days warning chip reads
GET /api/v1/me/subscriptionagainst the same data.
Forum / shop / tokens / gametime flags¶
Independent on/off knobs in auth.app_setting:
tokens_enabled,gametime_enabled,shop_enabled,shop_open,forum_enabled,forum_open.
The launcher hides the Shop tab and gametime warning entirely when the relevant flag is off; the redeem dialog still surfaces if any of the three credit-able features is on.