How hafiz-shahzaib/fyp works
This is a web learning platform for students, educators, and administrators: users discover courses, enroll, view lectures, complete assignments, and interact through reviews and chat; educators and admins manage course content and users. The frontend routes role-oriented experiences, while an Express API dispatches requests to controllers and MongoDB models. The graph includes documented payment, AI search, and image-chat capabilities, but several frontend-to-API and unsampled service relationships are not evidenced in the excerpts, so they are not asserted as direct calls.
Main entry points: index.js Express API and route mounts · App.jsx Role-based web app · courseController.js Course and lecture management · messageController.js Text and image responses
Components 30
Web application
- Role-based web app
frontend/src/App.jsx - Course and lecture views
frontend/src/pages/ViewCourse.jsx - Assignment views
frontend/src/pages/Assignment/ViewAssignment.jsx - Admin course and user tools
frontend/src/pages/Admin/AdminCourses.jsx - AI course search
frontend/src/pages/SearchWithAi.jsx - Chat and community views
frontend/src/pages/Chat/Chat.jsx
Identity and accounts
- Authentication routes
backend/route/authRoute.js - Sign-in and account recovery
backend/controller/authController.js - User records
backend/model/userModel.js
Learning content
- Course routes
backend/route/courseRoute.js - Course and lecture management
backend/controller/courseController.js - Course records
backend/model/courseModel.js - Lecture records
backend/model/lectureModel.js - Enrollment routes
backend/route/enrollRoute.js - Payment routes
backend/route/paymentRoute.js - Course search
backend/controller/searchController.js
Assignments
- Assignment and submission records
backend/model/assignmentModel.js
Community features
- Review routes
backend/route/reviewRoute.js - Review handling
backend/controller/reviewController.js - Review records
backend/model/reviewModel.js - Chat routes
backend/route/chatRoute.js - Message routes
backend/route/messageRoute.js - Text and image responses
backend/controller/messageController.js - Chat records
backend/model/chatModel.js - OpenAI-compatible service
backend/config/openai.js - ImageKit service
backend/config/imagekit.js
Backend API
- Express API and route mounts
backend/index.js
Other components
- Learner
- Educator
- Administrator
Connections 31
- Learner → Role-based web app: uses
frontend/src/App.jsx - Educator → Role-based web app: uses
frontend/src/App.jsx - Administrator → Role-based web app: uses
frontend/src/App.jsx - Role-based web app → Course and lecture views: routes to
frontend/src/App.jsx - Role-based web app → Assignment views: routes to
frontend/src/App.jsx - Role-based web app → Admin course and user tools: routes to
frontend/src/App.jsx - Role-based web app → AI course search: routes to
frontend/src/App.jsx - Role-based web app → Chat and community views: routes to
frontend/src/App.jsx - Express API and route mounts → Authentication routes: mounts
backend/index.js - Express API and route mounts → Course routes: mounts
backend/index.js - Express API and route mounts → Enrollment routes: mounts
backend/index.js - Express API and route mounts → Payment routes: mounts
backend/index.js - Express API and route mounts → Review routes: mounts
backend/index.js - Express API and route mounts → Chat routes: mounts
backend/index.js - Express API and route mounts → Message routes: mounts
backend/index.js - Authentication routes → Sign-in and account recovery: dispatches
backend/route/authRoute.js - Sign-in and account recovery → User records: reads and writes
backend/controller/authController.js - Course routes → Course and lecture management: dispatches
backend/route/courseRoute.js - Course and lecture management → Course records: reads and writes
backend/controller/courseController.js - Course and lecture management → Lecture records: creates and updates
backend/controller/courseController.js - Course and lecture management → Assignment and submission records: manages assignments
backend/controller/courseController.js - Course and lecture management → User records: checks educator
backend/controller/courseController.js - Review routes → Review handling: dispatches
backend/route/reviewRoute.js - Review handling → Course records: checks course
backend/controller/reviewController.js - Review handling → Review records: reads and writes
backend/controller/reviewController.js - Message routes → Text and image responses: dispatches
backend/route/messageRoute.js - Text and image responses → Chat records: reads and writes
backend/controller/messageController.js - Text and image responses → OpenAI-compatible service: requests text reply
backend/controller/messageController.js - Text and image responses → ImageKit service: uploads image
backend/controller/messageController.js - Course routes → Course search: dispatches search
backend/route/courseRoute.js - Chat routes → Express API and route mounts: mounted by
backend/index.js