Skip to content

Changelog

Ships the “approved-for-build” v2 architecture from deliverables/07-admin-architecture.md, superseding the 7-screen MVP admin.

  • Commit: a0f04ec
  • RBAC v2: admin_roles table, permissions.decorator, permissions.guard, seed for the 6 built-in roles
  • Admin user CRUD (/admin/admins)
  • Approvals queue (/admin/approvals) with two-person rule enforcement
  • Audit log with JSON diff viewer (/admin/audit-logs)
  • Admin frontend scaffold: TanStack Query, TanStack Table, permission-aware sidebar, ⌘K command palette
  • Commit: 9b5e233
  • Cloudflare Stream integration: direct upload URLs (TUS/resumable), HMAC-verified webhook, playback ID + duration extraction, auto thumbnails
  • media_assets table (kind: video / poster / hero / thumb / caption)
  • Media library + uploads UI, retry & delete
  • Episode media linking, per-language captions
  • Publish workflow state machine (draft → in_review → scheduled → published → archived)
  • publish_schedules table + publish-scheduler cron (1 min)
  • Genre / trope / cast CRUD
  • Commits: 452b82c..5ff544d
  • User search (email / phone / device / country / spend tier), User 360 detail
  • Ledger-correct wallet adjust: double-entry writes to source_promo/sink_refund, balance always derived
  • Support daily cap: 500 coins/user/day, enforced server-side
  • Approval gate at 2000 coins → routes through admin_approvals
  • Suspend / ban / reactivate with reason and audit
  • Devices list + force-logout-all (bumps token_version)
  • GDPR anonymize (approval-gated)
  • Support notes thread per user
  • Comp subscription (grant TwistCue+ for N days)
  • Commits: 4c2dd07..8c01a89
  • Unified transactions view joining Purchase + Subscription across 5 rails
  • Refund pipeline: request → (≤$50 auto-execute if payments:refund; >$50 through approvals) → provider call → automatic ledger reversal via sink_refund → optional unlock rollback
  • Refund shortfall clamping: never take a wallet below zero; logs underpaid_cents for finance to reconcile
  • Price overrides table with resolution: episode → series → market → default (30 coins)
  • Coin packages CRUD (per-rail SKU list)
  • Promos: bonus-multiplier, coin-grant, trial-extension; budget caps
  • Reconciliation CSV upload per rail, daily rollup diffs
  • Economy monitor: coins minted vs burned, bonus liability
  • Commits: 946bb5a..6d697d9
  • Rollup crons: rollups-hourly (revenue/series/funnel), free-series-rotation-daily
  • Overview KPIs, retention cohort grid (D1/D7/D30)
  • Revenue dashboard (ARPU/ARPPU/LTV by rail/country/day)
  • Per-series drop-off analysis (watch progress histograms)
  • Funnel: preview_view → ep1_start → paywall_hit → unlock → repeat_unlock
  • Curation: For You rail builder (drag order), collection CRUD (manual + rule-based), preview-reel editorial_hero_score
  • Free-today rotation scheduler (free_series_rotations table)
  • Feed composer service (reads rails + collections + free rotation for /v1/feed)
  • Commit: 7a4ca67
  • Segment builder (segments table, JSON query builder)
  • Push campaigns: compose → estimate audience → schedule → send
  • 3/day cap surfaced pre-send: composer shows targeted / capped before firing
  • push-scheduler cron (1 min) picks up scheduled campaigns
  • Comment moderation queue: keyword flags, hide/delete, per-user strike tracking, auto-suspend commenting at 3 strikes
  • Reports queue with cascade actions (hide comment + strike author in one action)
  • Streak & rewards config (reward_configs): daily rewarded-ads cap (≤3), streak curve
  • Feature flags (feature_flags): anything prefixed public_* is exposed on the public /v1/flags endpoint
  • Commit: fa0199c
  • Terminology sweep, RTL preview in localization panels, empty-state improvements
  • Command palette entries for every top-level route
  • AdminUser.role migrated from string enum to role_id FK admin_roles (string kept as denormalized column during migration; will be removed post-launch).
  • /admin/stats still exists but has been superseded by /admin/analytics/overview.