Welcome to GPTeasers – a quiz app that challenges your brain with dynamically generated questions. Whether you’re into Roman History or Quantum Physics, GPTeasers has you covered. We even let you choose from multiple AI providers, so you can experience different styles of quiz generation.
https://djsaunders1997.github.io/GPTeasers/
GPTeasers is a straightforward web app that creates quiz-style questions based on topics you select. Simply enter a subject you’re curious about, and our system will generate a quiz just for you using advanced AI. With support for multiple AI providers.
- Dynamic Quizzes: Input any topic and receive a quiz in seconds using genAI.
- Multiple AI Providers: Select from a range of AI services to get different quiz styles.
- Hosted on GitHub Pages: Fast, reliable, and free.
- Visit the App: Go to the GPTeasers site.
- Enter a Topic: Type in your desired topic.
- Start the Quiz: Answer the questions and see your results.
- Share & Challenge Friends: Think you aced it? Share your score and challenge your friends!
- Web Browser (Client): The user interact with a static site hosted on GitHub Pages.
- GitHub Pages (Static Site): Delivers the site’s content. When you hit “Generate Quiz”, the site communicates with our backend.
- Azure Container Apps: The FastAPI backend processes your quiz request and works with different AI providers.
- AI Providers: Multiple AI services process your input and generate unique quiz questions.
This project uses Docker Compose to run both the FastAPI backend and the frontend services locally.
-
fastapi_generate_quiz:
The FastAPI backend handles quiz generation by interacting with various AI providers. -
frontend:
A static version of the front end for local testing (even though the production site is on GitHub Pages).
-
Set Environment Variables
Make sure yourOPENAI_API_KEY
is set in your environment or in a.env
file at the project root:export OPENAI_API_KEY=your_openai_api_key_here
Or create a
.env
file with:OPENAI_API_KEY=your_openai_api_key_here
-
Build and Run the Containers
From the project root, run:docker-compose up --build
This command builds and starts both the backend and frontend containers.
-
Access the Services
- Backend API (FastAPI): http://localhost:8000
- Frontend: http://localhost:8080
With these steps, you can easily test both the backend API and the static frontend locally using Docker Compose.