Skip to content

Repository files navigation

🐝 HiveMind

A daily guessing game where you predict the crowd, not the facts.

Built on Reddit's Devvit Web platform.


What is this?

Every day, HiveMind asks one question — and your job isn't to know the answer, it's to guess what everyone else will answer. Drag a slider, rate how confident you are, and submit. A live histogram shows you where you land compared to everyone else.

At midnight UTC, the day locks in and the result becomes a permanent star in the Observatory — a night sky where every past day lives forever.

Depending on how close (or how confidently wrong) your guess was, you earn flair — a badge that shows next to your username on the subreddit.

How to Play

  1. Open the post and hit Start Guessing
  2. Drag the slider (0–100) to your guess
  3. Rate your confidence (1–5 stars)
  4. Submit — watch the live histogram fill in
  5. Check out the Observatory to see the community's history
  6. Come back tomorrow — one guess per day, streaks and flair build over time

Features

  • Daily guessing, one guess per player per day
  • Real-time histogram (Phaser)
  • The Observatory — persistent history of every past day
  • Streaks and performance-based flair
  • Rotating daily prompts
  • Mobile-friendly

Tech Stack

  • Devvit Web — Reddit's developer platform
  • Phaser 3 — histogram and Observatory scenes
  • React + TypeScript — app shell and UI
  • Reddit's Redis-backed key-value store — all persistence
  • Devvit Scheduler — daily lock job
  • Reddit Flair API

Getting Started

Prerequisites: Node.js v18+, npm v8+, a Reddit account with a test subreddit you moderate.

npm install -g devvit
devvit login

git clone https://github.com/ruthzu/hivemind-.git
cd hivemind
npm install

devvit upload
devvit playtest r/your_subreddit_name

Debug Tools

A few mod-gated routes for testing without waiting on real daily cycles:

  • POST /api/debug/seed-stars — seeds fake Observatory history
  • POST /api/debug/add-star — adds one fake historical day
  • POST /api/debug/refresh-flair — recomputes a user's flair tier
  • POST /api/debug/submit-guess-for-date — simulates a guess on a specific date

All debug routes require moderator access.

Built With

devvit · phaser · react · typescript · redis

About

A daily guessing game where you predict the crowd, not the facts. Built on Reddit's Devvit Web platform.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages