Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A full-stack web application built with Next.js 13, Supabase, and Prisma. Play AI-generated trivias about art, entertainment, geography, history, and science.
Trivia Time is a full-stack Next.js 13 web application for playing AI-generated trivia quizzes, where players choose from art, entertainment, geography, history, or science and compete on a global leaderboard. The project combines Supabase for data storage, Prisma as the ORM, NextAuth for authentication, and OpenAI's GPT API for on-the-fly question generation.
Trivia Time is a full-stack web application built with Next.js 13, Supabase, and Prisma. It accepts a selected trivia topic from the player, generates questions using OpenAI's GPT API, and returns an interactive quiz interface styled with Chakra UI. The app runs on Vercel and is linked at triviatime.vercel.app, with the source code published on GitHub.
Trivia Time is made for trivia players who want to test their knowledge across several topics and measure themselves against other players via a leaderboard. It also serves developers who want to study a complete Next.js 13 application that integrates Supabase, Prisma, NextAuth, and the OpenAI API in a real project. Additionally, educators or event organizers can use the app or its code as a base for running quiz sessions with AI-generated content.
The core stack is Next.js 13 for the framework, Chakra UI for styling, NextAuth for authentication, Supabase for the database, Prisma for database access, OpenAI's API for question generation, React Email for email content, React Hook Form with Zod for forms, and Zustand for state management.
When a player selects a topic, the application sends a prompt to OpenAI's GPT API asking for trivia questions on that subject. The returned questions are then displayed in the quiz interface, and player answers are scored against the expected responses.
Yes. The source code is public on GitHub and can be self-hosted. You will need to configure your own Supabase project and provide your own OpenAI API key, as well as set up NextAuth providers for authentication.
The public demo at triviatime.vercel.app is freely accessible to play. The open-source repository contains no mention of paid tiers, though self-hosting requires your own API keys which may incur usage costs from OpenAI and Supabase.
The game currently supports art, entertainment, geography, history, and science. There is no indication in the source of additional categories, but the AI generation engine can be extended by modifying the prompts.
