A beautiful, web-based Wordle game built with Flask, HTML, CSS, and JavaScript.
- Classic Wordle gameplay: guess a 5-letter word in 6 attempts
- Color-coded feedback:
- 🟩 Green: Correct letter in correct position
- 🟨 Yellow: Correct letter in wrong position
- ⬜ Gray: Letter not in the word
- Interactive on-screen keyboard with color feedback
- Physical keyboard support
- Modern, responsive UI design
- Game over modal with win/loss messages
- Create and activate a virtual environment (recommended):
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txtStart the Flask development server:
python -m wordle.appOr:
flask --app wordle.app runThen open your browser and navigate to http://localhost:5000
- Start a new game (or one will start automatically)
- Type a 5-letter word using the on-screen keyboard or your physical keyboard
- Press Enter to submit your guess
- Use the color feedback to refine your next guess:
- Green: The letter is correct and in the right position
- Yellow: The letter is in the word but in a different position
- Gray: The letter is not in the word
- You have 6 attempts to guess the word
- Click "New Game" to start a fresh game anytime
wordle/
├── wordle/
│ ├── __init__.py
│ ├── app.py # Flask application and game logic
│ ├── words.txt # List of target words
│ ├── valid_guesses.txt # List of valid guess words
│ ├── templates/
│ │ └── index.html # Main game page
│ └── static/
│ ├── css/
│ │ └── style.css # Styling
│ └── js/
│ └── game.js # Client-side game logic
├── pyproject.toml
├── requirements.txt
└── README.md
- Python 3.12+
- Flask 3.0.0+
This project is open source and available for personal use.