One room. Six humans. One hidden Gemini-powered liar.
Among Liars is a realtime social deduction game built for the DEV June Solstice Game Jam. It turns the Turing Test into a playable elimination game: Detectives are not just looking for a role, they are reading tone, hesitation, fake memories, strange confidence, and the little tells that make a message feel human or not.
The twist is that the AI is not a chatbot sitting outside the game. It is a hidden spy-side player.
Seven total players exist in each match:
- 3 Detectives trying to expose the hidden AI
- 3 Human Spies trying to protect the AI
- 1 Gemini AI player hidden inside the spy side
Only six people join the room. The seventh player is created by the backend and controlled through the Gemini API.
Detectives win when the AI has nowhere left to hide. Spies win when every Detective is eliminated first.
-
Planning Detectives get a private room. Spies get a different private room. Teams can talk, suggest suspects, plan questions, and coordinate pressure.
-
Cover Names Spy-side players receive new cover names every round. A spy might be
TAVIin one round andORIONin the next. This keeps identity, order, and memory from becoming cheap tells. -
Detective Question One living Detective is selected. They ask the spy side one question, usually something hard to fake quickly.
Good questions are things like:
- “What did you eat three days ago?”
- “What sound does Tuesday feel like?”
- “Who in this room seems like they are trying too hard?”
-
Spy Answers Every living spy-side player answers, including Gemini. Answers appear as evidence cards.
-
Final Read The selected Detective clicks the answer card they believe belongs to the AI.
-
Resolution A correct guess removes a human spy bodyguard. A wrong guess eliminates the Detective. The AI survives until the spy side is stripped away.
The jam theme is the June solstice and June celebrations. Among Liars leans into June as a moment of transition, identity, visibility, and hidden truth.
It also directly targets the Best Ode to Alan Turing category. The game is built around Turing’s imitation game, but instead of asking “Can a machine answer correctly?”, it asks:
Can a machine survive being read by people?
That felt more interesting for a game. The AI does not need to be perfect. Sometimes perfect is suspicious. Sometimes messy is safer. Sometimes a human spy intentionally sounds robotic to protect it.
Gemini is core to the gameplay.
The AI player answers wildcard and detective questions through a Supabase Edge Function. The frontend never receives the Gemini API key.
The Edge Function:
- receives the current room and round
- finds the hidden AI player
- reads the active question
- finds the AI’s current cover name
- chooses one of several behavior styles
- calls Gemini server-side
- saves the AI answer into Supabase so everyone sees it in realtime
This is not a decorative AI feature. Without Gemini, the central mystery does not exist.
- React
- Vite
- Framer Motion
- Supabase Postgres
- Supabase Realtime
- Supabase Edge Functions
- Gemini API
Install dependencies:
npm installCreate a local env file:
cp .env.example .envSet:
VITE_SUPABASE_URL=...
VITE_SUPABASE_PUBLISHABLE_KEY=...Run the app:
npm run devBuild:
npm run buildApply the migrations in supabase/migrations.
Deploy the Edge Function:
supabase functions deploy ai-wildcard-answerSet server-side secrets in Supabase:
supabase secrets set GEMINI_API_KEY=...
supabase secrets set GEMINI_MODEL=gemini-2.5-flashDo not put Gemini or Supabase service-role secrets in frontend environment variables.
This repo intentionally does not include real secrets.
Safe to expose:
- Supabase project URL
- Supabase publishable key
Never expose:
- Gemini API key
- Supabase service role key
- local
.envfiles
The game supports:
- room creation and random room joining
- 6-player waiting room and countdown
- private role reveal
- rotating spy cover names
- public chat
- team-only private chat
- unread private-room indicators
- wildcard questions
- Gemini AI answers
- answer evidence cards
- detective guessing
- round resolution
- elimination tracking
- final win states
MIT