How harshsharma07k/proctor works
Proctor is a student-and-teacher portal for sandboxed code grading and teacher-vetted doubt answers. Students browse problems, submit code, then retrieve asynchronous grading results and AI feedback; they can also post doubts, whose AI-generated drafts remain hidden from other students until a teacher approves them. Teachers review, edit, approve, or reject drafts. The README documents the major boundaries and capabilities; the sampled source confirms API routing and key review, submission, and doubt dispatch, but does not show every service implementation.
Main entry points: prisma.ts PostgreSQL · layout.tsx Student and teacher UI · app.ts HTTP API · worker.ts Grading worker
Components 23
Web portal
- Student and teacher UI
apps/web/app/layout.tsx - Problem pages
apps/web/app/problems/page.tsx - Submission history
apps/web/app/submissions/page.tsx - Doubt board
apps/web/app/doubts/page.tsx - Teacher review UI
apps/web/app/teacher/review/page.tsx
API and identity
- HTTP API
apps/api/src/app.ts - Authentication
apps/api/src/modules/auth/auth.service.ts - Problem catalog
apps/api/src/modules/problems/problems.controller.ts
Code grading
- Submission handling
apps/api/src/modules/submissions/submissions.controller.ts - Grading worker
apps/api/src/queue/worker.ts - Code executor
apps/api/src/sandbox/executor.factory.ts - AI grading feedback
apps/api/src/modules/submissions/grading.service.ts
Doubt answers
- Doubt handling
apps/api/src/modules/doubts/doubts.controller.ts - Draft generation
apps/api/src/modules/answers/answers.service.ts - Teacher review
apps/api/src/modules/review/review.service.ts - AI workflows and guards
apps/api/src/modules/ai/graphs/answer.graph.ts
State and integrations
- PostgreSQL
apps/api/src/db/prisma.ts - Grading jobs
apps/api/src/queue/job.repository.ts - AI memory store
apps/api/src/modules/ai/memory/index.ts
Other components
- Student
- Teacher
- Sandbox runtime
- LLM provider
Connections 30
- Student → Student and teacher UI: uses
- Teacher → Student and teacher UI: uses
- Student and teacher UI → HTTP API: REST requests
- HTTP API → Authentication: routes auth
- HTTP API → Problem catalog: routes problems
- HTTP API → Submission handling: routes submissions
- HTTP API → Doubt handling: routes doubts
- HTTP API → Teacher review: routes review
- Authentication → PostgreSQL: reads and writes
- Problem catalog → PostgreSQL: reads catalog
- Submission handling → PostgreSQL: records submissions
- Submission handling → Grading jobs: enqueues grading
- Grading worker → Grading jobs: claims jobs
- Grading worker → Code executor: runs test cases
- Code executor → Sandbox runtime: executes code
- Grading worker → PostgreSQL: saves results
- AI grading feedback → LLM provider: requests feedback
- AI grading feedback → PostgreSQL: stores feedback
- Doubt handling → PostgreSQL: creates doubt
- Doubt handling → Draft generation: dispatches draft
- Draft generation → AI workflows and guards: runs workflow
- AI workflows and guards → LLM provider: requests draft
- AI workflows and guards → AI memory store: queries context
- Draft generation → PostgreSQL: stores draft
- Teacher review → PostgreSQL: loads queue and transitions
- Teacher review → AI memory store: remembers approved answer
- Problem pages → Student and teacher UI: renders within
- Submission history → Student and teacher UI: renders within
- Doubt board → Student and teacher UI: renders within
- Teacher review UI → Student and teacher UI: renders within