Welcome to Trivia Time!. This is a Trivia game built using Supabase, Next.js and other technologies.
The base set of questions are from the Open Trivia Database, but there are some new questions added. There is also an option to submit new questions.
I've used Vercel to deploy the app. You can access it over here: https://trivia-time-sn.vercel.app
- Login with email, Google, Github and Twitter
- Over 3k questions from 20+ categories and various difficulty levels
- Start a new game with any of the selected categories and difficulty level
- View your previous game scores, and see the list of top 20 players worldwide
- Play an unlimited number of times
- Dark mode
- Allow questions to use files other than images (like a video/sound clip)
- Enhance the user profile to add avatar, nick name etc
- Capability to host competitions/tournaments to compete with a set of people
- Bulk upload of questions in excel/json format
- Integrate with other auth providers
This project uses Next.js. So running the project locally would need the following steps:
- Create an environment file .env.local in the root directory and add the following details into it:
NEXT_PUBLIC_SUPABASE_URL={Your supabase url} NEXT_PUBLIC_SUPABASE_ANON_KEY={Your anon key}
- Create the required tables in supabase.io and enable authorization with email
- Run the app in dev mode using
npm run dev
or in production mode usingnpm build && npm start
This project relies on Supabase for almost each part of it.
- All the questions, sessions, profile data, scores etc are all stored using Supabase tables. (the reason why I migrated the questions from opentrivia db to Supabase is because I had to edit some of the questions that they had, and also add more questions to the list)
- The Authentication and profile management in the app is handled using Supabase auth. For now, I've used only magic url, Google, Github and Twitter as sign in methods, but I plan to enhance it.
- The images needed for the questions are stored using Supabase storage. For now, this is applicable only for new question submissions, as the existing questions in Open Trivia DB does not have any images.