Inspiration

A few months ago I got into an argument in an online comment section — sharp replies, good points, fast comebacks. Ten minutes in, I realized I'd been arguing with a bot the entire time. It didn't feel weird. It felt normal. And that's exactly what scared me.

We've crossed a line: AI can now hold a conversation well enough that most people can't tell. Bots write our comments, fill our DMs, and shape what we read — and almost no one has actually practiced spotting the difference. We're all walking into a world we were never trained for.

So I asked a simple question: what if telling human from AI wasn't a fear, but a skill — something you could train, like a reflex? What if the Turing Test wasn't a thought experiment locked in a textbook, but a game you could play in 60 seconds, against a real stranger or a machine pretending to be one?

That's TuringChat. It takes the most important literacy of this decade — knowing who, or what, you're really talking to — and turns it into something you play, practice, and get better at.

What it does

TuringChat is a real-time chat platform built around five multiplayer games:

  • The Turing Game — You're matched 1-on-1 for 60 seconds. Your opponent might be a real person, or Llama-3.3 wearing one of twelve personas. Chat, then vote: human or AI? Guess right and you score. Fool your opponent and you score more.
  • Word Forge — Build a story together one word at a time. An AI judge scores it for creativity and coherence.
  • Rapid Fire Debate — Random topic, random side, 30-second rounds. An AI delivers the verdict.
  • Imposter Prompt — You and your opponent share a secret word. Describe it without ever saying it.
  • AI Interrogation — Ask five questions, then decide: human or machine?

Around the games is a full chat platform: public rooms with categories, live presence and typing indicators, message reactions, and instant 1-on-1 direct messages. You can even talk to an AI assistant directly inside any chat room by typing /ai followed by your question — it reads the recent conversation as context and replies inline, powered by Groq.

Everything is real-time. Matchmaking looks for a human first, and only falls back to an AI persona if no one is available — so you genuinely can't be sure who's on the other side.

How we built it

  • Frontend: Next.js 16, React 19, TypeScript, Tailwind v4, Zustand for state.
  • Backend: Node 22, Express 5, Socket.IO 4, Mongoose 8, ioredis.
  • AI: Groq SDK — Llama 3.3 70B for the Turing Game and judging, Llama 3.1 8B for fast in-room replies.
  • Data: MongoDB for persistence, Redis for matchmaking queues, leaderboard sorted sets, and the Socket.IO pub/sub adapter.
  • Infra: Nginx as a WebSocket-aware edge on a single port, the whole stack orchestrated with Docker Compose.

Two Socket.IO namespaces keep things clean: /chat for rooms, DMs, typing, reactions, and the /ai command; /game for matchmaking queues, per-match rooms, and vote/judge events.

Challenges we ran into

  • Race conditions in matchmaking. Two players hitting "Find a match" at the same millisecond could double-pair. I solved it with a human-first queue popped atomically, plus a cancellable 15-second AI-fallback timer per player.
  • Turn-locking the cognitive games. Early on, one player submitting a word would freeze both sides. The bug was a state-shape mismatch between the init code and the turn checker — fixing it meant unifying the game state and driving the UI from an authoritative youAreSlot the server sends on match.
  • Making the AI convincingly human. A raw LLM is too polished and too eager to help. I gave each persona a name, a vibe, and a strict no-AI-admission system prompt, capped replies at ~120 tokens, and added a humanizing 1–3.5 second typing delay.
  • Real-time room stats. Member counts, online presence, and message counts weren't updating. I added Redis-backed presence that syncs to MongoDB and broadcasts on every join, leave, and disconnect.

Accomplishments that we're proud of

  • A fully working real-time platform — not a prototype. Rooms, DMs, presence, five complete games, leaderboards, and profiles all function end-to-end.
  • The Turing Game actually fools people. The persona system makes AI opponents hard to distinguish from real players.
  • A clean, mobile-first dark UI with a polished landing page.
  • The whole thing runs with a single docker compose up.

What we learned

  • Designing real-time systems means thinking about state — who owns it, when it syncs, and what happens on disconnect.
  • Atomic operations in Redis are the difference between a working matchmaker and a buggy one.
  • Prompt engineering for deception is a completely different craft than prompting for helpfulness.
  • Good UX in real-time apps is mostly about honest feedback: typing dots, presence, countdowns, turn indicators.

What's next for TuringChat

  • Real-time video Turing rounds — face-to-face matches where you guess human vs AI from live video and expression, as AI avatars get more convincing.
  • Voice-based matches — spoken conversations where you have to tell a real voice from a synthetic one. As voice cloning gets better, this becomes the next frontier of the same skill.
  • More games — new modes that test different signals: humor, memory, emotional response, and reasoning under pressure.
  • Ranked competitive play — ELO-based matchmaking, seasonal leaderboards, and tournaments.
  • Spectator mode — watch live Turing matches and vote along with the crowd.
  • Shareable match replays — turn your best "fooled the opponent" moments into clips you can post.
Share this project:

Updates