Skip to content

TractorZoom/interview-wordle

Repository files navigation

Interview Wordle

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.

How it works

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.

API contract

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

Running the project

You need two terminals: one for the frontend, one for the server.

Terminal 1 — Frontend

npm install
npm run dev

The app will be available at http://localhost:5173.

Terminal 2 — Server (pick a language below)


Server: TypeScript

Requirements: Node.js 18+

cd server/typescript
npm install
npm start

Implement formatGuess in server/typescript/index.ts.


Server: Python

Requirements: Python 3.10+

python server/python/main.py

No dependencies to install — uses the standard library only.

Implement format_guess in server/python/main.py.

About

Unfinished Wordle for interviews

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors