Inspiration
We wanted a daily game that could only exist on Reddit: one that turns the thread itself into the puzzle. Reddit’s comment chains and voting are perfect for a mystery—clues live in the comments, and the community decides which evidence matters and which theory wins. Thread Detective is our take on “daily mystery + Reddit-native mechanics”: read the clue chain, vote on evidence strength, post your theory, and let the best theory earn the daily badge.
What it does
Thread Detective is a daily mystery game that runs inside a Reddit post. Each day, a new mystery drops: players open the post, tap Launch Game, and see the mystery prompt. The clues are in the comment chain below (posted by the author or mods). Players upvote or downvote those clue comments—votes become evidence strength (strong / medium / weak) shown in the app. Everyone posts their theory in a comment (starting with “Theory:”); the highest-voted theory wins the daily badge for that day. So the game is: read clues → vote on evidence → post theory → the community picks the winner. It’s collaborative, Reddit-y, and built for recurring daily play.
How we built it
We built Thread Detective on Devvit Web as an Interactive Post (custom post type + webview). The backend is TypeScript in src/: a custom post type that loads the daily mystery from Redis (keyed by UTC date), fetches comment data for evidence strength and best theory, and talks to the in-post UI via useWebView and postMessage. The in-post game UI is HTML, CSS, and vanilla JavaScript in webroot/: it shows today’s mystery, the evidence-strength list (with a Refresh button), a clear “Submit your theory in the comments” CTA, and the daily badge / best theory. We use Devvit.createElement for all Blocks UI so the reconciler gets the correct element shape. Subreddit mods create new daily posts with the Create Thread Detective (Daily Mystery) menu item; they add the mystery and clue comments, and players play in the same post. No GameMaker—pure Devvit Web + webview.
Challenges we ran into
- Blocks/JSX shape: The Devvit Blocks reconciler and handler expect elements with a top-level
.childrenarray. Our project used the React JSX transform (react-jsx), which puts children inprops.children, so we hit “Cannot read properties of undefined (reading 'length')” and “reading 'flat'”. We fixed it by building all Blocks UI (custom post render and the create-post preview) with Devvit.createElement instead of JSX, so every node has the correct{ type, props, children }shape. - Comment data: Tying “evidence strength” and “best theory” to real Reddit comments required using the Reddit/Devvit API for the current post’s comments. We structured the code to work when that API is available and to degrade gracefully (e.g. empty clue list, no best theory) when it isn’t, so the game still plays and the UI stays clear.
Accomplishments that we're proud of
- Fully Reddit-native loop: Clues and theories live in real comments; votes drive evidence strength and the daily winner. No external game server—everything stays inside the post and the platform.
- Clear, scoped design: We wrote an SRS and stuck to it: daily mystery (FR-1–3), evidence strength (FR-4–6), theories and voting (FR-7–9), daily badge (FR-10–11), past mysteries and solution (FR-12–13). The app is concept-complete and demo-ready.
- Docs and examples: README and DOCUMENTATION include step-by-step examples for creating a post (with sample mystery and clues) and playing the game, plus a hackathon checklist and “making the app public” guidance.
What we learned
- Devvit’s rendering pipeline expects a specific element format (
.childrenon the node, not only in props). Using the framework’screateElementfor Blocks avoids subtle runtime errors when the default JSX transform doesn’t match. - Designing around Reddit’s primitives—comments as clues, votes as evidence, comments as theories—makes the game feel native and supports the “Best Use of User Contributions” angle.
- A short SRS and clear examples (create post + play) make it easier for judges and players to get the experience in one read.
What's next for Thread Detective
- Robust comment integration: When the Reddit/Devvit APIs for post comments are fully available in our context, we’ll wire them end-to-end so evidence strength and best theory always reflect live votes and theory comments.
- Solution reveal: Use Redis (
thread_detective:YYYY-MM-DD:revealedandsolution) so mods can flip a switch and show the official solution in the app after the day ends. - Archive and discovery: A simple way to browse past days’ mysteries and winners (e.g. links or a small archive view) so the daily habit has a history.
- Community and launch: Submit for app review to make the app public, then consider the Featuring Program and Developer Funds if the game gains traction.
Built With
- css
- devvit
- html
- typescript
Log in or sign up for Devpost to join the conversation.