$ npx create-next-app -e https://github.com/TCG-Price-Lookup/nextjs-tcg-starter

Ship a TCG Price App
in Minutes

A production-ready Next.js 16 starter template with live card prices across 8 TCG games. Dark mode, shadcn/ui, ISR caching, server components — all wired up. One-click deploy to Vercel.

Next.js 16 | Tailwind 4 | shadcn/ui | ISR Caching | 8 TCG Games | Server Components Only

What You Get

A complete, working TCG price application — not a barebones scaffold.

Search Across 8 Games

Full-text card search with autocomplete. Filter by game — Pokemon, MTG, Yu-Gi-Oh, and more.

Card Detail Pages

Per-card pages with full price breakdowns by condition, eBay market data, and graded card prices.

Per-Game Browse Pages

Dedicated pages at /games/pokemon, /games/mtg, etc. for browsing by game.

ISR Caching

Incremental Static Regeneration with hourly revalidation — fast pages without burning API quota.

Dark Mode + shadcn/ui

Polished dark mode out of the box. Built on shadcn/ui components with Tailwind 4.

API Key Never Reaches Browser

All data fetching happens in Server Components. Your API key stays on the server — always.

Architecture

Server-first. The API key never touches the client.

architecture server-only
Browser
   │
   │  HTML (no sensitive data)
   ▼
Next.js Server  ←─── ISR cache (revalidate: 3600s)
   │
   │  TCG_API_KEY (env var, server only)
   ▼
TCG Price Lookup API
   │
   │  JSON response
   ▼
Next.js Server
   │
   │  Rendered HTML
   ▼
Browser  (API key never visible)

Routes

Route Page Rendering
/ Homepage with search bar and featured cards ISR
/card/[id] Card detail — prices, conditions, graded data ISR
/games/[game] Browse by game — /games/pokemon, /games/mtg, etc. ISR
/about About page with attribution and API link Static

Quick Start

Four steps from zero to a deployed price app.

01

Get an API Key

Sign up at tcgpricelookup.com. Free tier gives 200 req/day — plenty to get started.

02

Bootstrap

Run the create-next-app command. It clones and sets up the project automatically.

03

Set Env Vars

Copy .env.example to .env.local and add your TCG_API_KEY.

04

Deploy

Push to GitHub and use the Vercel one-click deploy button, or run vercel --prod.

terminal setup
# Bootstrap the project
$ npx create-next-app -e https://github.com/TCG-Price-Lookup/nextjs-tcg-starter my-tcg-app
$ cd my-tcg-app

# Set up environment
$ cp .env.example .env.local
# Add: TCG_API_KEY=your_key_here

# Run locally
$ npm run dev

Why Use a Starter Template?

Building a TCG price application from scratch means wiring up API authentication, handling rate limits, parsing nested response objects, implementing search with pagination, setting up ISR caching to avoid burning through your API quota, and dealing with the dozens of edge cases around card naming, multi-game filtering, and condition-based pricing. That's days of boilerplate before you write a single line of business logic.

The Next.js TCG Starter handles all of this out of the box. Every API call runs through server components so your key never reaches the browser. ISR caching with hourly revalidation means your pages are fast without hitting the API on every request. The search, card detail, and browse pages are already built with shadcn/ui components styled in dark mode. You just add your API key and deploy.

This isn't a toy demo — it's a production-ready foundation. Teams use it to build card shops, portfolio trackers, price comparison tools, and collector communities. Fork it, customize the branding, add your own features, and ship. The architecture is deliberately simple: server components, no client-side state management, no global stores, no magic.

What's Inside

A walkthrough of how the starter uses the TCG Price Lookup SDK.

Search page — app/page.tsx

The homepage reads ?q= and ?game= from the URL and runs a single server-side SDK call. No client-side fetching, no loading spinners, no hydration.

app/page.tsx server component
// Server component — API key stays on the server
import { TcgLookupClient } from "@tcgpricelookup/sdk";

const tcg = new TcgLookupClient({
  apiKey: process.env.TCG_API_KEY!,
});

export default async function SearchPage({ searchParams }) {
  const { q, game } = await searchParams;

  const results = q
    ? await tcg.cards.search({ q, game, limit: 24 })
    : null;

  return <ResultsGrid cards={results?.data} />;
}

Card detail — app/card/[id]/page.tsx

Fetches full pricing data for a single card — TCGPlayer market, low, mid, high, per-condition breakdowns, eBay averages, and graded values (Trader plan). ISR revalidates every hour.

app/card/[id]/page.tsx ISR — revalidate: 3600
export const revalidate = 3600; // Re-fetch prices every hour

