Practice or Crack the daily Wordle π₯
- Practice Mode: Play unlimited Wordle games with emoji feedback (π©π¨β¬)
- Crack Wordle Mode: Get intelligent suggestions to solve the daily Wordle puzzle
- Physical + On-screen Keyboards: Type with your keyboard or click the on-screen buttons
- Smart Context Switching: Automatically switches between guess and result input
- Smooth Scrolling: Auto-scrolls to relevant sections (suggestions β submit β stats)
- Dark Theme: Beautiful "Shades of Purple" theme with animated backgrounds
- Word List Caching: Caches word list locally for faster subsequent loads (7-day expiration)
- Loading States: Visual feedback with animated spinners and loading messages
- Responsive Design: Works seamlessly on desktop and mobile devices
- Real-time Filtering: Instantly filters and ranks word suggestions
- CLI Mode: Original command-line interface still available
- π³ Production build & deployment using Docker
- π§ͺ Frontend unit tests
- π¨ Shades of Purple theme with animations
- βοΈ React + TypeScript web UI with Vite
- π§ͺ Backend unit tests using unittest + pytest
- π Initial Python script with core functionality
A list of 14,801 valid 5-letter Wordle answers is loaded from wordle_answers.txt. Obtained from dracos/valid-wordle-words.txt.
You can then enter a guess and the corresponding results (g/y/b) to filter down the possible answers.
- g = (correct letter in the correct position)
- y = (correct letter, wrong position)
- b = (letter not in the word, removes all remaining words containing that letter)
There is no limit to the number of guesses you can enter.
Next-word suggestions are ranked by positional and global letter frequency and unique-letter coverage, with a light duplicate-letter penalty and a small vowel bonus when many candidates remain.
Development:
- Node.js 18+ and npm
- Python 3.7+
- Flask and flask-cors (
pip install flask flask-cors)
Production (Docker):
- Docker (v20.10+)
- Docker Compose (v2.0+)
- Install frontend dependencies:
cd web
npm install- Install backend dependencies (from the root directory):
pip install flask flask-cors- (Optional) Configure analytics in
web/.env.local:
# Leave empty to disable analytics during development
VITE_RYBBIT_SCRIPT_URL=
VITE_RYBBIT_SITE_ID=
# For localhost tracking only (do not set in production builds)
# VITE_RYBBIT_API_KEY=rb_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX- Navigate to the docker directory:
cd docker- Configure environment (copy and edit
.env.productionto.env):
cp .env.production .env
# Edit .env to configure CORS and analytics (optional)- Build and start the application:
docker-compose up -d- Access the application at
http://localhost:8080
See docker/README.md for detailed Docker deployment instructions.
You need to run both the Flask API backend and the React frontend.
Quick Start (Single Command)
From the web directory:
npm startThis will start both the Flask API backend and React frontend concurrently.
- API:
http://localhost:5000 - Web Interface:
http://localhost:5173
Manual Start (Separate Terminals)
Alternatively, you can run them separately:
Terminal 1: Start the Flask API
From the root directory:
python api.pyThe API will start on http://localhost:5000
Terminal 2: Start the React Frontend
From the web directory:
npm run devThe web interface will start on http://localhost:5173
The web interface will start on http://localhost:5173
Open your browser and navigate to http://localhost:5173 to use the application.
- Select "Practice Mode" from the main menu
- Type your guess using the on-screen keyboard or your physical keyboard
- Press Enter to submit
- Get instant emoji feedback: π© (correct position), π¨ (wrong position), β¬ (not in word)
- Keep guessing until you find the word!
- Click "New Game" to play again
- Run the play mode:
python crackle.py --play
- Type your guess and press Enter
- See emoji feedback: π©π¨β¬
- Keep guessing until you find the word!
- Select "Crack Wordle" from the main menu
- Type your guess from the actual Wordle game
- Type the result using G (green), Y (yellow), B (black) and press Enter
- See the filtered words and top suggestions
- Click on a suggestion to use it as your next guess
- Repeat until you solve the puzzle!
- Run the crack mode:
python crackle.py --crack
- Type your guess from the actual Wordle game
- Type the result using G (green), Y (yellow), B (black) and press Enter
- See the filtered words and top suggestions
- Click on a suggestion to use it as your next guess
npm run buildThe built files will be in the dist directory.
- Framework: React 19 with TypeScript
- Build Tool: Vite 7
- UI Library: Radix UI Themes 3
- HTTP Client: Axios 1.12
- Styling: CSS with HSL color system
- Testing: Vitest 3, React Testing Library
- Language: Python 3.9+
- Framework: Flask
- CORS: flask-cors
- Linting: Ruff (Python), ESLint (TypeScript)
- Type Checking: mypy (Python), TypeScript
- Testing: pytest (Python), Vitest (Web)
- Pre-commit Hooks: Automated linting, formatting, and testing
- Run everything (lint, type-checks, tests):
pre-commit run --all-files
- Just the unit tests:
pytest
The web interface includes comprehensive unit tests with Vitest and React Testing Library.
Run Tests:
cd web
npm test # Run tests once
npm run test:watch # Run tests in watch mode
npm run test:coverage # Generate coverage reportTest Structure:
Tests are located in web/src/test/ and include 37 tests covering:
- MainMenu.test.tsx (8 tests): Main menu navigation, word list caching, loading states, error handling
- CrackMode.test.tsx (17 tests): Crack Mode functionality, physical keyboard input, on-screen keyboard, guess/result validation, API integration, success/error states, suggestion clicking
- wordListCache.test.ts (12 tests): LocalStorage caching utility, cache expiration (7 days), version validation, error handling
Coverage Goals:
- Statements: > 80%
- Branches: > 75%
- Functions: > 80%
- Lines: > 80%
Additional testing examples, best practices, and debugging tips are available in web/src/test/README.md
crackle/
βββ crackle.py # Python CLI implementation
βββ api.py # Flask API backend
βββ wordle_answers.txt # 14,801 valid 5-letter words
βββ tests/ # Python tests
β βββ test_crackle.py
βββ web/ # React web interface
β βββ src/
β β βββ components/
β β β βββ MainMenu.tsx # Main menu with mode selection
β β β βββ MainMenu.css
β β β βββ PracticeMode.tsx # Practice mode game
β β β βββ PracticeMode.css
β β β βββ CrackMode.tsx # Crack Wordle helper
β β β βββ CrackMode.css
β β β βββ ReactBits/ # Animated components
β β β βββ LetterGlitch.tsx # Animated background
β β β βββ DecryptedText.tsx
β β β βββ ClickSpark.tsx
β β βββ utils/
β β β βββ wordListCache.ts # LocalStorage caching utility
β β βββ test/ # Unit tests (Vitest)
β β β βββ setup.ts
β β β βββ MainMenu.test.tsx
β β β βββ CrackMode.test.tsx
β β β βββ wordListCache.test.ts
β β βββ App.tsx # Main app component
β β βββ main.tsx # Entry point
β βββ public/
β βββ package.json
β βββ vite.config.ts # Vite configuration
β βββ vitest.config.ts # Test configuration
βββ .pre-commit-config.yaml # Pre-commit hooks
βββ .github/workflows/ci.yml # GitHub Actions CI
The Flask backend (api.py) provides:
GET /api/health- Health checkGET /api/words- Get the full word listPOST /api/filter- Filter words based on guess and resultPOST /api/play/new- Start a new practice gamePOST /api/play/guess- Submit a guess in practice mode
Crackle is open-sourced software licensed under the MIT license.
Crackle uses optional Rybbit Analytics for anonymous usage tracking (no cookies, GDPR-friendly). Analytics can be disabled via environment configuration. See PRIVACY.md for details.
Disclaimer: Crackle is not affiliated with, endorsed by, or connected to Wordle, The New York Times, or any official Wordle entities. This is an independent passion project created for educational and entertainment purposes.


