Add Connections-style word game with puzzle editor

Express + node:sqlite server, vanilla HTML/JS frontend. Daily puzzle by
assigned date, puzzle list, shuffle, one-away hint, shareable emoji
results, and a password-protected admin page to create and edit puzzles.
Answers are checked server-side and never sent before they are solved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aidan Dona 2026-10-08 16:56:34 -05:00
parent 0d3181ec99
commit 4a2309b589
18 changed files with 4286 additions and 0 deletions

33
public/puzzles.html Normal file
View file

@ -0,0 +1,33 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Puzzles | NT Connections</title>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<header class="topbar">
<a class="brand" href="/">NT Connections</a>
<nav><a href="/">Today</a><a href="/puzzles" aria-current="page">Puzzles</a></nav>
</header>
<main>
<h1>All puzzles</h1>
<p class="sub">Play today's, or catch up on ones you missed.</p>
<ul class="list" id="list">
<li class="skeleton"></li><li class="skeleton"></li><li class="skeleton"></li>
</ul>
</main>
<script src="/common.js"></script>
<script>
(async () => {
const $list = document.getElementById('list');
const { ok, data } = await api('/api/games');
if (!ok) return $list.replaceChildren(el('li', { class: 'empty' }, 'Could not load puzzles. Try refreshing.'));
if (!data.length) return $list.replaceChildren(el('li', { class: 'empty' }, 'No puzzles yet. Check back soon.'));
$list.replaceChildren(...data.map((g) =>
el('li', {}, el('a', { href: `/play/${g.id}` }, el('strong', {}, g.title), el('span', { class: 'meta' }, fmtDate(g.date))))));
})();
</script>
</body>
</html>