CLAUDE.mdtypescript
3point-game-nhl-standing CLAUDE.md
This project showcases what NHL standings would look like using a 3-point system (following IIHF rules) instead of the current NHL 2-point system. The goal is to provide a more balanced standings representation that doesn't artificially narrow the gap between teams.
NHL 3-Point System Project
Project Overview
This project showcases what NHL standings would look like using a 3-point system (following IIHF rules) instead of the current NHL 2-point system. The goal is to provide a more balanced standings representation that doesn't artificially narrow the gap between teams.
Current Status: Backend complete, frontend in development using Svelte + GraphQL
Architecture
- Backend: GraphQL server using Fastify + Mercurius
- Frontend: SvelteKit application with TypeScript
- Data Source: NHL API integration
- Styling: TailwindCSS + DaisyUI
Key Commands
Root Level
npm run build: Compile TypeScriptnpm run test: Run Jest testsnpm run lint: Run ESLint on source and test filesnpm run fetch: Clean, build, and fetch NHL datanpm run init: Initialize data pipelinenpm run complete-build: Full clean build with tests
GraphQL Server (graphql-server/)
npm start: Start server with ts-nodenpm run dev: Start with nodemon for developmentnpm test: Run GraphQL server tests
Frontend (frontend/)
npm run dev: Start Vite development servernpm run build: Build for productionnpm run check: Run svelte-check with TypeScript
Directory Structure
graphql-server/: GraphQL API server (Fastify + Mercurius)frontend/: SvelteKit frontenddoc/: NHL API documentation and OpenAPI specsdist/: Compiled TypeScript output
Development Notes
Scoring System
- Win: 3 points (vs 2 in current NHL)
- OT/SO Loss: 1 point (same as current)
- Loss: 0 points (same as current)
Key Features
- Multiple view types (divisions, conferences, league-wide)
- Real-time NHL data integration
- Responsive design with modern UI components
- GraphQL API for efficient data fetching
Tech Stack Details
- Backend: TypeScript, Fastify, Mercurius GraphQL, Axios
- Frontend: SvelteKit, TypeScript, TailwindCSS, DaisyUI, URQL GraphQL client
- Testing: Jest for both backend and frontend
- Build Tools: Vite, TypeScript compiler
Current Branch Status
Working on GraphQL branch with recent changes to:
frontend/src/api/standingsAPI.tsgraphql-server/src/config.ts
API Resources
- NHL API documentation in
doc/directory - OpenAPI specification:
doc/wsr.nhle.com.swagger.json - References Drew Hynes' NHL API documentation
Contributing
Open to contributions - see main README for contact information and acknowledgements.