How sajeetharan/name-race-agent-workshop works
Name Race is a live, nickname-based quiz with host controls, participant play, a ranked leaderboard and podium. Participants join a room, answer three questions, and see their cars advance; the host reviews entries, starts and advances the quiz, then reveals results or resets/deletes the room. The HTTP server connects the browser UI to MCP-backed race rules and file persistence. MCP also exposes runtime tools and a static development guide; an optional Gemini commentator reads anonymous race summaries. Some route and UI details are unsampled, so those links rely on README documentation.
Main entry points: app.js Game UI · server.ts HTTP API · agent.ts AI Commentator · race.ts Race Rules
Components 14
Browser Experience
- Game UI
public/app.js - Host Controls
public/app.js - Race Display
public/app.js
HTTP Host
- HTTP API
src/server.ts - MCP Client
src/connection.ts - AI Commentator
src/agent.ts
MCP Runtime
- Runtime Tools
src/mcp.ts - Guide Tools
src/mcp.ts
Race Domain
- Race Rules
src/race.ts - Question Bank
src/questions.ts - Room Storage
src/race.ts
Other components
- Host
- Participants
- Gemini API
Connections 16
- Host → Host Controls: controls
README.md - Participants → Game UI: join and answer
README.md - Host Controls → Game UI: uses
public/app.js - Game UI → HTTP API: requests
public/app.js - HTTP API → Game UI: serves assets
src/server.ts - HTTP API → MCP Client: dispatches calls
src/server.ts - HTTP API → AI Commentator: requests commentary
src/server.ts - AI Commentator → MCP Client: reads summary
src/agent.ts - AI Commentator → Gemini API: requests style
src/agent.ts - MCP Client → Runtime Tools: calls over stdio
src/connection.ts - Runtime Tools → Race Rules: dispatches actions
src/mcp.ts - Guide Tools → Host: provides game guidance
README.md - Race Rules → Question Bank: uses questions
src/race.ts - Race Rules → Room Storage: reads and writes
src/race.ts - Race Display → Game UI: renders state
public/app.js - Game UI → Race Display: shows rankings
README.md