Inspiration
Battle Trivia started from a simple idea: learning becomes more memorable when it feels competitive, social, and rewarding.
Traditional revision often means reading the same notes repeatedly or answering questions alone. I wanted to create a platform where people could learn together through live competition, instant feedback, scoring, chat, and leaderboards.
The original Battle Trivia platform already supported real-time trivia rooms, Word Scramble, weekly competitions, scoring, chat, standings, and winner podiums.
For OpenAI Build Week, I added Battle It — a new GPT-5.6-powered feature that allows users to transform their own notes or study images into private multiplayer trivia battles.
What it does
Battle Trivia is an AI-powered real-time multiplayer learning and competition platform with three main experiences:
Battle Trivia
Players join a continuous live trivia room, answer questions in real time, earn points based on correct answers, build streaks, compete on leaderboards, and interact through room chat.
Word Scramble
Players race to unscramble words, discover bonus words, earn points, and compete for the highest score.
Battle It
Battle It allows a user to:
- Paste study notes or upload up to 2 note images.
- Select a difficulty and answer time.
- Use GPT-5.6 to generate up to 20 source-backed questions.
- Review and edit every generated question before launch.
- Open a private multiplayer lobby.
- Invite other players and start the battle.
- Compete through timed questions, live scoring, chat, and leaderboards.
- View source proof and explanations after each reveal.
- See a halftime leaderboard and final winner podium.
- Replay the approved battle without making another AI request.
The original notes and uploaded filenames are not retained. Only the reviewed questions and short source-proof excerpts needed for the battle are stored.
How we built it
The frontend was built with React, Vite, JavaScript, and Tailwind CSS.
The backend is an ASP.NET Core .NET 8 Web API written in C#. PostgreSQL is used for persistence, with Dapper and Npgsql for database access.
SignalR powers the real-time multiplayer experience, including:
- Live room connections
- Question delivery
- Answer submission
- Scoring updates
- Chat
- Room activity
- Leaderboard refreshes
- Battle completion events
GPT-5.6 is used on the server to transform submitted notes and extracted image content into structured trivia questions containing:
- Question text
- Four answer options
- The correct answer
- An explanation
- A short source-proof excerpt
Generated questions do not go directly into gameplay. The creator must review and approve them first.
Codex was used throughout the Build Week development process to inspect the existing architecture, identify safe integration points, design the Battle It workflow, implement the backend and frontend changes, troubleshoot deployment issues, and preserve compatibility with the existing Battle Trivia and Word Scramble experiences.
Human review and responsible AI
A major design decision was to keep the user in control.
AI-generated questions can contain errors or ambiguity, so Battle It includes a mandatory review stage. Before opening a lobby, the creator can:
- Edit the question
- Edit answer options
- Change the correct answer
- Review the explanation
- Inspect the supporting source excerpt
- Remove weak or unsupported questions
The system also applies generation limits of three generations per user per hour to reduce abuse and control API usage.
Challenges we faced
Extending an existing live platform
Battle Trivia already had a working real-time trivia engine. The challenge was adding AI-created private battles without breaking the existing continuous weekly game.
We kept the Battle It lifecycle separate while reusing the proven SignalR, scoring, room, and leaderboard infrastructure.
Reliable structured AI output
The application needs consistent questions with exactly four options, one correct answer, an explanation, and source proof.
We added server-side validation so incomplete, unsupported, malformed, or duplicate questions are rejected before the review stage.
Multiplayer timing and state
All players need to see the same question, countdown, reveal, leaderboard, and final result at the correct time.
SignalR events and server-controlled battle state are used so the browser is never responsible for deciding the correct answer or final score.
Privacy
Users may submit personal study material. Battle It was designed so raw pasted notes and uploaded filenames are not permanently retained.
Deployment
The application is deployed using Docker containers behind Caddy. Environment variables are used for sensitive configuration such as the OpenAI API key, database connection, and authentication settings.
What we learned
This project demonstrated that AI-generated learning content becomes much more useful when combined with:
- Human review
- Source grounding
- Real-time social interaction
- Competition
- Immediate explanations
- Replayability
We also learned that integrating AI into an existing product is not only about adding an API call. The largest challenges involved validation, privacy, rate limiting, multiplayer state, user experience, and safely reusing existing systems.
What is next
Future plans include:
- Teacher and classroom battle controls
- Battle invitations and join codes
- More supported document formats
- Expanded image-note extraction
- AI-assisted difficulty balancing
- Performance analytics by topic
- Personal revision recommendations
- Public community-created battle packs
- School and organisation leaderboards
- Mobile applications
Build Week contribution
Before Build Week, Battle Trivia included authentication, rooms, chat, continuous trivia, Word Scramble, scoring, weekly standings, and winner podiums.
During Build Week, I created Battle It, including:
- GPT-5.6 question generation from notes and images
- Private generated question sets
- Human review and editing
- Source-backed explanations
- Private battle lobbies
- Timed finite battles
- Halftime standings
- Final podiums
- Free battle replay
- Generation rate limiting
- Note-retention privacy protections
Battle Trivia turns knowledge into competition — helping people study, compete, and learn together.
Log in or sign up for Devpost to join the conversation.