A Wordle clone used as a technical interview exercise. The frontend is complete — your task is to implement the format_guess / formatGuess function in the server language of your choice.
The React frontend handles all UI and game logic. When a guess is submitted, it calls POST /api/format-guess on a local server. The server is responsible for comparing the guess against the solution and returning the result.
Your job: implement the function that evaluates a guess and returns the status of each letter.
POST /api/format-guess
Body: { "guess": "CRANE" }
Returns: [{ "key": "C", "status": "absent" }, { "key": "R", "status": "correct" }, ...]
Letter statuses:
"correct"— right letter, right position"present"— right letter, wrong position"absent"— letter not in the word
You need two terminals: one for the frontend, one for the server.
Terminal 1 — Frontend
npm install
npm run devThe app will be available at http://localhost:5173.
Terminal 2 — Server (pick a language below)
Requirements: Node.js 18+
cd server/typescript
npm install
npm startImplement formatGuess in server/typescript/index.ts.
Requirements: Python 3.10+
python server/python/main.pyNo dependencies to install — uses the standard library only.
Implement format_guess in server/python/main.py.