How sushant22067/tej-test-series works
This repository implements a web-based exam portal: students discover test series, register or sign in, obtain access, take tests, and review results; staff and administrators have separate oversight workflows. The graph preserves the free-mock, CBT, payment, result-analysis, and exam-authoring areas visible in the tree. Several routes and payment flows were not sampled, so their internal connections are omitted rather than inferred; edges shown are supported by excerpts or the source index.
Main entry points: prisma.ts Prisma client · ResultClient.tsx Result review · ExamPage.tsx Exam runner · route.ts Dashboard data
Components 33
Student experience
- Student portal
app/student/page.tsx - Test series
app/test-series/[slug]/page.tsx - Student login
app/student/login/StudentLoginForm.tsx - Student dashboard
app/student/dashboard/page.tsx - Dashboard data
app/api/student/dashboard/route.ts - Checkout
app/student/checkout/page.tsx - Payment routes
app/api/student/payment
Assessment and results
- Free mock tests
app/api/free-mock-test/route.ts - Exam runner
components/cbt/ExamPage.tsx - Exam header
components/cbt/ExamHeader.tsx - Question panel
components/cbt/QuestionPanel.tsx - Exam footer
components/cbt/ExamFooter.tsx - Question palette
components/cbt/QuestionPalette.tsx - Attempt and submission
app/api/student/attempts/[attemptId] - Answer operations
app/api/student/attempts/[attemptId]/answers/route.ts - Result data
app/api/student/results/[attemptId]/route.ts - Result page
app/results/[attemptId]/page.tsx - Result review
components/student/ResultClient.tsx - Performance review
components/student/PerformanceReview.tsx - Math rendering
components/student/MathText.tsx
Admin and staff
- Admin portal
app/admin/page.tsx - Admin results
app/admin/results/[resultId]/page.tsx - Payment oversight
app/api/admin/payments/route.ts - Admin operations
app/api/admin - Question authoring
components/admin/PdfQuestionBuilder.tsx - Staff dashboard
app/staff/dashboard/page.tsx - Staff overview data
app/api/staff/overview/route.ts
Identity and access
- Admin sessions
lib/auth.ts - Student sessions
lib/student-auth.ts - Staff sessions
lib/staff-auth.ts
Data layer
- Prisma client
lib/prisma.ts - PostgreSQL
Other components
- Student
Connections 26
- Test series → Prisma client: reads series
app/test-series/[slug]/page.tsx - Student dashboard → Dashboard data: loads dashboard
- Dashboard data → Student sessions: authenticates
app/api/student/dashboard/route.ts - Dashboard data → Prisma client: queries tests
app/api/student/dashboard/route.ts - Checkout → Payment routes: payment requests
- Free mock tests → Prisma client: reads tests
app/api/free-mock-test/route.ts - Exam runner → Exam header: renders
components/cbt/ExamPage.tsx - Exam runner → Question panel: renders
components/cbt/ExamPage.tsx - Exam runner → Exam footer: renders
components/cbt/ExamPage.tsx - Attempt and submission → Student sessions: authenticates
app/api/student/attempts/[attemptId]/route.ts - Attempt and submission → Prisma client: reads and submits
app/api/student/attempts/[attemptId]/route.ts - Result page → Result review: renders
app/results/[attemptId]/page.tsx - Result page → Prisma client: reads result
app/results/[attemptId]/page.tsx - Result review → Result data: loads result
- Result review → Performance review: renders
components/student/ResultClient.tsx - Result review → Math rendering: renders text
components/student/ResultClient.tsx - Payment oversight → Admin sessions: authorizes
app/api/admin/payments/route.ts - Payment oversight → Prisma client: queries payments
app/api/admin/payments/route.ts - Admin operations → Prisma client: admin data access
app/api/admin/payments/route.ts - Question authoring → Prisma client: question persistence
- Staff overview data → Staff sessions: authenticates
app/api/staff/overview/route.ts - Staff overview data → Prisma client: queries overview
app/api/staff/overview/route.ts - Admin sessions → Prisma client: checks admin
lib/auth.ts - Student sessions → Prisma client: loads student
lib/student-auth.ts - Staff sessions → Prisma client: loads staff
lib/staff-auth.ts - Prisma client → PostgreSQL: database connection
lib/prisma.ts