Skip to content

LucasWinkler/rankguess

Repository files navigation

MIT License


rankguess logo

Guess the rank of user submitted clips from Apex Legends, CSGO, League of Legends, and more!

rankguess ui design

Table of Contents

About

A web-based game where players can pick their favourite game and guess the rank of user submitted footage. Players can only guess on each game daily. Account creation will allow them to submit their own footage for review. If accepted they will be featured in the game.

Getting Started

Follow these steps in order to get the website up and running locally on your machine.

Prerequisites

Here's what you need to be able to run RankGuess.

  • Node.js
  • MySQL (recommended)
  • Google Cloud OAuth Credentials

Development

  1. Clone the repostiory:
https://github.com/LucasWinkler/rankguess.git
  1. Go to the root directory and install the dependencies:
cd rankguess
npm install
  1. Set up your preferred database:

    • Create a local or cloud based MySQL database
      • I'm using Planetscale
      • You can swap this out for other options if preferred
  2. Create your environment variables:

    • Duplicate the .env.example and rename it to .env.local
    • Fill in all of the environment variables
  3. Synchronize your Prisma Schema with your database and generate the Prisma Client:

    • migrate is not recommended for Planetscale
npm run db:push
  1. Seed the database:
npm run db:seed
  1. Start the development server:
npm run dev
  1. Heads up, the custom npm scripts in the package.json that use dotenv are required for local development

Production

  1. Host on your preferred platform.

    • For simplicity I use:
      • Website: Vercel
      • Database: Planetscale
  2. Set up your .env for your preferred platform following similar steps to development

    • You'll need to ensure the NEXTAUTH_URL is set to your domain and not localhost:3000
    • You'll also need to make sure that your Google Cloud Credentials include your domain instead of localhost:3000
  3. Change the build command:

    • This command will generate the Prisma Client, seed the database and generate an optimized build
npm run production:build

Credits

Inspired by various Guess The Rank styled games and daily games such as Wordle.

Contact

License

Distributed under the MIT License. See LICENSE for more information.