A word game where players must think of the biggest word that fits a given constraint (e.g., "starts with HI").
The game requires a word database to validate submissions. Before playing, you need to initialize the database:
Run the initialization script by visiting the script's endpoint in your browser:
scripts/initDb.ts file in Val Towncurl https://your-val-endpoint/scripts/initDb.tsVerify initialization - The script will return a JSON response showing:
Note: This only needs to be done once, or when the word list is updated. The script is idempotent and will drop/recreate the table if run again.
The entrypoint is index.ts. That's the backend HTTP server,
which also serves the all the frontend assets.
The client-side entrypoint is
/frontend/index.html
/frontend/index.tsx/frontend/components/App.tsx.Validates word submissions against the game's word database.
Request body:
{ "submissions": [ { "round": 1, "word": "history" }, { "round": 1, "word": "hippopotamus" } ] }
Response:
{ "results": [ { "round": 1, "word": "history", "isValid": true }, { "round": 1, "word": "hippopotamus", "isValid": true } ] }
index.ts # Main HTTP handler with /api/validate endpoint
scripts/
initDb.ts # Database initialization script (HTTP type)
frontend/
index.html # Client-side HTML entry point
index.tsx # Client-side React entry point
components/
App.tsx # Main React app component
README.md # This file