Inspiration We spend a lot of time on Reddit scrolling through comment sections and wondering, "What is everyone else going to say here?" That curiosity is the whole reason we built Consensus. Instead of just asking people for their own opinion, we wanted to flip the script: Can you guess what the majority of the crowd actually thinks? It turns a simple poll into a fun, mind-reading challenge where your social intuition gets put to the test.
What it does Every day, the app serves up a fresh question. First, you pick which option feels right for you. After that, the real game begins—you have to look into your crystal ball and predict the exact percentage of players who will choose each of the four answers. Once you lock in your guesses (making sure they add up to 100%), the system calculates the real results. You get a score out of 100 based on how close your percentages were to the actual crowd distribution. We also added a streak counter to reward daily players and a small leaderboard so you can see where you stack up against others.
How we built it We started with the Devvit Web framework since it handles the hard work of talking to Reddit. The UI is built with React and TypeScript, which kept the interface snappy. For the backend, we used Hono to serve up the API routes and Redis to store all the submissions and user streaks. The highlight of the project is the reveal screen—we used Phaser to draw animated bar charts. When you finish a round, the bars physically grow on screen using Phaser's tweening system, and a black tick mark slides in to show exactly where your guess landed. That visual feedback makes the score feel much more tangible than a plain number.
Challenges we ran into The toughest part was getting Phaser to play nicely inside a React component. React wants to control the DOM, while Phaser wants to take over its own canvas, so we had to carefully manage the mounting and unmounting of the game scene to prevent memory leaks. We also ran into a limitation with Redis—we originally planned to use sorted sets for the leaderboard, but they weren't supported out of the box. We had to switch gears and store simple JSON arrays instead, sorting them manually on the server to keep things moving forward.
Accomplishments that we're proud of We're really happy we managed to ship a fully functional, polished experience within a tight deadline. The core loop is solid: answer, predict, and reveal. The Phaser bars animate smoothly, the slider controls automatically rebalance themselves so they always hit 100%, and the "Share" button actually posts your result back to the Reddit thread. It feels like a natural part of the Reddit ecosystem, rather than an external site tacked on.
What we learned We learned that building a great hackathon project is mostly about saying "no" to features. We had to drop flashy ideas like user-submitted questions and weekly leaderboards to make sure the core experience was bug-free and delightful. We also got a much better understanding of how to integrate canvas-based animations (via Phaser) into a standard React app without breaking the build.
What's next for Consensus We want to expand the question pool to let users submit their own scenarios, add a weekly "Hall of Fame" for the highest-scoring players, and maybe even introduce special flair rewards that show up next to usernames in the subreddit.
Built With
- devvitweb
- hono
- node.js
- phaser.js
- react
- redditapi
- redis
- typescript
- vite
Log in or sign up for Devpost to join the conversation.