How liliwqt/ai-defense-arena works
AI Defense Arena supports a multiplayer, source-grounded project defense: a host uploads project files, teammates join a room, and the team answers timed questions from four AI panelists before receiving shared coaching. The graph covers the multiplayer web flow and the documented Streamlit fallback. Backend routing and several UI behaviors are represented from the README and SOURCE INDEX; unsampled implementation details and unverified links are omitted.
Main entry points: App.tsx Arena app · game_server.py Room server · question_generator.py Question and coaching AI · app.py Streamlit app
Components 19
Multiplayer web client
- Arena app
game/src/App.tsx - Room connection
game/src/hooks/useRoomSocket.ts - Room controls
game/src/components/ControlsPanel.tsx - Vote and answer
game/src/components/RoomDock.tsx - Answer composer
game/src/components/AnswerComposer.tsx - Question and citation
game/src/components/QuestionCard.tsx - Room status
game/src/components/HUD.tsx - Deadline countdown
game/src/hooks/useRoomCountdown.ts - 3D defense room
game/src/components/ThreeDefenseScene.tsx - Transcript drawer
game/src/components/TranscriptPanel.tsx - Coaching report
game/src/components/CoachingReport.tsx
Room runtime
- Room server
game_server.py - Live room state
game_server.py
Defense engine
- Project file intake
project_files.py - Defense progression
defense_session.py - Question and coaching AI
question_generator.py
Streamlit fallback
- Streamlit app
app.py
Other components
- Host / defenders
- OpenAI service
Connections 25
- Host / defenders → Arena app: uses
README.md - Arena app → Room connection: connects through
game/src/App.tsx - Arena app → Room controls: renders
game/src/App.tsx - Arena app → Vote and answer: renders
game/src/App.tsx - Arena app → Question and citation: renders
game/src/App.tsx - Arena app → Room status: renders
game/src/App.tsx - Arena app → 3D defense room: renders
game/src/App.tsx - Arena app → Transcript drawer: renders
game/src/App.tsx - Vote and answer → Answer composer: renders
game/src/components/RoomDock.tsx - Room status → Deadline countdown: uses
game/src/components/HUD.tsx - Host / defenders → Room controls: configures room
README.md - Host / defenders → Vote and answer: votes and answers
README.md - Room connection → Room server: WebSocket events
README.md - Room server → Live room state: updates
README.md - Room server → Project file intake: accepts project files
README.md - Room server → Defense progression: advances defense
game_server.py - Defense progression → Question and coaching AI: requests next move
defense_session.py - Question and coaching AI → Project file intake: reads project text
question_generator.py - Question and coaching AI → OpenAI service: generates questions and coaching
README.md - Live room state → Room connection: sends room updates
README.md - Arena app → Coaching report: renders
game/src/App.tsx - Transcript drawer → Coaching report: shows report
game/src/components/TranscriptPanel.tsx - Host / defenders → Streamlit app: uses fallback
README.md - Streamlit app → Project file intake: reads project files
app.py - Streamlit app → Defense progression: starts and advances defense
app.py