This is a clone of the famous wordle game. It lets the user guess a word and allows them to select wether duplicate letters are allowed or not and what length of the word they want to guess. When the user guesses a word correctly they can submit a highscore.
This project is boot-strapped with Create React App and developed with TypeScript.
By using Express, React, Node.js and MongoDB this is a fullstack app with support for cloud database.
To run the app locally without database, clone this repo and run the following commands in the terminal:
npm install
npm start-backend
Then go to localhost:5080/ and try it out.
To run with MongoDBs cloud database Atlas you need to create a .env
file and set the
MONGODB_URI
MONGODB_URI = mongodb+srv://user:password@your-database.mongodb.net/your-collection
Then start the app like normally with
npm start-backend
The build command builds resources in ./src
and copies required resources to /backend/static/
.
npm run build
Sends input settings to server and receives an game id in return.
Stores game Id on server.
Submits a guess and checks if it is correct.
Adds guess to game object matching the id.
Returns matching letters and wether the word submitted is correct or not.
Submits a new highscore to the database.
Is only allowed if the game is finished(the correct word has been properly guessed).
Returns the highscore entry.
Gets all submitted highscores from the database.
It doesnt filter or sort at the moment.