Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
A Wheel of Fortune–style, one-turn idiom guessing game. Each round picks a random three-word phrase, reveals about 30% of its letters, and hides the rest as blank tiles. You get a single guess (case-insensitive) — then the answer is revealed and you can play again.
- A random three-word idiom is loaded with ~30% of letters showing.
- Type the full phrase and hit Guess.
- Right or wrong, the answer is shown. Hit Play again for a fresh round.
Rendering mermaid diagram...
index.ts ← Hono backend: serves frontend + /api routes
idioms.ts ← The list of three-word phrases
puzzle.ts ← Puzzle generation (~30% reveal) + guess checking
frontend/
index.html ← HTML shell (Twind + React)
index.tsx ← React entrypoint
components/
App.tsx ← Root layout
Game.tsx ← Game state, input, result, "play again"
Board.tsx ← Renders the revealed/blank letter tiles
/api/newpicks a random phrase, reveals ~30% of its letters, and returns the masked board plus an opaque base64tokenof the answer. The full answer is never sent in plaintext until the round ends./api/guessdecodes the token server-side and compares it to the player's guess after normalizing (lowercase, collapse whitespace, strip punctuation), so matching is case-insensitive and forgiving.
Add or edit phrases in idioms.ts. Tweak the reveal percentage via
REVEAL_FRACTION in puzzle.ts.