More Premium Hugo Themes Premium Nextjs Themes

Trivia Time

A full-stack web application built using Next.js 13, Supabase, and Prisma. Play AI-generated trivias about different topics such as art, entertainment, geography, history and science.

Trivia Time

A full-stack web application built using Next.js 13, Supabase, and Prisma. Play AI-generated trivias about different topics such as art, entertainment, geography, history and science.

Author Avatar Theme by m-ler
Github Stars Github Stars: 23
Last Commit Last Commit: Sep 7, 2023 -
First Commit Created: Dec 18, 2023 -
Trivia Time screenshot

Overview:

Trivia Time is a trivia game that allows users to play AI-generated quizzes across various topics such as art, entertainment, geography, history, and science. With captivating quizzes and the opportunity to compete with people worldwide, players can test their knowledge and strive to become a true trivia master. The game is built on a tech stack that includes Next.js, Chakra UI, NextAuth/Auth.js, Supabase, React Email, Prisma, React Hook Form, and Zustand.

Features:

  • Authentication with NextAuth: Users can create accounts and log in securely using the NextAuth authentication system.
  • Database on Supabase: The game’s database is powered by Supabase, allowing for efficient data storage and retrieval.
  • Users leaderboard: Trivia Time includes a leaderboard feature that showcases the top players globally, encouraging competition and engagement.
  • OpenAI’s GPT API integration: The game leverages OpenAI’s GPT API to generate AI-generated trivias, providing a diverse range of questions and topics.
  • Form validation with Zod and React Hook Form: Trivia Time utilizes Zod and React Hook Form for form validation, ensuring that user inputs are accurate and valid.

Installation:

To install Trivia Time, follow the steps below:

  1. Clone the repository from GitHub:
git clone [repository-url]
  1. Navigate to the project directory:
cd trivia-time
  1. Install the required dependencies using npm:
npm install
  1. Set up the environment variables by creating a .env file and adding the following variables:
NEXT_PUBLIC_SUPABASE_URL=[supabase-url]
NEXT_PUBLIC_SUPABASE_KEY=[supabase-key]
OPENAI_API_KEY=[openai-api-key]
  1. Start the development server:
npm run dev
  1. Access the Trivia Time application in your web browser at http://localhost:3000.

Summary:

Trivia Time is a trivia game that offers an immersive experience by providing AI-generated quizzes across various subjects. With its intuitive features such as authentication, user leaderboards, and integration with OpenAI’s GPT API, players can enjoy challenging quizzes while competing with others globally. The game’s tech stack, including Next.js, Chakra UI, and Supabase, ensures a robust and user-friendly environment for players. Overall, Trivia Time is an engaging and entertaining trivia game suitable for trivia enthusiasts of all levels.