How mydfreecoaching/freemock works
This is a Next.js web platform for free online mock exams and student support, backed by PostgreSQL. Students register, browse and take exams, then review results, rankings and analysis; the README also documents weekly analysis and faculty-submitted tests with admin approval. The graph includes the registration/profile, exam analytics, administration and faculty branches. Some runtime routes were not sampled, so workflow links supported only by product documentation cite the README; unsampled implementation details are not inferred.
Main entry points: db.js PostgreSQL data · analysis.js Analysis engine · route.js Registration · page.js Dashboard
Components 21
Student experience
- Registration
app/api/register/route.js - Student profile
app/api/profile/route.js - Dashboard
app/dashboard/page.js
Exam and analytics
- Exam catalog
lib/exams.js - Exam pages
app/exam/[code]/page.js - Exam attempts
lib/attempt.js - Scoring
lib/scoring.js - Results
app/result/[id]/page.js - Rankings
lib/rank.js - Leaderboards
lib/lb.js - Test analysis
app/analysis/[id]/page.js - Analysis engine
lib/analysis.js - Weekly analysis
app/weekly/page.js
Administration
- Admin console
app/admin/page.js - Admin exports
app/api/admin/export/route.js
Faculty submissions
- Faculty portal
app/faculty/page.js - Faculty registration
app/api/faculty/register/route.js - Course management
lib/coaching.js
Shared runtime
- PostgreSQL data
lib/db.js - Session auth
lib/auth.js
Other components
- Student
Connections 27
- Student → Registration: registers
app/api/register/route.js - Registration → PostgreSQL data: writes profile
app/api/register/route.js - Registration → Student profile: updates later
- Registration → Session auth: creates session
app/api/register/route.js - Student → Dashboard: opens account
app/dashboard/page.js - Dashboard → PostgreSQL data: loads student data
app/dashboard/page.js - Dashboard → Exam catalog: loads exams
app/dashboard/page.js - Dashboard → Leaderboards: shows rankings
- Student → Exam pages: chooses exam
- Exam pages → Exam attempts: starts attempt
- Exam attempts → Scoring: scores answers
- Scoring → Results: produces result
app/result/[id]/page.js - Results → Rankings: shows rank
app/result/[id]/page.js - Test analysis → Analysis engine: requests analysis
app/analysis/[id]/page.js - Analysis engine → PostgreSQL data: reads attempts
lib/analysis.js - Analysis engine → Rankings: uses ranking
lib/analysis.js - Weekly analysis → Analysis engine: computes weekly view
app/weekly/page.js - Leaderboards → PostgreSQL data: reads results
lib/lb.js - Leaderboards → Scoring: finalizes attempts
lib/lb.js - Leaderboards → Exam catalog: loads exam list
lib/lb.js - Admin console → PostgreSQL data: manages records
app/admin/page.js - Admin exports → Analysis engine: exports analysis
app/api/admin/export/route.js - Admin exports → PostgreSQL data: queries records
app/api/admin/export/route.js - Faculty portal → Course management: loads courses
app/faculty/page.js - Faculty portal → Faculty registration: submits registration
app/faculty/page.js - Faculty registration → Course management: checks courses
app/api/faculty/register/route.js - Course management → PostgreSQL data: stores courses
lib/coaching.js