Monorepo for a game inventory app: track editions and owned copies, pull PriceCharting market snapshots, and record purchases and sales.
Stack: pnpm workspace · NestJS API + Prisma + PostgreSQL · TanStack Start (React) frontend + Panda CSS.
- Node.js (LTS recommended)
- pnpm — install globally (
npm install -g pnpm) or enable via Corepack - PostgreSQL — required locally so Prisma can connect and run migrations. Install the server, start it, and create a database (example below).
Install PostgreSQL for your OS, ensure the service is running, then create a database for this project (name can match your DATABASE_URL):
CREATE DATABASE gettin_paid;The default connection string in .env.example assumes:
- host
localhost, port5432 - user
postgres, passwordpostgres - database
gettin_paid
Adjust DATABASE_URL if your install differs.
From the repository root:
pnpm installThis runs prisma generate for the backend (postinstall). If that fails on Windows (file locks), run:
pnpm --filter @gettin-paid/backend exec prisma generateCopy the templates and edit values:
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.envYou can also copy the root .env.example for a single reference file — Nest/Prisma load backend/.env, not the repo root, unless you export variables yourself.
pnpm db:migrateFor a fresh dev database you can use Prisma migrate dev from the backend package instead:
pnpm --filter @gettin-paid/backend exec prisma migrate devStarts the API (default port 4000) and the frontend (default port 3000) together:
pnpm dev- Frontend: http://localhost:3000
- API: http://localhost:4000 · routes are under
/api(e.g.GET http://localhost:4000/api/editions)
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | PostgreSQL connection string for Prisma (postgresql://USER:PASSWORD@HOST:PORT/DATABASE). |
PORT |
No | API listen port; default 4000. |
FRONTEND_URL |
No | Browser origin for CORS (e.g. http://localhost:3000). Use comma-separated values if you need more than one. |
PRICECHARTING_API_TOKEN |
No | Enables PriceCharting API calls (product lookup, market refresh). If unset, those features fail or skip where documented. |
PRICECHARTING_MIN_INTERVAL_MS |
No | Minimum delay between outbound PriceCharting requests (ms). Backend enforces at least 2000; default 2000. |
COVER_STORAGE_PATH |
No | Directory for scraped cover images (default backend/storage/covers relative to cwd). Files are named {priceChartingProductId}.{ext} so they are portable with the PriceCharting id, not the internal edition UUID. Ignored by git. |
COVER_SCRAPE_MIN_INTERVAL_MS |
No | Delay between editions when running Fetch all covers (default 2000, minimum 200). |
Only variables prefixed with VITE_ are available in the browser.
| Variable | Required | Description |
|---|---|---|
VITE_API_URL |
Yes (for API calls) | Base URL of the Nest API without a path suffix. The client calls ${VITE_API_URL}/api/.... Default in template: http://localhost:4000. |
See .env.example at the repo root for notes including optional deployment (e.g. Railway).
| Script | Purpose |
|---|---|
pnpm dev |
Frontend + backend in parallel |
pnpm dev:frontend / pnpm dev:api |
One package only |
pnpm build |
Shared package → backend → frontend |
pnpm db:migrate |
prisma migrate deploy (backend) |
pnpm db:generate |
Regenerate Prisma Client |
pnpm lint / pnpm format / pnpm check |
Biome across the repo |
Backend-only scripts (e.g. one-off CSV → SQL import) are in backend/package.json.
pnpm buildRun outputs depend on each package (Nest dist/, TanStack Start .output/, etc.).
This repo uses Biome:
pnpm lint
pnpm format
pnpm check