Project Info
This project did not submit a demo video on Devpost.
Inspiration
TrivAI was born from the desire to revolutionize the traditional trivia game experience. My girlfriend and I like trivia and we noticed that conventional trivia games often lack personalization, asking questions about topics we don't care about. By leveraging AI technology, TrivAI seizes an opportunity to create dynamic, engaging, and customizable trivia experiences that adapt to players' interests, helping us learn more about our favorite topics!
What it does
TrivAI is an interactive multiplayer trivia game that uses AI to generate unique questions based on player-chosen topics. Key features include: Real-time multiplayer gameplay using Pusher for live updates Custom topic selection AI-powered question generation using gpt-4o Dynamic scoring system Instant answer validation using AI Fun, playful UI with bouncing shapes and smooth transitions
How we built it
We built TrivAI using a modern tech stack: Frontend: Next.js with TypeScript for type safety and better developer experience Styling: Tailwind CSS for responsive design and custom animations Real-time Communications: Pusher for websocket connections and live game updates AI Integration: OpenAI's gpt-3.5-turbo for question generation and answer validation State Management: Server-side global state for managing game sessions and player data
Challenges we ran into
Answer Validation: Creating a fair and accurate system for validating player answers was complex. We solved this by using GPT-3.5 Turbo to compare answers contextually rather than exact matching. Real-time Synchronization: Coordinating game state across multiple players presented challenges. We implemented a robust Pusher-based system to ensure all players stay synchronized. Question Quality: Ensuring AI-generated questions were both challenging and accurate required careful prompt engineering and validation.
Accomplishments we're proud of
Created a seamless multiplayer experience with real-time updates Implemented an animated UI that gives the game a fun vibe Successfully integrated AI for both question generation and answer validation Built a scalable architecture that can handle multiple concurrent game sessions
What we learned
Websocket implementation with Pusher Prompt engineering for AI interactions State management in a real-time multiplayer context Complex animation implementations with CSS TypeScript best practices in a Next.js environment
What's next
Custom Game Modes: Implement different game modes like time trials, tournament-style competitions, and Jeopardy style betting Difficulty adjustment based on player performance Friend lists and public lobbies Achievement system A dashboard for players to track their performance and learning progress over time
This repository has no readme, or GitHub could not be reached.
Analysis
View
Metric
- 9
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- JavaScriptIn code
- Next.jsIn code
- OpenAIIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
- Vercel AI SDKIn code
8 of 8 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
46 KB
Source files
19
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
kavelrao/TrivAI
23 files · 144 KB · @ 563e312
Structure
Interface
8 files · 35%Screens, components and styles rendered to the user.
API & routing
9 files · 39%Request entry points: routes, handlers and controllers.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript95%
- CSS4%
- JavaScript1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 15- @ai-sdk/openai
- ai
- nanoid
- next
- openai
- pusher
- pusher-js
- react
- react-dom
- +6 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.