A modern Magic: The Gathering marketplace and collection management platform where players can buy, sell, and organize their card collections in digital binders.
- 🃏 Card Marketplace - Buy and sell Magic: The Gathering cards with other players
- 📚 Digital Binders - Create and organize your personal card collection in customizable binders
- 🔍 Advanced Search - Find cards quickly with powerful filtering and search capabilities
- 🌐 Multi-language Support - Available in multiple languages
- 🌓 Dark Mode - Toggle between light and dark themes for comfortable viewing
- 📱 Responsive Design - Seamless experience across desktop, tablet, and mobile devices
- Framework: Next.js 16 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Database: PostgreSQL with Slonik SQL
- API: tRPC for type-safe API routes
- Card Data: Scryfall API integration (Self-hosted, periodically refresh w/ their API)
- Package Manager: pnpm
- Monorepo: Turborepo
- Node.js 20+
- pnpm 9+
- Docker (or Podman)
- Clone the repository:
git clone https://github.com/yourusername/trade-binder.git
cd trade-binder- Install dependencies:
pnpm install- Start developing:
pnpm devThat's it! The pnpm dev command will automatically:
- Create a
.envfile with default database configuration (if it doesn't exist) - Start a PostgreSQL database in Docker
- Run database migrations
- Start the development server
Open http://localhost:3000 to see your application.
If you need to set up the database separately:
pnpm setup-db # Start database + run migrationsOr use the individual commands in apps/web/:
pnpm start-docker # Start only the database container
pnpm migrate # Run migrations
pnpm migrate:status # Check migration status
pnpm migrate:rollback # Rollback last migrationRoot (monorepo):
pnpm dev- Start database, run migrations, and start dev serverpnpm build- Build for productionpnpm lint- Run ESLintpnpm setup-db- Start database and run migrations only
Web app (apps/web/):
pnpm dev- Start development server (without database setup)pnpm start-docker- Start PostgreSQL containerpnpm restart-docker- Restart PostgreSQL containerpnpm migrate- Run database migrationspnpm import-cards- Import card data from Scryfall
trade-binder/
├── apps/
│ └── web/ # Next.js application
│ ├── src/
│ │ ├── app/ # App router pages
│ │ ├── components/ # React components
│ │ ├── lib/ # Utilities and configurations
│ │ └── server/ # tRPC routers and database
│ └── public/ # Static assets
├── packages/ # Shared packages (if any)
└── turbo.json # Turborepo configuration
Note: This project is not affiliated with or endorsed by Wizards of the Coast.