How kayvanshah1/quizgenie works
Project type and purpose
• QuizGenie is a monolithic, full-stack AI application (back-end + UI) for dynamically generating quizzes from user-provided documents (PDFs).
• Its goal is to ingest text, use AI (Google Gemini + Langchain) to create questions, store/retrieve embeddings (ChromaDB), and present interactive quizzes via Streamlit.
File structure
• Top-level:
• README.md, LICENSE, .gitignore, requirements.txt, env.yml
• /app: contains the core Python modules and entrypoints
• app/ module breakdown:
• main.py – orchestrates the Streamlit UI and ties components together
• settings.py – configuration (env variables, paths)
• pdf_processing.py – PDF ingestion and text extraction
• embedding_client.py – calls Langchain/Google Gemini to embed text
• vector_store.py – persists and queries embeddings in ChromaDB
• quiz.py – generates questions, runs AI prompts, formats feedback
README for architecture clues
• Technologies: Python, Streamlit (UI), Langchain (NLP), ChromaDB (vector DB), Google Gemini (AI model), GCP for auth
• User (browser)
• Streamlit UI (app/main.py)
• PDF Processor (app/pdf_processing.py)
• Embedding Client (app/embedding_client.py)
• Vector Store (ChromaDB via app/vector_store.py)
• Quiz Generator (app/quiz.py + Google Gemini API)
• Configuration/Auth layer (app/settings.py + GCP service account)
b. Relationships & data flow:
1. User uploads PDF → Streamlit UI
2. UI calls PDF Processor → extracted text
3. Text → Embedding Client → embeddings
4. Embeddings → Vector Store (ChromaDB) for similarity searches
5. UI or Quiz module triggers question generation → Google Gemini API
6. Gemini responds with questions/explanations → UI
c. Architectural patterns & design principles:
• RAG (Retrieval‐Augmented Generation) pipeline
• Single codebase with clear module separation (ingestion, embedding, storage, generation, presentation)
• Configuration via environment (.env, settings.py)
d. Key technologies & frameworks:
• Streamlit for front-end
• Langchain for text embedding orchestration
• ChromaDB as vector database
• Google Gemini API (AI model)
• GCP service account for authentication