How rohitm05/onlineexam works
Project type and purpose
• This is a full-stack, monolithic PHP web application called “onlineexam.”
• It provides an online examination platform with user and admin interfaces for managing categories, questions, quizzes and sending email notifications.
High-level architecture based on the file tree
• Presentation layer (Frontend)
– PHP/HTML view pages: index.php, login/register pages, dashboard pages (usermanagement.php, postmanagement.php, questionmanagement.php, etc.)
– CSS (css/sb-admin.css, mystyle.css) and JS assets (js/sb-admin.js, jqueryvalidation.js, additional-methods.js, demo charts & datatables)
• Application layer (Backend logic)
– PHP scripts handling form submissions & CRUD: add-*.php, edit-*.php, delete-*.php, update-*.php
– Authentication & session management: user-login.php/back-end, admin-login.php, logout.php
– Business modules: quiz.php/quiz-calculate.php, mail.php/mail1.php for emailing, active-user.php/unactive-user.php
– Common utilities: con.php (database connection), header-admin.php, footer-admin.php
• Data layer
– Relational database (MySQL or MariaDB) accessed via con.php
• External service
– PHPMailer (vendor1/phpmailer) for sending emails
Key architectural patterns & design principles
• Layered architecture:
– Presentation → Application → Data
• Modular separation by feature: Authentication, Category Management, Question Management, Quiz Execution, Email Notification
• Dependencies managed via Composer (vendor1/)
Main components & interactions
a. Client Web Browser (Users & Admins)
– Sends HTTP requests to the Web Server, receives rendered HTML, CSS, JS
b. Web Server + PHP Runtime
– Routes requests to specific PHP scripts
– Executes business logic, accesses the database, triggers email sending
c. Database
– Stores users, categories, questions, quiz results
d. PHPMailer Service
– SMTP/email provider used by mail.php to send notifications or confirmations
e. Static Asset Server
– Serves CSS/JS under /css and /js
Interaction flow example:
1. User submits quiz form → quiz.php
2. quiz.php reads questions from DB, calculates score in quiz-calculate.php
3. quiz-calculate.php updates DB, invokes mail1.php to notify user
4. Response rendered to the browser