siinghd/honest

One global question rotates hourly; everyone answers anonymously live over WebSocket

โ˜… 0Forks 0TypeScriptGitHub โ†—Compare

README

honest

One question. The world answers. Live. A new question rotates in every hour; everyone sees the same one, everyone can answer once, hearts are real-time.

What it does

  • Fixed pool of 60 introspective questions; the active question rotates every hour (hour-of-epoch modulo pool size)
  • 140-character answers, one per IP per question (hashed with a salt, not stored raw)
  • WebSocket broadcasts: new answers, heart count updates, online user count, question rotation
  • Sort answers by latest or by hearts
  • Basic anti-spam: blocks URLs, blocks 10+ char repetitions, strips control chars

Stack

Bun + Hono HTTP API, native Bun.serve WebSockets, bun:sqlite with WAL mode. Static frontend in public/.

Run it

bun install
bun run dev   # or: bun run start  (serves on :3080)

Notes

  • No required env vars. PORT overrides the default 3080.
  • SQLite file path is hardcoded to /home/deploy/honest/honest.db in src/server.ts โ€” change for non-deploy environments.
  • The IP-hash salt is hardcoded as honest-salt-x7k9m2; rotate it if you fork this and care about IP privacy.
  • honest.db* is runtime data, gitignored.