export default async function CardPage({ params }) {
  const { id } = await params;
  const card = await tcg.cards.get(id);

  return (
    <div>
      <h1>{card.name}</h1>
      <PriceTable prices={card.prices} />
      <ConditionGrid raw={card.prices.raw} />
      <GradedPrices graded={card.prices.graded} />
    </div>
  );
}

Game browse — app/games/[game]/page.tsx

Per-game browse pages show 24 cards at a time with ISR caching. Navigate to /games/pokemon, /games/mtg, /games/yugioh, or any of the 8 supported games.

app/games/[game]/page.tsx ISR — revalidate: 3600
export const revalidate = 3600;

export default async function GamePage({ params }) {
  const { game } = await params;
  const results = await tcg.cards.search({
    game,
    limit: 24,
  });

  return <CardGrid cards={results.data} game={game} />;
}

Deployment Options

Deploy anywhere that runs Next.js. The only env var you need is TCG_API_KEY.

Vercel

One-click deploy button. Automatic ISR support, edge functions, preview deployments. The recommended option.

vercel --prod

Netlify

Connect your GitHub repo. Set TCG_API_KEY in environment variables. Auto-deploys on push.

netlify deploy --prod

Docker

Build a standalone container. Run on any VPS, AWS ECS, Google Cloud Run, or your own infrastructure.

docker build -t tcg-app .

Self-hosted

Run next build && next start on any Node.js server. PM2, systemd, or your preferred process manager.

next start -p 3000

How to Extend

The starter is a starting point, not a cage. Here are the most common extensions.

Add Price History Charts

Use the /history endpoint (Trader plan) with Recharts or Chart.js to render price trends on the card detail page. Show 7d, 30d, 90d, and 1y price charts with percentage change indicators.

GET /v1/cards/{id}/history?period=30d

Add User Accounts + Watchlists

Pair with Supabase, PlanetScale, or any database to add user authentication, saved searches, watchlists, and portfolio tracking. All API calls stay server-side — the database just stores user preferences and card IDs.

Monetize with Affiliate Links

The card detail page shows real market prices from TCGPlayer and eBay. Add affiliate links to drive click-through revenue. Each card has source data, so you can link directly to where the card is for sale.

Fork as a Single-Game App

Hard-code the game parameter and customize the branding. Deploy as a niche Pokemon price tracker, MTG price checker, or Yu-Gi-Oh! market tool. Same codebase, focused audience.

Add Set Browsing

Use the /v1/sets endpoint to build a set browser. List all sets for a game, show card counts, release dates, and link to per-set card grids. Great for collectors completing sets.

Add Collection Valuation

Use batch lookups (up to 20 cards per request) to value entire collections. Let users add cards to a portfolio, fetch all prices in one API call, and show total collection value with P&L tracking.

Tech Stack

Modern, minimal, production-grade. No unnecessary dependencies.

Technology Version Purpose
Next.js 16 React framework with App Router, server components, ISR
React 19 UI library with server component support
Tailwind CSS 4 Utility-first styling with dark mode
shadcn/ui latest Accessible, customizable UI components
@tcgpricelookup/sdk latest Official TCG Price Lookup API client
TypeScript 5.x Type safety across the entire codebase

Frequently Asked Questions

Do I need a paid API plan to use the starter?
No. The free tier (200 requests/day) is enough for development and personal projects. The starter uses ISR caching with hourly revalidation, so a single page view doesn't trigger an API call every time — it serves from cache. You'll only need the Trader plan ($14.99/mo) if you want eBay prices, graded values, or price history, or if you're building a high-traffic production app.
Can I deploy to something other than Vercel?
Yes. The starter works on any platform that supports Next.js — Netlify, AWS Amplify, Google Cloud Run, Railway, Render, Docker on any VPS, or self-hosted with next start. Vercel's one-click deploy is the fastest path, but there's nothing Vercel-specific in the code.
Is the API key exposed to users?
No, never. All API calls run in server components. The TCG_API_KEY environment variable is only accessible on the server — it never appears in the client bundle, network requests, or rendered HTML. There are no NEXT_PUBLIC_ env vars and no client-side SDK usage.
Can I use this for a commercial product?
The starter template is MIT licensed — use it for anything. However, the TCG Price Lookup API free tier is non-commercial only. For commercial products, you'll need the Trader plan ($14.99/mo) or Business plan ($89.99/mo). See pricing for details.
How do I add more games or features?
All 8 games are already supported — just pass the game parameter when searching. To add features like price history, watchlists, or portfolio tracking, check the API documentation for available endpoints and the JavaScript SDK docs for the full client API.

Related Resources

Ready to build your TCG price app?

One command to bootstrap, one click to deploy. Grab your free API key and ship today.