How bhanuteja856/archi-ai-exam-prep works
Exam Prep AI is a mobile study app that turns an uploaded PDF into a timed practice quiz, presents the quiz and score, and saves results for later review. The main path runs from the React Native app through its API service to the Express backend, which extracts PDF text and attempts to use the Python quiz agent; the backend also has a direct Gemini generation path. Firebase supplies authentication, profiles, and quiz history, with local fallbacks. The excerpts show these main calls, but not the Express-to-agent request details or all quiz-screen logic.
Main entry points: App.js Quiz app UI · index.js HTTP API · firebase.js Auth and data service · quiz_agent.py Quiz orchestration
Components 17
Mobile app
- Quiz app UI
mobile/App.js - Quiz attempt
mobile/App.js - API client
mobile/src/services/api.js
Quiz backend
- HTTP API
server/index.js - PDF extraction
server/index.js - Direct Gemini generation
server/index.js
AI agent
- Agent API
server/agent/main.py - Agent PDF indexing
server/agent/main.py - Quiz orchestration
server/agent/quiz_agent.py - Study text retrieval
server/agent/quiz_agent.py - Web search
server/agent/quiz_agent.py
Identity and history
- Auth and data service
mobile/src/services/firebase.js
Other components
- Student
- Google Gemini
- Tavily search
- Firebase Auth
- Cloud Firestore
Connections 20
- Student → Quiz app UI: uses
mobile/App.js - Quiz app UI → API client: requests quiz
mobile/App.js - API client → HTTP API: posts PDF
mobile/src/services/api.js - HTTP API → PDF extraction: extracts text
server/index.js - HTTP API → Agent API: routes generation
server/index.js - Agent API → Agent PDF indexing: indexes text
server/agent/main.py - Agent API → Quiz orchestration: generates quiz
server/agent/main.py - Quiz orchestration → Study text retrieval: retrieves context
server/agent/quiz_agent.py - Quiz orchestration → Web search: searches updates
server/agent/quiz_agent.py - Web search → Tavily search: queries
server/agent/quiz_agent.py - Quiz orchestration → Google Gemini: generates questions
server/agent/quiz_agent.py - HTTP API → Direct Gemini generation: fallback generation
server/index.js - Direct Gemini generation → Google Gemini: generates questions
server/index.js - HTTP API → API client: returns quiz
mobile/src/services/api.js - Quiz app UI → Quiz attempt: presents quiz
mobile/App.js - Quiz attempt → Auth and data service: saves results
mobile/App.js - Quiz app UI → Auth and data service: loads history and profile
mobile/App.js - Quiz app UI → Auth and data service: authenticates
mobile/App.js - Auth and data service → Firebase Auth: signs in users
mobile/src/services/firebase.js - Auth and data service → Cloud Firestore: reads and writes
mobile/src/services/firebase.js