How boyainjun-svg/it-academy works
IT Academy is a Next.js learning platform whose main learner journey is browsing structured courses, opening a lesson, and using its lesson content, challenges, quizzes, and lab guidance. It also provides a browser playground, learner accounts with OTP verification and progress, and separate admin management. Course content is data-driven; API routes own calls to authentication, persistence, email, and rate-limiting helpers. The graph follows documented and indexed relationships; unsampled pages and admin capabilities are represented at their exact paths, but their internal calls are not inferred.
Main entry points: page.tsx Lesson experience · auth Learner auth APIs · courses.ts Course registry · admin Admin APIs
Components 27
Learning experience
- Home
src/app/page.tsx - Course catalog
src/app/courses/page.tsx - Course details
src/app/courses/[courseId]/page.tsx - Lesson experience
src/app/courses/[courseId]/[lessonId]/page.tsx - Code playground
src/app/playground/page.tsx - Learner dashboard
src/app/dashboard/page.tsx - Lesson diagrams
src/components/content/LessonDiagram.tsx - Result viewer
src/components/content/LessonResultViewer.tsx - Auth prompt
src/components/auth/AuthRequiredModal.tsx
Course content
- Course registry
src/data/courses.ts - Course and lesson data
src/data/courses - Content schema
src/data/types.ts
Accounts and access
- Learner sign-in
src/app/auth/login/page.tsx - Learner registration
src/app/auth/register/page.tsx - Learner auth APIs
src/app/api/auth - OTP email delivery
src/lib/mailer.ts - Learning progress
src/lib/progress.ts
Administration
- Admin console
src/app/admin/page.tsx - Admin sign-in
src/app/admin/login/page.tsx - Admin APIs
src/app/api/admin - Admin authorization
src/lib/admin-auth.ts
Runtime services
- Accounts and sessions
src/lib/server-db.ts - Request throttling
src/lib/rate-limiter.ts - MongoDB connection
src/lib/mongodb.ts - MongoDB
- Email provider
Other components
- Learner
Connections 31
- Learner → Home: opens
- Learner → Course catalog: browses
- Course catalog → Course registry: loads courses
src/app/courses/page.tsx - Course registry → Course and lesson data: assembles
src/data/courses.ts - Course registry → Content schema: uses schema
src/data/courses.ts - Learner → Course details: selects course
- Course details → Course registry: loads course
- Learner → Lesson experience: opens lesson
- Lesson experience → Course registry: loads lesson
src/app/courses/[courseId]/[lessonId]/page.tsx - Lesson experience → Learning progress: updates progress
src/app/courses/[courseId]/[lessonId]/page.tsx - Lesson experience → Lesson diagrams: renders
src/app/courses/[courseId]/[lessonId]/page.tsx - Lesson experience → Result viewer: renders
src/app/courses/[courseId]/[lessonId]/page.tsx - Lesson experience → Auth prompt: renders
src/app/courses/[courseId]/[lessonId]/page.tsx - Learner → Code playground: practices
- Learner → Learner dashboard: views progress
- Home → Learning progress: reads progress
src/app/page.tsx - Learner → Learner registration: registers
- Learner → Learner sign-in: signs in
- Learner registration → Learner auth APIs: submits registration
- Learner sign-in → Learner auth APIs: submits credentials
- Learner auth APIs → Accounts and sessions: manages accounts
src/app/api/auth/register/route.ts - Learner auth APIs → Request throttling: checks limits
src/app/api/auth/register/route.ts - Learner auth APIs → OTP email delivery: sends OTP
src/app/api/auth/register/route.ts - OTP email delivery → Email provider: delivers email
src/lib/mailer.ts - Accounts and sessions → MongoDB connection: gets connection
src/lib/server-db.ts - MongoDB connection → MongoDB: queries
- Admin console → Admin APIs: manages records
- Admin sign-in → Admin APIs: authenticates
- Admin APIs → Admin authorization: checks access
src/app/api/admin/users/route.ts - Admin APIs → Accounts and sessions: reads and writes
src/app/api/admin/users/route.ts - Admin authorization → Accounts and sessions: validates session
src/lib/admin-auth.ts