Gotta Catch 'Em All!
This is an experiment using Create React App and Netlify Functions.
It's a fun little game that gives points to the player for every member of a GitHub organization they can name.
To run the application locally:
-
Clone this repository
-
Install the dependencies
yarn
-
Start the application in development mode
yarn start
The application gets its data from the GitHub API. It can do so via unauthenticated requests, but that way you'll hit the rate limits of the API pretty quickly. Alternatively, players can sign in using their GitHub accounts, which offers a much more generous allowance of requests.
This is done using a GitHub app, configuring using the GITHUB_APP_CLIENT_ID
, REACT_APP_GITHUB_APP_CLIENT_ID
, andGITHUB_APP_CLIENT_SECRET
environment variables (REACT_APP_GITHUB_APP_CLIENT_ID
is the same as GITHUB_APP_CLIENT_ID
, but it's accessible in the React application).
To run the application locally, you can place these variables in a .env
file — but make sure not to commit your secrets to a public repository! Alternatively, you can configure the variables on Netlify and run the application using Netlify Dev, which will inject the variables for you automatically.