2ec940f00454acdca2e3fab78b52a9e91385e55d
EuchreCamp
A comprehensive tournament management and partnership analytics system for the card game Euchre, built with Next.js, TypeScript, and Prisma.
Overview
EuchreCamp is a full-stack web application that provides:
- Tournament Management: Create and manage round-robin, single elimination, double elimination, and Swiss-style tournaments
- Partnership Analytics: Track partnership performance, win rates, and Elo changes between players
- Player Profiles: Display individual player statistics and partnership breakdowns
- Admin Dashboard: Centralized management interface for tournaments, players, and matches
- CSV Import: Batch import match results from CSV files
- Authentication & Authorization: Role-based access control with player, tournament_admin, and club_admin roles
Tech Stack
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Database: Prisma ORM with SQLite
- Styling: Tailwind CSS
- Authentication: NextAuth.js
- Form Handling: React Hook Form + Zod validation
- CSV Parsing: PapaParse
Project Structure
euchre_camp/
├── src/
│ ├── app/
│ │ ├── api/ # API routes
│ │ ├── auth/ # Authentication pages
│ │ ├── admin/ # Admin pages
│ │ ├── players/ # Player pages
│ │ ├── components/ # Shared components
│ │ └── lib/ # Utilities and configuration
│ └── types/ # TypeScript type definitions
├── prisma/ # Prisma schema and migrations
├── docs/ # Documentation
└── public/ # Static assets
Features Implemented
Epic 1: Authentication & User Management
- User registration with email confirmation
- Login with credentials
- Password reset flow
- Session management with JWT
- Role-based access control
Epic 2: Player Profile & Analytics
- Player profile page with statistics
- Partnership performance table
- Win rate and Elo display
Epic 3: Rankings & Public Data
- Player rankings page
- Sortable rankings table
- Public player profiles
Epic 4: Tournament Management
- Create tournaments
- Manage participants
- Create teams
- View tournament details
Epic 5: Match Recording & CSV Import
- Record match results via API
- CSV upload for batch processing
- Automatic Elo calculation
- Partnership tracking
Getting Started
Prerequisites
- Node.js 22+
- npm or yarn
Installation
-
Clone the repository
git clone <repository-url> cd euchre_camp -
Install dependencies
npm install -
Set up the database
npx prisma db push -
Start the development server
npm run dev
Environment Variables
Create a .env file:
DATABASE_URL="file:./dev.db"
NEXTAUTH_SECRET="your-secret-key-here"
NEXTAUTH_URL="http://localhost:3000"
Usage
Creating a Tournament
- Navigate to
/admin/tournaments - Click "Create Tournament"
- Fill in tournament details
Uploading Match Results via CSV
- Navigate to
/admin/matches/upload - Select a tournament
- Upload CSV file with Euchre format
Viewing Player Profiles
Navigate to /players/[id]/profile to see statistics, partnerships, and recent games.
API Endpoints
Tournaments
GET /api/tournaments- List all tournamentsPOST /api/tournaments- Create new tournamentGET /api/tournaments/[id]- Get tournament details
Matches
GET /api/matches- List matchesPOST /api/matches- Create match resultPOST /api/matches/upload- Upload CSV with match results
Development
# Development mode
npm run dev
# Production build
npm run build
npm start
User Stories
User stories are organized into epics in docs/USER_STORIES.md:
- Authentication & User Management
- Player Profile & Analytics
- Rankings & Public Data
- Tournament Management
- Match Recording & CSV Import
- Club Administration
- Mobile Responsiveness
- Data Management & Export
License
MIT License
Description
Releases
1
Release v0.1.0
Latest
Languages
TypeScript
88.4%
JavaScript
8.2%
Gherkin
1.6%
Just
0.9%
Shell
0.5%
Other
0.3%