Admin: Daily Word pool curation (lookup + add/remove)
First games admin tool. A "Games" tab in the operator console for the Daily Word answer pool. * Lookup: is a word real (in the guess dictionary), the right length (5/6), and already in the pool — instant as you type. * Add: appends to the pool, enforcing the invariant (alpha · 5/6 letters · in the guess dict) so the daily answer is always guessable. Remove: drops admin-added words (curated static ones stay). * Additions persist in a new word_pool table (survives redeploys, unlike the baked-in JSON); the daily picker reads static pool ∪ DB additions. Guess dicts shipped with the package (goodnews/data/words-5/6.json) for server-side validation. Admin-gated endpoints + tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -260,6 +260,13 @@ CREATE TABLE IF NOT EXISTS feedback_replies (
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_feedback_replies_fid ON feedback_replies(feedback_id);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS word_pool (
|
||||
word TEXT NOT NULL,
|
||||
variant TEXT NOT NULL, -- '5' | '6'
|
||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (variant, word)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS daily_puzzles (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
puzzle_date TEXT NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user