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:
- Clone the repository from GitHub:
git clone [repository-url]
- Navigate to the project directory:
cd trivia-time
- Install the required dependencies using npm:
npm install
- Set up the environment variables by creating a
.envfile and adding the following variables:
NEXT_PUBLIC_SUPABASE_URL=[supabase-url]
NEXT_PUBLIC_SUPABASE_KEY=[supabase-key]
OPENAI_API_KEY=[openai-api-key]
- Start the development server:
npm run dev
- 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.