QuizTron is web app that quizzes and drills users on various topics. What do you think you're an expert on?
To spin up a local copy of QuizTron for development, you will first need to gather a few API keys:
- Perplexity. Perplexity is used as the primary AI for its search and deep research capabilities. Follow the instructions here to get your API key. Note you will need to buy some credits.
- OpenAI. OpenAI is used for cheaper requests that do not require search. Couldn't find an easy link, for this you'll have to hunt around a bit. Note you will need to buy some credits.
- Supabase. Supabase is used for the database and authentication. Follow the instructions here. This one's free tier should be sufficient for development. You will need both the anonymous role key and the service role key (the anonymous role key is used for read-only front-end access, while the service role key is used for back-end write access). In the supabase sql editor, copy/paste the schema from
supabase/schema.sqlto create the necessary tables.
Save your keys to a .env.local file in the root of the project; see .env.example. Keys needed for the front-end will also need to be added to the frontend/.env.local file; see the corresponding .env.example file there.
Once you've got all your keys, you'll need to install dependencies. QuizTron requires Node 20 and Python 3.12 to be installed (new versions might also work, but haven't been tested). Then you can run:
# Install Python dependencies
cd backend
# Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # Window: source venv\Scripts\activate
pip install -r requirements.txt
# Install Node dependencies
cd ../frontend
npm installOnce dependencies are installed, you can run the two development servers:
source backend/venv/bin/activate # Windows: source backend/venv/Scripts/activate
make devAnd for the front-end:
cd frontend
npm run devYou should now be able to access the app at http://localhost:5173, and the back-end will run on http://localhost:5000 by default. You will need to register an account to use the app, and you can do so by going to http://localhost:5173/account/signup.