How nikhilkeshava/online-course-registration- works
Project Type & Purpose
• This is a classic LAMP‐stack full-stack web application: an Online Course Registration Portal built with PHP (server-side), MySQL (database), HTML/CSS/JS/Bootstrap (frontend).
• It supports two primary user roles: Students (self-registration, enrollment, profile management) and Admins (course/department/semester management, student management, logs).
File Structure Analysis
Top-level:
• admin/ – All admin-module pages, assets, and includes (config, header/footer, menubar).
• assets/ – Shared CSS/JS/fonts/images used by student-facing pages.
• includes/ – Shared PHP fragments (config.php for DB connection, header/footer, menubar).
• *.php files at root – Student UI pages (index.php, enroll.php, my-profile.php, change-password.php, etc.).
• SQL File/onlinecourse.sql – Database schema for tables: students, courses, departments, enrollment history, sessions, semesters, levels, etc.
README Insights
• Confirms UI built with HTML/CSS, JavaScript, Bootstrap, PHP, and MySQL.
Main Components
a. Client (Web Browser)
b. Web Server Layer
• Apache/Nginx
• PHP Application
– Student Module (root .php files + includes)
– Admin Module (admin/*.php + admin/includes)
– Shared Libraries (config.php for DB connectivity, header/footer, menubar)
c. Database Layer
• MySQL Database (tables for users, courses, enrollment, departments, semesters, levels, logs)
d. Static Asset Store
• CSS/JS/Images/Fonts (assets/ and admin/assets/)
e. (Optional) External Service
• Pincode Verification API (pincode-verification.php – could call a third-party API or internal service)
Interactions & Data Flow
• Student/Admin ↔ HTTP ↔ Web Server (PHP scripts)
• PHP scripts ↔ SQL queries ↔ MySQL Database
• PHP scripts ↔ File I/O ↔ studentphoto/ (storing uploaded photos)
• (Optional) PHP pincode-verification.php ↔ External API (if implemented)
Architectural Patterns & Principles
• Separation of Concerns:
• Presentation layer (HTML/CSS/JS/Bootstrap)
• Business logic layer (PHP controllers in both modules)
• Data layer (MySQL)
• Reusability: Shared “includes” folder for config and UI fragments.
• Module Isolation: Admin and Student modules live in separate directories.
• Basic MVC flavor:
• Model → MySQL tables
• View → PHP+HTML templates (header/footer/includes)
• Controller → individual .php scripts handling form submissions, queries.
1) Client Tier (Browsers: Student / Admin interfaces)
2) Web Server Tier (Apache + PHP application)
– subdivide into Student Module and Admin Module
– show Shared Includes & Asset folders
3) Database Tier (MySQL)
4) (Optional) External Services Tier (Pincode Verification API)
– From Client to Web Server: “HTTP GET/POST”
– From PHP to MySQL: “SQL Query / Result Set”
– From PHP to Asset Store: “Static Asset Fetch”
– Blue for Presentation (Client & Static Assets)
– Green for Application Logic (PHP modules)
– Orange for Data Storage (MySQL)
– Gray for External Interfaces
– “/includes/config.php” for DB connection
– “admin/course.php” under Admin Module
– “index.php, enroll.php, my-profile.php” under Student Module
e. If using UML or C4:
– C1: System context (User, Web App, DB, External API)