How sjxchng/wordle-clone works
Wordle Clone is a browser-based daily word game with optional accounts and saved progress. Players enter guesses through the on-screen or physical keyboard; the React app sends guesses to FastAPI, which validates and scores them, then returns feedback for the board and keyboard. Logged-in players can restore saved games and view stats. The README documents PostgreSQL persistence and dictionary validation; the sampled backend excerpt shows scoring, daily-word selection, and the dictionary request. Backend internals are consolidated where the available excerpts do not establish finer module boundaries.
Main entry points: App.tsx Game controller · main.py Game API · Keyboard.tsx Input keyboard · Auth.tsx Login and register
Components 13
React game
- Game controller
frontend/src/App.tsx - Guess board
frontend/src/Board.tsx - Input keyboard
frontend/src/Keyboard.tsx - Login and register
frontend/src/Auth.tsx - Browser game storage
frontend/src/App.tsx
Game service
- Game API
backend/main.py - Daily word
backend/main.py - Guess validation and scoring
backend/main.py
Accounts and persistence
- Token authentication
backend/main.py - Game records and stats
backend/main.py - PostgreSQL
External services
- Merriam-Webster API
Other components
- Player
Connections 18
- Player → Game controller: plays game
README.md - Game controller → Guess board: renders
frontend/src/App.tsx - Game controller → Input keyboard: renders
frontend/src/App.tsx - Input keyboard → Game controller: sends input
frontend/src/App.tsx - Player → Game controller: types physically
README.md - Game controller → Login and register: renders
frontend/src/App.tsx - Login and register → Game API: registers and logs in
frontend/src/Auth.tsx - Game controller → Game API: submits guesses
frontend/src/App.tsx - Game API → Guess validation and scoring: validates and scores
backend/main.py - Guess validation and scoring → Merriam-Webster API: checks word
backend/main.py - Guess validation and scoring → Daily word: gets answer
backend/main.py - Game API → Game controller: returns feedback
frontend/src/App.tsx - Game controller → Browser game storage: saves guest progress
frontend/src/App.tsx - Game controller → Game API: restores game and stats
README.md - Game API → Token authentication: authenticates requests
backend/main.py - Game API → Game records and stats: reads and writes games
backend/main.py - Game records and stats → PostgreSQL: persists records
README.md - Token authentication → PostgreSQL: looks up users