Skip to content

samigulec/Scout-Team

Repository files navigation

Pitchwise

Data-driven scouting for the world's top leagues — built for serious clubs, scouts, and analysts. Avrupa'nın 5 büyük liginde veri odaklı oyuncu taraması.

English · Türkçe


English

What it does

Pitchwise helps clubs find the missing piece in their squad:

  • Squad gap analysis — interactive pitch view shows positional depth and weak areas
  • Smart matching — position-specific weighted metrics produce a transparent, explainable 0–100 fit score (no black box)
  • Per-player reports — radar chart, last-6-match form, fit breakdown, scouting summary, similar players
  • Bilingual — Turkish and English (URL-prefixed locales)
  • Top 5 leagues — Premier League, La Liga, Serie A, Bundesliga, Ligue 1

Stack

  • Next.js 15 (App Router) + TypeScript strict
  • Tailwind CSS + custom UI primitives
  • Prisma ORM (SQLite for local dev, swap to PostgreSQL/Neon in prod)
  • next-intl for i18n
  • Recharts for radar/line charts; custom SVG pitch view
  • Vitest for unit tests · GitHub Actions for CI

Getting started

Pitchwise uses PostgreSQL (we recommend Neon — free tier is plenty).

# 1. Install
npm install

# 2. Create a Neon project, copy the direct connection string into .env
cp .env.example .env
# Edit DATABASE_URL with your Neon connection string (the *direct* one,
# not the pooled -pooler. host — db push needs DDL).

# 3. Push schema + seed
npm run db:push
npm run db:seed

# 4. Run dev server
npm run dev
# → http://localhost:3000  (redirects to /tr)

Deploying to Vercel

  1. Create a Neon Postgres project (https://neon.tech)
  2. In Vercel project settings → Environment Variables, add DATABASE_URL with the direct (unpooled) Neon connection string. Apply to all environments (Production / Preview / Development).
  3. Push to the deploy branch. vercel.json runs: prisma generate && prisma db push --accept-data-loss && next build
  4. After first deploy, seed the production DB:
    vercel env pull .env.production.local
    DATABASE_URL=$(grep ^DATABASE_URL .env.production.local | cut -d'=' -f2- | tr -d '"') npm run db:seed

Scaling note: when you outgrow direct connections, switch DATABASE_URL to the pooled Neon URL and add DIRECT_URL (unpooled) plus directUrl = env("DIRECT_URL") back into schema.prisma for migrations. Then replace db push with versioned prisma migrate deploy.

Scripts

Script What
npm run dev Next.js dev server
npm run build Production build
npm run typecheck tsc --noEmit
npm run lint ESLint
npm test Vitest
npm run db:push Apply schema to dev DB
npm run db:seed Seed with top-5-league sample
npm run db:studio Prisma Studio GUI

Project layout

src/
  app/[locale]/        # Next.js routes (TR/EN)
    page.tsx           # Landing
    dashboard/         # Squad gap analysis
    scout/             # Player search + match score
    player/[id]/       # Player profile + radar + report
  components/
    charts/            # Radar, form line, pitch SVG
    ui/                # Card, badge, select, input
  lib/
    db.ts              # Prisma client
    positions.ts       # Position taxonomy + pitch coords
    scoring.ts         # Position-weighted fit score (transparent)
    utils.ts           # Helpers (age, currency, cn)
  i18n/                # next-intl routing/request config
  middleware.ts        # Locale routing
prisma/
  schema.prisma        # Player, Team, League, Stats, Report, Match
  seed.ts              # Seed script (~30 elite players)
messages/
  tr.json · en.json

Roadmap

  • Phase 2: Auth.js (club/scout roles), licensed data feed (API-Football / SportMonks), PostgreSQL + Neon
  • Phase 3: "Style DNA" embedding search, budget optimization, injury-risk scoring, formation-fit analysis
  • Phase 4: Multi-club workspaces, shared shortlists, collaborative scout reports

Data disclaimer

The seed data is a hand-curated 2023/24 sample for demo and development purposes. It is not authoritative — production deployments should integrate with a licensed provider.

License

Proprietary — all rights reserved.


Türkçe

Ne yapar

Pitchwise, kulüplerin kadrolarındaki eksik parçayı bulmasına yardımcı olur:

  • Kadro boşluk analizi — interaktif saha görünümü pozisyon derinliğini ve zayıf alanları gösterir
  • Akıllı eşleştirme — pozisyona özgü ağırlıklı metriklerle şeffaf ve açıklanabilir 0–100 uyum skoru (kara kutu yok)
  • Oyuncu başına rapor — radar grafiği, son 6 maç formu, skor kırılımı, scout özeti, benzer oyuncular
  • İki dilli — Türkçe ve İngilizce (URL bazlı locale)
  • 5 büyük lig — Premier League, La Liga, Serie A, Bundesliga, Ligue 1

Kurulum

npm install
cp .env.example .env
npm run db:push
npm run db:seed
npm run dev
# → http://localhost:3000

Yol haritası

  • Faz 2: Auth.js (kulüp/scout rolleri), lisanslı veri sağlayıcı entegrasyonu, PostgreSQL + Neon
  • Faz 3: "Style DNA" embedding araması, bütçe optimizasyonu, sakatlık riski skoru, taktik şema uyumu
  • Faz 4: Çoklu kulüp çalışma alanları, paylaşımlı listeler, ortak scout raporları

Veri uyarısı

Seed verisi 2023/24 sezonundan elle hazırlanmış demo örneğidir, otoriter değildir. Üretim sürümünde lisanslı sağlayıcı entegrasyonu önerilir.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors