How jakobwiley/cd-golf-league works
Project type and purpose
• This is a full-stack web application built with Next.js (App Router) for managing a golf league: schedules, scores, real-time updates, standings, and admin.
• It uses a serverless deployment model (Vercel), a Postgres database (Supabase), Prisma/Supabase ORM, and integrates with an external GHIN service for handicap data.
File structure
• Top-level “app/” contains Next.js routes: UI pages (.tsx), API endpoints (app/api/*), hooks, components, lib utilities, and middleware.
• “lib/” and “app/lib/” hold shared utility code: database client wrappers, GHIN adapter, scoring logic.
• “scripts/” drives build, deployment, maintenance, and data-migration tasks.
• “supabase/” holds database migrations.
• Root has configuration: next.config.js, vercel.json, .env.* examples, TypeScript and Jest config.
README for additional insights
• Confirms Prisma ORM (or Supabase) models: Team, Player, Match, MatchScore, MatchPoints, MatchPlayer.
• Real-time updates via Socket.io or Supabase Realtime.
• Admin cron routes for scheduled data fixes or migrations.
• Development uses mock data file; production uses real Postgres.