Every Wordle variation I tried had an easy way to cheat for the answers, but not this one!
Features a Daily Challenge with Global Stats, a Free Play mode with shareable links and an Adversarial mode.
Create a .env.development.local
and follow the variable names based on .env.TEMPLATE
.
This project utilizes MongoDB as the database, with Mongoose as the ORM.
Set DB_CONN_STRING
pointing to your MongoDB instance.
You can use MongoDB Atlas to create a free MongoDB instance.
The DAILY_SEED
will randomize the list of answers.
VALID_WORDS_SEED
will randomize the codes generated for sharing games.
The seeds can be any random string, so go ahead and change them to something else.
Install the dependencies with yarn
.
Then start the project with yarn run dev
This project uses Jasmine as the testing framework.
Run the tests with yarn run test
.
I recommend the following VSCode extensions to tests easily:
Lint the code with yarn run lint
or yarn run lint-fix
.
Configure the rules by editing .eslintrc
.
Linting also runs on every pull request with GitHub Actions.
You can deploy easily by using Vercel.
You can get the Swagger UI at the main page, http://localhost:3000/
.
The Swagger YAML is also available at /public/swagger.yaml or http://localhost:3000/swagger.yaml
.
Takes a token and returns an ongoing game or a new one if there is none.
You can use the mode parameter to choose the game mode.
This sets your user token in the cookies as well.
Takes a token and a word, and, if there is an ongoing game, adds a guess to the guess list
Takes a token and, if there is an ongoing game, makes a random guess
Takes a token, and if there is an ongoing game, finishes it
Gets a list of statistics about the daily Wordle games, and can take a game number
Takes a token and returns a list of statistics about the player past games