StoryForge — Where Every Suspect Has a Secret
Inspiration
I've always loved detective stories — the tension of an interrogation, the moment a lie unravels, the satisfaction of cracking a case. But every mystery game I'd played had the same problem: play it twice and you already know the killer. The story is fixed. The suspects say the same things. The magic disappears.
That got me thinking — what if every suspect was actually thinking? What if they had real secrets, real alibis, real personalities — and responded to whatever you asked in real time? Not a script. Not a decision tree. A living, breathing character powered by AI.
That's the idea that became StoryForge.
What It Does
StoryForge is a fully playable, infinitely replayable AI murder mystery game. Every case is unique — a new victim, a new setting, a new killer, a new motive — all generated fresh by AI the moment you click "Open a New Case."
Four suspects come to life, each powered by a dedicated AI agent with their own personality, alibi, secrets, and knowledge of the crime:
- The Nervous One — rambles when pressured, hides minor secrets
- The Charmer — deflects with wit, lies confidently
- The Grieving One — emotional and honest, except about the one thing that matters
- The Killer — chillingly calm, almost too composed
Players interrogate suspects, collect clues, analyze evidence on a visual detective board, and make their accusation. A verdict AI then delivers a dramatic case resolution — narrating exactly what happened, how, and why.
How I Built It
StoryForge was built entirely through conversation with MeDo — no code was written manually. The architecture runs on 7 distinct AI agents:
| Agent | Role |
|---|---|
| Mystery Generator | Creates complete unique mystery JSON at game start |
| Suspect Agent × 4 | Powers each character's real-time responses |
| Evidence Analyzer | Connects clues to suspects on the Evidence Board |
| Verdict Agent | Generates dramatic case resolution story |
The backend runs on Supabase with full authentication, storing player profiles, detective rank progression, global leaderboard scores, and game history — all persisting across devices and sessions.
Stripe powers the Detective's Club premium tier ($4.99/month), unlocking unlimited mysteries, 6-suspect cases, Hardcore Mode, and Cold Case mysteries set in 1920s Prohibition and Victorian England.
The UI was designed with a cinematic noir aesthetic — film grain overlay, amber accents, Playfair Display typography, CSS spotlight effects, and SVG evidence board string connections that animate in as you discover clues.
Challenges
The hardest problem was keeping AI suspects consistent. Each agent needed to remember everything it had said in an interrogation session and never contradict itself — while also lying convincingly about specific things and being honest about others. Getting the system prompts precise enough that suspects felt like characters rather than chatbots took significant iteration.
The second hardest problem was the data architecture.
The app originally ran two separate profile systems
simultaneously — one for the game UI and one for
subscriptions — causing premium status to vanish on
page reload. Migrating everything to a unified
auth.uid() system in Supabase fixed it completely,
but required rewriting every database interaction in
the app.
Clue detection was also unexpectedly tricky. The AI sometimes returned malformed JSON metadata, causing the "Add to Evidence Board" button to disappear. The solution was a two-layer detection system: AI metadata as the primary signal, with a 28-keyword fallback that catches clues even when the JSON is broken.
What I Learned
Building StoryForge taught me that AI agents are only as good as their system prompts. The difference between a suspect that feels like a real person and one that feels like a chatbot is entirely in how precisely you define their personality, their knowledge boundaries, and their behavioral rules.
I also learned that no-code doesn't mean no architecture. MeDo handled all the code generation — but the decisions about data flow, agent design, state management, and error handling were still real engineering decisions that determined whether the app worked or broke.
Built With
- MeDo (full-stack generation + AI agents)
- ERNIE (Baidu's LLM powering all 7 AI agents)
- Supabase (authentication + database + real-time)
- Stripe (payment processing + webhooks)
- React + TypeScript + Zustand
- Tailwind CSS
- Playfair Display + Courier Prime (Google Fonts)
Built With
- ernie
- medo
- react
- stripe
- supabase
- tailwind
- typescript
- zustand
Log in or sign up for Devpost to join the conversation.