How chiragkewlani01/safeexam-platform works
SafeExam is an online exam platform for students and educators. Educators create exams and questions; students join by code, retrieve questions, submit answers, and receive a score. The sampled implementation shows a simpler MCQ flow than the README’s broader product description. The README also documents monitoring, coding exams, AI question generation, and educator reporting, but their implementation files are absent from this tree; those capabilities are shown at the available API-directory level, with documented relationships marked accordingly.
Main entry points: exams.py Exam endpoints · auth.py Auth endpoints · main.py FastAPI app · database.py Database access
Components 23
Web client
- Educator exam form
client/app/admin/create-exam/CreateExamForm.tsx - Educator dashboard
client/app/dashboard/DashboardAdmin.tsx - Student dashboard
client/app/dashboard/DashboardStudent.tsx - Join exam form
client/app/student/join-exam/JoinExamForm.tsx - Navigation
client/components/Navbar.tsx - Auth state
client/store/useAuthStore.ts - API client
client/lib/api.ts
Identity
- Auth endpoints
server/app/api/auth.py - User records
server/app/models/user.py
Exam workflow
- Exam endpoints
server/app/api/exams.py - Exam schemas
server/app/schemas/exam.py - Exam records
server/app/models/exam.py - Question records
server/app/models/question.py
API and persistence
- Database access
server/app/core/database.py - FastAPI app
server/app/main.py
Documented capabilities
- Integrity monitoring
server/app/api - Coding exams
server/app/api - AI question generation
server/app/api - Reports and analytics
server/app/api
Other components
- Browser user
- Google OAuth
- Judge0 execution
- Gemini / OpenRouter
Connections 26
- Browser user → Educator exam form: creates exam
- Browser user → Join exam form: joins exam
- Educator exam form → Exam endpoints: creates exam
- Join exam form → Exam endpoints: joins by code
- Student dashboard → Exam endpoints: views exams
- Educator dashboard → Exam endpoints: manages exams
- Navigation → Auth state: reads session
client/components/Navbar.tsx - Navigation → Auth endpoints: logs out
- API client → Exam endpoints: sends requests
- API client → Auth endpoints: sends requests
- FastAPI app → Auth endpoints: registers router
server/app/main.py - FastAPI app → Exam endpoints: registers router
server/app/main.py - FastAPI app → Database access: creates tables
server/app/main.py - Auth endpoints → Database access: queries users
server/app/api/auth.py - Auth endpoints → User records: queries users
server/app/api/auth.py - Exam endpoints → Database access: queries records
server/app/api/exams.py - Exam endpoints → User records: checks role
server/app/api/exams.py - Exam endpoints → Exam records: queries exams
server/app/api/exams.py - Exam endpoints → Question records: queries questions
server/app/api/exams.py - Exam endpoints → Exam schemas: validates payloads
server/app/api/exams.py - Auth endpoints → Google OAuth: authenticates with
server/app/api/auth.py - Browser user → Integrity monitoring: triggers exam controls
- Integrity monitoring → Exam endpoints: reports violations
server/app/api/exams.py - Coding exams → Judge0 execution: runs submissions
- AI question generation → Gemini / OpenRouter: generates questions
- Educator dashboard → Reports and analytics: views reports