TCG Vault - Trading Card Game Collection Management with OCR Scanning
Closes P0 ship-blocker #8 from .convoys/ship-readiness.md. Vercel has been refusing every deployment since 2025-08-01 with "Vulnerable version of Next.js detected, please update immediately" — this bump clears that platform gate and unblocks every downstream preview-smoke and visual-diff gate that depends on a live preview URL. Changes (per Brief 1 acceptance criteria, all four gate-1 decisions applied — see .convoys/bump-next-js.md § Decisions for the audit trail): - next: ^15.4.2 -> ^16.2.6 (resolves next@16.2.6) - eslint: ^8 -> ^9.39.4 (Decision D fallback; v10 surfaced Risk R15 empirically — @typescript-eslint/scope-manager@8.59.4 bundled by eslint-config-next@16 doesn't implement v10's new addGlobals API) - eslint-config-next: 15.4.2 -> ^16.2.6 - typescript: newly added at ^5.9.3 as a devDep (Decision C; required by typescript-eslint chain regardless of ESLint major) - scripts.lint: "next lint" -> "eslint ." (next lint removed in 16) - next.config.js: images.domains -> images.remotePatterns (deprecated and removed in Next 16; preserves the three CDN hosts Scryfall, Pokemon TCG, Lorcana API for eventual next/image adoption) - .eslintrc.json deleted (eslint-config-next@16 is flat-config-only) - eslint.config.mjs added (verbatim shape from Next docs; verified forward-compatible with v10 so bump-eslint-10 will not need to touch this file) Out of scope (deferred to dedicated convoys): - React 18 -> 19 (bump-react) - App Router migration (multi-month effort) - Test runner adoption (adopt-vitest, adopt-playwright-smoke) - Lint baseline cleanup (fix-lint-baseline) — new v9 baseline is 128 problems (81 errors, 47 warnings), up from prior ~100 due to eslint-plugin-react-hooks@7.1.1 + @next/eslint-plugin-next@16.2.6 rule additions - ESLint v10 adoption (bump-eslint-10) — upstream-blocked on typescript-eslint shipping a v10-tested release that eslint-config-next then bundles - TypeScript 6 adoption (bump-typescript-6) — same upstream block Local verification: - npm install: clean, no ERESOLVE warnings - npm run build: exit 0, Next 16.2.6 (Turbopack), ~1.4s compile, 23 static pages + 47 API routes, no images.domains deprecation - npm run lint: exit 1, 128 problems, runs to completion (tolerated by CI's `|| true` wrapper; new baseline for fix-lint-baseline) Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|---|---|---|
| .convoys | ||
| .cursor | ||
| .github | ||
| components | ||
| docs | ||
| lib | ||
| pages | ||
| public | ||
| scripts | ||
| styles | ||
| tests/smoke | ||
| .agent-context-manifest.yml | ||
| .gitignore | ||
| .npmrc | ||
| AGENTS.md | ||
| eslint.config.mjs | ||
| next.config.js | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| TESTING_GUIDE.md | ||
| vercel.json | ||
TCG Vault
A modern trading card game collection manager built with Next.js and Neon Database.
🚀 Features
- Card Management: Track your MTG, Pokémon, and Lorcana cards
- Collection Organization: Create and manage card collections
- Deck Building: Build and share decks
- Authentication: Secure user accounts with JWT
- Admin Panel: Manage cards and users
- Real-time Pricing: Track card values
🛠️ Tech Stack
- Frontend: Next.js 15, React 18, TypeScript
- Backend: Next.js API Routes
- Database: Neon PostgreSQL (serverless)
- Authentication: JWT with bcrypt
- Styling: Tailwind CSS
- Deployment: Vercel
📦 Installation
-
Clone the repository
git clone <repository-url> cd tcg-vault -
Install dependencies
npm install -
Set up environment variables
cp .env.example .env.localUpdate
.env.localwith your Neon database URL:POSTGRES_URL="postgresql://your-username:your-password@your-host/your-database" JWT_SECRET="your-super-secret-jwt-key" -
Set up the database
npm run setup-db -
Start development server
npm run dev
🗄️ Database Schema
The application uses the following tables:
users- User accounts and authenticationcards- Card information and metadatauser_cards- User's card collectionscollections- Named card collectionscollection_cards- Cards in collectionsdecks- Deck definitionsdeck_cards- Cards in decks
🔧 API Endpoints
Authentication
POST /api/auth/register- User registrationPOST /api/auth/login- User login
Admin
GET /api/admin- Admin panel data
Health Check
GET /api/health- Application healthGET /api/test-db- Database connection test
🚀 Deployment
This app is configured for deployment on Vercel:
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
📁 Project Structure
tcg-vault/
├── pages/ # Next.js pages and API routes
│ ├── api/ # API endpoints
│ │ ├── auth/ # Authentication routes
│ │ └── admin/ # Admin routes
│ ├── _app.js # App wrapper
│ └── index.js # Home page
├── lib/ # Utility libraries
│ └── database.js # Database adapter
├── scripts/ # Database setup scripts
├── public/ # Static assets
└── .env.local # Environment variables
🔐 Default Admin Account
After running the database setup:
- Email: admin@tcgvault.com
- Password: admin123
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
📄 License
MIT License - see LICENSE file for details