In WordGuesser, you'll be presented with a secret word that you need to guess correctly within a limited number of attempts. Each time you guess a letter, you'll receive feedback on whether the letter is in the word and if it's in the correct position. Use this feedback to strategically deduce the hidden word.
One of the standout features of WordGuesser is its built-in web scraper. The web scraper roams various websites, collecting a treasure trove of words and their definitions. It enriches the game by providing you with not just a list of words but also their meanings. This feature not only enhances your gameplay but also offers a valuable learning experience.
The game allows the User to instantly change the language between Polish and English. Words are also drawn in the Player's chosen language.
These instructions will help you set up and run the project on your local machine.
- Python installed
- Docker (if you plan to use Docker)
1. Clone the repo:
git clone https://github.com/dawidkaplon/WordGuesser.git
cd WordGuesser
2. Create a virtual environment & activate it:
python -m venv venv
venv\Scripts\activate
3. Install project dependencies from requirements.txt:
pip install -r requirements.txt
4. Set the Secret Key
In order to run the local server, You have to set new Secret Key in settings.py file.
- Access the Python Interactive Shell:
python manage.py shell
- Import the get_random_secret_key function:
from django.core.management.utils import get_random_secret_key
- Generate the Secret Key in the Terminal using the get_random_secret_key() function:
>>> get_random_secret_key() 'qw^9ej(l4vq%d_06xig$vw+b(-@#00@8l7jlv77=sq5r_sf3nu'
- Copy and Paste the Key into your SECRET_KEY variable in the settings.py:
SECRET_KEY = 'qw^9ej(l4vq%d_06xig$vw+b(-@#00@8l7jlv77=sq5r_sf3nu'
5. Exit the shell using exit() and then make necessary migrations:
python manage.py makemigrations
python manage.py migrate
6. Run the local server:
python manage.py runserver
Now You should be able to get some response using localhost:8000
Run unit tests with:
python manage.py test
To run the commands below, you need to be in directory where the Dockerfile is located
- Build the image locally with the following command:
docker build -t wordguesser .
- Run the Docker container:
docker run -p 8000:8000 wordguesser
- Quality can be poor due to GIF compression
- For better view please check the screenshots below
- Main gameplay
- Start of the game
- The mid-game
- Index page (English language)
- Index page (Polish language)
- Navbar extended
- Single User's statistics
- Single User's drawn words
- Last words drawn by users (both authenticated and not authenticated). User's email data is restricted to superuser only
- Win page
- Improve swagger docs
- Secure endpoints with user authentication
- Create custom permission classes
- Switch to PostgreSQL database
- Create docker migrations service
- Change these terrible sounds or completely remove them
- Also visual changes should be made
- Add pre-commit hook