Mystery Pack Opening Website Source Code: Graded Trading Card Packs with Live Odds (Next.js + NestJS)
A complete mystery pack opening platform for graded trading cards. Every pack shows each card, its exact odds and the copies left, updated live; pulls are provably fair and verifiable; card payments capture only when a pack opens; and players ship their card or sell it back for credit. Includes a NestJS API, Next.js site and admin, KYC and geo/age gates.
Screenshots
About this product
Online pack and mystery box opening has become one of the busiest corners of the trading card hobby. Buyers pay a fixed price, open a pack and pull a real graded card, often a PSA or CGC slab worth more or less than the price they paid. The format is simple for the player, but the software behind it is not: odds must be exact and verifiable, inventory is finite and changes with every pull, payments must never charge for a failed open, and every cent owed to players needs an auditable record.
This is a complete mystery pack opening website for graded trading cards, built for founders, card shops and collectibles marketplaces that want a site like Rips by Triumph without spending a year on the hard parts. Every pack lists each card it contains, its exact odds and how many copies are left, and the list updates live as cards are pulled. The demo runs under the placeholder brand Yoinks, which a buyer would rebrand. The seller describes it as production-grade, with a NestJS API, a Next.js consumer site and a Next.js admin dashboard, all in TypeScript.
Features
Packs, tiers and live odds
- Pack pages with a 3D pack and card reveal, plus Sound, Fast open, 3D and Verify controls
- Price tiers per pack (the demo shows a Silver $10 tier and an Obsidian $1,000 tier), each with a fixed stock such as "37 of 50 left" and an Out of Stock state
- Odds right now by rarity (Legendary, Epic, Common), showing the percentage and copies left, recalculated as cards are pulled
- An Every card in this tier grid filterable by rarity, and a Recent pulls tab
- Catalog support for Pokémon first, with Magic: The Gathering, One Piece and Riftbound per the seller
Provably fair draws
- Odds stored as integer ticket ranges; every opening can be checked against published test vectors (seller)
- A public fairness verifier, seed management and a Verification # with a "Check this pull" link on every result
- Restocks commit the prize pool with a hash
Checkout, wallet and payments
- Pay with site Credit or by card through Stripe, with an optional saved card
- Manual-capture Stripe PaymentIntents: the card is authorized, a signed webhook re-checks every gate and draws the card under a row lock, then captures in one transaction, so a refused open is never charged
- Money stored as integer cents in a double-entry ledger enforced by Postgres; idempotent payment writes; disputes, refunds and reconciliation (seller)
- A terms-of-purchase and 18+ / location certification at checkout, and a Pack & Odds Disclosure link
Pull result, inventory and shipping
- A result screen with the graded card, rarity, Listed value and Sells back for price, with prices sourced from PriceCharting
- Sell back for site Credit (final, and Credit cannot be withdrawn), Open again, or keep the card in inventory and request shipping
Compliance gates
- Geo, age and KYC gates enforced on the server, with KYC through Didit
- Coming-soon / waitlist mode, legal pages and consent-gated analytics
Admin dashboard
- An overview of gross gaming revenue, sales, opens, return rate, amounts owed to players, packs on sale, graded cards and catalog price checks
- Screens for Metrics, Users, Openings, Ledger, Packs, Graded cards, Purchases, Unavailable cards, Sell-back checks, Fulfillment, Market, Disputes, Risk config, Feature flags and Player gates
- Pack builder: card rules (game, grade, set, year, price range), pinned or excluded cards and a global price ladder (by default $10, $25, $100 and $250); a solver plans each tier's finite prize pool against value floors, ceilings, per-card caps and a payout target
Who it is for
- Card shops and breakers with graded inventory who want to sell it as packs online
- Collectibles marketplaces adding a pack or mystery box format
- Founders entering the graded-card pack category with legal counsel and a payment partner lined up
How it works
- Staff build a pack from card rules and turn on price tiers; the solver plans each tier's prize pool and restock commits it with a hash.
- A player picks a pack and tier, sees every card, its odds and stock, and opens with Credit or a card.
- The server re-checks the geo, age and KYC gates, draws the card and captures payment in one transaction.
- The pull lands in the player's inventory, where it can be sold back for Credit or shipped.
- Staff restock packs, handle fulfillment, disputes and sell-back checks from the admin.
Ways to monetize
Revenue comes from the margin between pack prices and the value of the prize pool (the solver targets a payout per open), the spread on card sell-backs, and the stored Credit balance that keeps players on the site.
Technology
TypeScript · Turborepo · NestJS (Fastify) · BullMQ worker · Next.js 16 · Storybook · PostgreSQL with Drizzle · Redis · Stripe · Didit KYC · Cloudflare R2 · OpenAPI-generated client · Playwright · Testcontainers · deployed on Railway, Vercel and Neon
What you get
- Two private TypeScript codebases:
packs-backend(API, worker, admin dashboard and shared packages) and the Next.js consumer site with its design system - About 220 backend test files, Testcontainers integration tests, Playwright end-to-end and accessibility tests and load tests (seller)
- Runbooks, a launch checklist and architecture docs
- 30 days of seller support
Good to know
- Regulation. Paying for a random prize of uncertain value can be treated as gambling, a lottery, a sweepstakes or a loot box depending on the jurisdiction, and the rules are changing. The demo limits play to adults in the 50 U.S. states and D.C., and the admin tracks "GGR", a gambling metric. The code gives you gates and disclosures, not legal clearance: get advice from a lawyer for each market before launch.
- Payment processing. Card processors often restrict or review this category. Confirm that your own Stripe account will be approved for pack sales before relying on card checkout.
- Traction. The seller does not report revenue or users, and the admin overview shows small test-scale numbers. Treat it as a ready-to-launch platform, not a running business.
- Your own accounts. You need your own Stripe, Didit, PriceCharting, Cloudflare R2, Redis and hosting (Railway, Vercel, Neon or equivalents), plus real graded-card inventory, storage and shipping.
- Branding. The demo is branded Yoinks. It is not affiliated with Rips by Triumph; "clone" describes the format only.
- Confirm with the seller: what the $99 maintenance price covers, the state of the Magic, One Piece and Riftbound catalogs, and whether the brand and domain are included.
What's included
- Admin Panel
- Website
Documentation
A buyer pays with Yoinks Credit or by card. Card checkout authorizes a Stripe PaymentIntent, and a signed webhook re-checks every gate, draws the card under a row lock and captures the payment in one transaction. A live service streams inventory changes to pack pages.
Won cards go to inventory. From there the buyer can sell a card back for Credit or ship it. Staff handle fulfillment from an admin queue. Everything is deployed on Railway (API and worker), Vercel (web), Neon (Postgres), Redis and Cloudflare R2.
Support
Included: 30 days
Contact the publisher
Reviews
No reviews yet.