How knightfury-v/student_course_hub works
Project type and purpose
• This is a classic full-stack, LAMP-style web application (“Student Course Hub”) written in PHP.
• It exposes three user interfaces:
• Public/student UI (browsing programs/modules, search, register/withdraw interest)
• Admin panel (CRUD for programs/modules, user management, export student data)
• Staff panel (view programs/modules they lead).
• Backed by a MySQL database (created via student_course_hub.sql), uses CSS for styling and file-system images.
High-level architecture components
a. Client tier (browser)
• Public pages (index.php, module.php, program.php, search.php, register_interest.php, withdraw_interest.php)
• Admin UI (all files under /admin/*.php)
• Staff UI (staff_dashboard, staff_login/logout under /admin/)
• Static assets (CSS under /css, images under /images).
b. Web server & application tier
• Apache or Nginx + PHP
• includes/db_connect.php (DB connection)
• includes/functions.php (input sanitization, helper functions)
c. Data tier
• MySQL database (tables: programs, modules, students_interests, admin_users, staff_users, etc.)
Interactions and data flow
• Browser sends HTTP(S) requests to PHP scripts.
• PHP scripts in /root or /admin invoke includes/functions.php to validate/sanitize input, then call DB via includes/db_connect.php.
• Queries go to MySQL; results rendered as HTML + CSS.
• For AJAX or REST calls (if any), same PHP endpoints handle JSON responses.
Architectural patterns & principles
• Layered architecture (Presentation → Application/Business logic → Data)
• Separation of concerns:
• Public vs Admin vs Staff modules in separate folders
• Shared logic and DB connectivity centralized in /includes
• Static assets under /css and /images
• Basic security patterns: input sanitization, credential checks, session handling in login scripts.
Summary
• Break the server layer into three bounded contexts (Public, Admin, Staff) plus shared libraries.
• Static assets as a separate component.
• Data flows and technology stacks.
• Provide enough detail to see both high-level structure and the key subsystems.