A web-based Family Feud game with AI-powered answer validation and text-to-speech for questions.
Pass-and-play Family Feud for two teams. The AI validates your answers generously (so "mobile phone" matches "phone"), and optionally reads questions aloud using natural-sounding voices.
Points bank per question and get added to your score when the round ends. Get 3 strikes and the other team gets one chance to steal the pot.
- AI answer validation that understands synonyms and concepts
- Text-to-speech for questions (ElevenLabs)
- Proper Family Feud scoring rules (bank and steal mechanics)
- Custom team names
- Clean, responsive UI
- Local resume: game state persists across refreshes on the same device
Requirements:
- Node.js 20+
- OpenAI API key
- ElevenLabs API key
Install:
npm installEnvironment variables:
Create a .env.local file:
OPENAI_API_KEY=your_openai_key
ELEVENLABS_API_KEY=your_elevenlabs_key
ELEVENLABS_VOICE_ID=your_voice_id_optional
# Optional: override the TTS model (defaults to ElevenLabs v3 alpha)
ELEVENLABS_TTS_MODEL_ID=eleven_v3
# Optional: audio output format (defaults to mp3_22050_32)
ELEVENLABS_TTS_OUTPUT_FORMAT=mp3_22050_32
Run:
npm run dev- Enter team names and start
- Active team types an answer
- AI checks if it matches (generously)
- Correct answers reveal and add to the pot
- Wrong answers add strikes
- 3 strikes = other team gets to steal
- Round ends when all answers revealed or after steal
- Points bank to the winning team
- Next question, next team's turn
- Next.js 16 (App Router, Edge runtime for APIs)
- React 19
- TypeScript
- Tailwind CSS v4
- OpenAI (via Vercel AI SDK) for answer validation
- ElevenLabs for text-to-speech
- Sonner for toasts
/app
/api
/tts/stream # ElevenLabs proxy
/validate-answer # OpenAI validation
/components
game-board.tsx # Main game UI
game-context.tsx # State management
home-screen.tsx # Team setup
results-screen.tsx # Winner/tie screen
/hooks
use-questions.ts # Question rotation
use-question-tts.ts # Audio playback
/types
game.ts # TypeScript definitions
/data
questions.json # Game questions
Edit /data/questions.json:
{
"questions": [
{
"question": "Name something people do when they can't sleep",
"answers": [
{ "text": "Watch TV", "points": 40 },
{ "text": "Read", "points": 30 }
]
}
]
}- Answer validation uses structured output (Zod schema) for reliability
- TTS streams through an Edge function to keep API keys server-side
- Game state persists in
localStorageunderfamily-feud:game-state - Clear saved progress by removing that key in devtools or calling
localStorage.removeItem("family-feud:game-state") - Validation has a 600ms timeout to keep the game moving
- Voice autoplay requires user interaction first (browser policy)
- Progress is stored per browser via localStorage (clearing data resets the game)
- Single device only (no multiplayer)
- Voice may not work on first load (autoplay restrictions)
- Validation sometimes misses creative answers (AI isn't perfect)