How krishan1155/online-course-platform works
This is a full-stack online course platform. Students register and verify accounts, discover courses, enroll for free or through payment, then access lessons and track completion; reviews support course discovery. Admins create and manage course content and inspect users, enrollments, and revenue. The graph shows the documented React-to-API and Express route structure, plus backend domain controllers and persistence. Several frontend pages and backend subsystems were not sampled, so their internal calls are not inferred.
Main entry points: routes API routes · App.jsx React application · axios.js API client · models Course and learning records
Components 28
Student and Admin Web
- React application
frontend/src/App.jsx - Account pages
frontend/src/pages/auth - Course discovery
frontend/src/pages/student/Courses.jsx - Course details
frontend/src/pages/student/CourseDetail.jsx - Learning player
frontend/src/pages/student/Learn.jsx - My courses
frontend/src/pages/student/MyCourses.jsx - Admin console
frontend/src/pages/admin - Auth context
frontend/src/context/AuthContext.jsx - API client
frontend/src/api/axios.js
Backend API
- Express server
backend/server.js - API routes
backend/routes - Admin operations
backend/controllers/adminController.js
Course and Learning
- Course catalog
backend/controllers/courseController.js - Enrollment
backend/controllers/enrollmentController.js - Lesson management
backend/controllers/lessonController.js - Progress tracking
backend/controllers/progressController.js - Reviews
backend/controllers/reviewController.js - Course and learning records
backend/models - Media storage
backend/utils/s3.js
Identity and Commerce
- Authentication
backend/controllers/authController.js - Payment processing
backend/controllers/paymentController.js - User records
backend/models/User.js - Refresh-token records
backend/models/RefreshToken.js - Email delivery
backend/utils/sendEmail.js
Other components
- Student
- Administrator
- Razorpay
- MongoDB
Connections 39
- Student → React application: uses
README.md - Administrator → React application: uses
README.md - React application → Account pages: routes to
frontend/src/App.jsx - React application → Course discovery: routes to
frontend/src/App.jsx - React application → Course details: routes to
frontend/src/App.jsx - React application → Learning player: routes to
frontend/src/App.jsx - React application → My courses: routes to
frontend/src/App.jsx - React application → Admin console: routes to
frontend/src/App.jsx - Account pages → API client: uses
- Course discovery → API client: uses
- Course details → API client: uses
- Learning player → API client: uses
frontend/src/pages/student/Learn.jsx - My courses → API client: uses
- Admin console → API client: uses
frontend/src/pages/admin/Enrollments.jsx - Auth context → API client: uses
frontend/src/context/AuthContext.jsx - API client → Express server: calls API
README.md - Express server → MongoDB: connects
backend/server.js - Express server → API routes: mounts
backend/server.js - API routes → Authentication: dispatches
backend/routes/authRoutes.js - API routes → Course catalog: dispatches
backend/routes/courseRoutes.js - API routes → Enrollment: dispatches
backend/routes/enrollmentRoutes.js - API routes → Lesson management: dispatches
backend/routes/lessonRoutes.js - API routes → Progress tracking: dispatches
backend/routes/progressRoutes.js - API routes → Reviews: dispatches
backend/routes/reviewRoutes.js - API routes → Payment processing: dispatches
backend/routes/paymentRoutes.js - API routes → Admin operations: dispatches
backend/routes/adminRoutes.js - Authentication → User records: reads and writes
backend/controllers/authController.js - Authentication → Refresh-token records: creates tokens
backend/controllers/authController.js - Authentication → Email delivery: sends mail
backend/controllers/authController.js - Course catalog → Course and learning records: reads and writes
backend/controllers/courseController.js - Enrollment → Course and learning records: reads and writes
backend/controllers/enrollmentController.js - Lesson management → Course and learning records: reads and writes
backend/controllers/lessonController.js - Lesson management → Course catalog: updates stats
backend/controllers/lessonController.js - Lesson management → Media storage: uploads media
backend/controllers/lessonController.js - Progress tracking → Course and learning records: updates progress
backend/controllers/progressController.js - Reviews → Course and learning records: updates reviews
backend/controllers/reviewController.js - Enrollment → Course and learning records: recalculates progress
backend/controllers/enrollmentController.js - Payment processing → Razorpay: processes payments
- Payment processing → Course and learning records: records payment