Skip to content

insanekrishnna/polymatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

Polymatch

<<<<<<< HEAD Predict the FIFA World Cup 2026, build your bracket and compete with your friends.

Next.js React TypeScript Prisma Tailwind CSS License: MIT


About the Project

Polymatch is a multiplayer web application (pool/prediction game) to predict the FIFA World Cup 2026 (USA · Canada · Mexico). Participants predict scores for all 104 matches, build their knockout bracket, and compete for the top ranking.

Designed for playing with friends, with a transparent scoring system and a football-inspired design centered on the tournament experience.

Features

  • Match predictions for all 104 matches (12 groups of 4 + knockout stages).
  • Knockout bracket generated from your predictions (Round of 32 → Final).
  • Individual awards: Top Scorer, Top Assist, Best Player, Best Goalkeeper, Champion and Runner-up.
  • Live leaderboard with transparent scoring system visible to users.
  • Official calendar with venues, times and timezones.
  • Authentication with username and password (NextAuth).
  • Admin panel for tournament results and awards.
  • SEO optimized (OpenGraph, sitemap, robots, JSON-LD SportsEvent).
  • Dark-first design inspired by the 2026 World Cup visual identity.

Tech Stack

Layer Technology
Framework Next.js 16 (App Router)
Language TypeScript 5
UI React 19 · Tailwind CSS 4 · shadcn/ui
Database PostgreSQL 17
ORM Prisma 7
Authentication NextAuth v5 + Prisma Adapter
Validation Zod 4
Icons lucide-react · flag-icons

Getting Started

Prerequisites

  • Node.js 20+
  • PostgreSQL 17 running locally or remotely
  • npm (or pnpm / yarn / bun)

Installation

# 1. Clone the repository
git clone https://github.com/DavidSepulvedaCh/Polymatch.git
cd Polymatch

# 2. Install dependencies (triggers prisma generate in postinstall)
npm install

# 3. Copy environment variables and adjust them
cp .env.example .env

# 4. Apply migrations
npm run db:migrate

# 5. Populate with official FIFA data (teams, groups, schedule)
npm run db:seed

# 6. Start the dev server
npm run dev

Open http://localhost:3000 to see the application.

Environment Variables

Variable Description
DATABASE_URL PostgreSQL connection string (Prisma).
NEXT_PUBLIC_SITE_URL Canonical public site URL, without trailing slash. Used for SEO metadata, sitemap.xml, robots.txt and OpenGraph.

See .env.example as a template.

Available Scripts

Script Description
npm run dev Start the development server with hot reload.
npm run build Build the application for production.
npm start Serve the production build.
npm run lint Run ESLint on the project.
npm run db:migrate Apply Prisma migrations in development.
npm run db:push Sync schema with database without migrations.
npm run db:studio Open Prisma Studio to inspect the database.
npm run db:seed Load official FIFA data (teams, groups, matches).

Project Structure

src/
├── app/                   # Routes (App Router)
│   ├── admin/             # Admin panel
│   ├── api/               # Route handlers (NextAuth, etc.)
│   ├── fixtures/          # Match schedule
│   ├── predictions/       # User predictions and bracket
│   ├── ranking/           # Leaderboard
│   ├── login/ · register/ # Authentication
│   ├── settings/          # User preferences
│   ├── opengraph-image.tsx  # Dynamic OG image
│   ├── icon.png · apple-icon.png
│   ├── robots.ts · sitemap.ts
│   └── layout.tsx · page.tsx
├── components/            # Reusable UI components
├── lib/                   # Utilities (prisma, session, datetime, ...)
└── types/                 # Shared types

prisma/
├── schema.prisma          # Data model
├── migrations/            # Versioned migrations
├── seed.ts                # Seed script
└── fifa-data.ts           # Official FIFA 2026 data

Deployment

The application is optimized for Vercel, but runs on any Node.js-compatible platform.

  1. Provision a PostgreSQL database (Neon, Supabase, Railway, etc.).
  2. Configure DATABASE_URL and NEXT_PUBLIC_SITE_URL in the production environment.
  3. Run prisma migrate deploy as a pre-build step.
  4. npm run build && npm start.

Contributing

This is a personal project, but suggestions and bug reports are welcome via Issues or Pull Requests.

License

Distributed under the MIT license. See LICENSE for more information.


"FIFA", "FIFA World Cup" and associated trademarks are property of FIFA. This project is not officially affiliated with or endorsed by FIFA.

Releases

No releases published

Packages

 
 
 

Contributors