Hockey Pool is an application where you compete with fellow fans to predict the NHL tournaments outcomes and vie for ultimate glory. 🏒🥅
Hockey Pool is a web application built with Next.js, Express.js, Prisma, Redis and PostgreSQL. It is a full stack application that allows users to create an account, join a pool, and make predictions on the outcomes of NHL tournaments. The application is deployed on Digital Ocean and Vercel can be found at hockeypool.xyz.
Every night the application will fetch the latest NHL tournament games and update the database. The application will then calculate the points for each user based on their predictions and the actual outcomes of the games. The user with the most points at the end of the tournament wins the pool.
- Create an account
- Join a pool
- Make predictions on the outcomes of NHL tournaments
- View the leaderboard to see how you stack up against the competition
- View the schedule of upcoming games
- View the results of past games
- View the results of past tournaments
-
Clone the repo
git clone https://github.com/owen-duncan-snobel/hockey-pool
-
Install dependencies (Server and Client)
cd packages/server/ && pnpm install
and
cd packages/www && pnpm install
-
Copy the .env.example file and rename it to .env and fill in the environment variables with your own values.
cp .env.example .env
-
Build the docker container for the packages/server
pnpm run docker:build
-
Start the docker container for the packages/server
pnpm run docker:up
-
Run the migrations
npx prisma migrate dev
-
Seed the database
-
Start the /packages/www client
pnpm run dev
-
Open http://localhost:3000 with your browser to see the client result.
-
Optional: Start the /packages/www storybook server
pnpm run storybook
and open http://localhost:6006 with your browser to see the storybook stories.
- Run the tests
pnpm run test
- Optional: Backup hockeypool db
- Run
psql
then,drop database hockeypool
- Next run,
create database hockeypool
- Exit psql and from cli run
psql -d hockeypool -a -f hockey_pool.sql
to load the db dump - verify that the dump has loaded correctly
More detailed instructions for the server can be viewed in the server README.
- Onboard all manual Users
- Load users picks from Excel from previous years
- Add Chat features
- Add User Dashboard to view all past picks and results
- Email remainders
- Stripe Integration
- 2024 Playoff Launch
This project is not affiliated with the NHL or any of its affiliates. All NHL logos and marks and NHL team logos and marks depicted herein are the property of the NHL and the respective teams and may not be reproduced without the prior written consent of NHL Enterprises, L.P. © NHL 2021. All Rights Reserved.
The NHL has not reviewed or approved this project or its contents and the NHL is not responsible for the content of this project. The API data comes from the NHL API but is not endorsed or certified by the NHL.