# vijay11-08/rku_placementportal architecture

> Architecture diagram of the GitHub repository vijay11-08/rku_placementportal, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vijay11-08/rku_placementportal
- Repository: https://github.com/vijay11-08/rku_placementportal

## Overview

1. This repository is a monolithic PHP 8.2+ placement management portal backed by MySQL 8.0. The architecture is not service-based; instead, the application is split into role-specific PHP entry points and shared core files, with Bootstrap/jQuery used for the UI.

2. The main architectural boundary is role-based access. Separate top-level directories exist for Admin, TPO, Faculty, Student, and Recruiter. Each role has its own `index.php` and layout shell (`*_layout.php`), which suggests the same database and shared business rules are rendered through different permissioned interfaces.

3. The root layer contains the common application flow: landing pages, login/registration/password reset, authentication helpers, CSRF protection, rate limiting, and global layout. This is the primary ingress for the system, and most role pages appear to assume an authenticated session established here.

4. The core domain is campus recruitment drives. Drive creation, approval, listing, editing, attendance, selection reports, and student applications appear across all panels. Recruiters create or manage drives, TPO/Admin approve and review them, faculty screen students, and students browse drives and apply from the same underlying drive model.

5. Student data is a major shared subsystem. The Student panel exposes a multi-step registration/profile workflow (`Step1` through `Step5`), academic details, projects, internships, certifications, resume checking, and profile completion calculation. The same student profile data is then consumed by faculty, TPO, admin, and recruiters for screening and portfolio review.

6. Notification handling is a distinct subsystem rather than just scattered mail calls. The `notifications/` folder contains controller/service/model/view-style files plus events and an API, while root and role pages include notification views. This implies a centralized event-to-notification flow, likely backed by MySQL and surfaced through polling/AJAX in the UI.

7. Communication features are built into the portal at the role layer. There are dedicated broadcast pages for email and WhatsApp in Admin, TPO, Faculty, and Recruiter areas, plus shared mail support via PHPMailer in `assets/PHPMailer` and `config_mail.php`. That makes outbound communication a first-class business function, not an external add-on.

8. Data access is centralized around MySQL configuration files such as `db_config.php` and `db_recruiter.php`, with helper layers for auth, logging, settings, and email. The presence of `models/ActivityLog.php` and `helpers/Logger.php` indicates some shared persistence abstractions, but most business pages still appear to be self-contained PHP scripts using the common connection and helper layer.

9. The application stores uploaded artifacts in a structured `uploads/` tree: resumes, student documents, drive attachments, certificates, internship proof, offers, and QR codes. This file store is part of the architecture because many workflows depend on document submission and retrieval, especially student onboarding and recruiter selection.

10. There is a small async boundary under `ajax/` for dependent UI data like batches, branches, departments, divisions, and semesters. These endpoints support dynamic form behavior and likely power the filtering/search screens across the role panels.

11. Background and operational concerns are handled in a lightweight way. A `cron/cleanup_logs.php` job manages log cleanup, root scripts like `auto_migrate.php`, `check_db.php`, and `db_inspector.php` support database setup/validation, and `logs/mail.log` captures mail activity. This is a classic PHP deployment model with some built-in admin/maintenance tooling rather than a separate ops service.

12. Overall, the system’s critical data flows are: login/authentication into a role shell; profile/drive/student data stored in MySQL and documents in `uploads/`; drive approval and selection moving across Recruiter → TPO → Faculty → Student → Admin; and notifications/broadcasts propagating events back out through email, WhatsApp, and in-app notice boards.

Main entry points: [`db_config.php`](https://github.com/vijay11-08/rku_placementportal/blob/main/db_config.php) (DB config), [`notifications/notification_service.php`](https://github.com/vijay11-08/rku_placementportal/blob/main/notifications/notification_service.php) (Notifications), [`Student/index.php`](https://github.com/vijay11-08/rku_placementportal/blob/main/Student/index.php) (Student panel), [`Recruiter/CreateDrive.php`](https://github.com/vijay11-08/rku_placementportal/blob/main/Recruiter/CreateDrive.php) (Recruiter drives)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shared["Shared core"]
  node_root_entry["Public entry<br/>entry/auth<br/>[index.php]"]
  node_auth_core["Auth core<br/>auth/security<br/>[auth.php]"]
  node_layout_shell["Global layout<br/>ui shell<br/>[layout.php]"]
  node_db_core[("DB config<br/>persistence<br/>[db_config.php]")]
  node_helpers_core["Helpers<br/>support libs<br/>[email_helper.php]"]
  node_notifications_core["Notifications<br/>event/notify"]
  node_ajax_api["AJAX data<br/>async endpoints<br/>[get_batches.php]"]
end

subgraph group_roles["Role panels"]
  node_student_panel["Student panel<br/>role UI<br/>[index.php]"]
  node_student_onboarding["Profile steps<br/>workflow<br/>[Step1.php]"]
  node_student_docs["Student docs<br/>profile/docs"]
  node_student_drives["Student drives<br/>applications"]
  node_recruiter_panel["Recruiter panel<br/>role UI<br/>[index.php]"]
  node_recruiter_drives["Recruiter drives<br/>drive mgmt<br/>[CreateDrive.php]"]
  node_faculty_panel["Faculty panel<br/>role UI<br/>[index.php]"]
  node_faculty_review["Faculty review<br/>screening"]
  node_tpo_panel["TPO panel<br/>role UI<br/>[index.php]"]
  node_tpo_approval["TPO approval<br/>approval/ops"]
  node_admin_panel["Admin panel<br/>role UI<br/>[index.php]"]
  node_admin_master["Admin master<br/>admin ops"]
end

subgraph group_data["Data & assets"]
  node_uploads_store[("Uploads<br/>file store")]
  node_mail_log["Mail log<br/>ops log<br/>[mail.log]"]
end

subgraph group_ops["Operations"]
  node_migrate_job["Cleanup job<br/>maintenance<br/>[cleanup_logs.php]"]
end

node_root_entry -->|"authenticate"| node_auth_core
node_root_entry -->|"render"| node_layout_shell
node_auth_core -->|"reads/writes"| node_db_core
node_helpers_core -->|"uses"| node_db_core
node_helpers_core -->|"writes"| node_mail_log
node_notifications_core -->|"stores"| node_db_core
node_notifications_core -->|"sends"| node_helpers_core
node_student_panel -->|"navigates"| node_student_onboarding
node_student_panel -->|"navigates"| node_student_docs
node_student_panel -->|"navigates"| node_student_drives
node_student_onboarding -->|"persists"| node_db_core
node_student_docs -->|"uploads"| node_uploads_store
node_student_drives -->|"receives"| node_notifications_core
node_recruiter_panel -->|"navigates"| node_recruiter_drives
node_recruiter_drives -->|"reads/writes"| node_db_core
node_recruiter_drives -->|"attaches"| node_uploads_store
node_faculty_panel -->|"navigates"| node_faculty_review
node_faculty_review -->|"reads/writes"| node_db_core
node_tpo_panel -->|"navigates"| node_tpo_approval
node_tpo_approval -->|"reads/writes"| node_db_core
node_admin_panel -->|"navigates"| node_admin_master
node_admin_master -->|"reads/writes"| node_db_core
node_admin_master -->|"publishes"| node_notifications_core
node_ajax_api -->|"reads"| node_db_core
node_migrate_job -->|"cleans"| node_mail_log

click node_root_entry "https://github.com/vijay11-08/rku_placementportal/blob/main/index.php"
click node_auth_core "https://github.com/vijay11-08/rku_placementportal/blob/main/auth.php"
click node_layout_shell "https://github.com/vijay11-08/rku_placementportal/blob/main/layout.php"
click node_db_core "https://github.com/vijay11-08/rku_placementportal/blob/main/db_config.php"
click node_helpers_core "https://github.com/vijay11-08/rku_placementportal/blob/main/helpers/email_helper.php"
click node_notifications_core "https://github.com/vijay11-08/rku_placementportal/blob/main/notifications/notification_service.php"
click node_ajax_api "https://github.com/vijay11-08/rku_placementportal/blob/main/ajax/get_batches.php"
click node_student_panel "https://github.com/vijay11-08/rku_placementportal/blob/main/Student/index.php"
click node_student_onboarding "https://github.com/vijay11-08/rku_placementportal/blob/main/Student/Step1.php"
click node_student_docs "https://github.com/vijay11-08/rku_placementportal/blob/main/Student/AcademicDetails.php"
click node_student_drives "https://github.com/vijay11-08/rku_placementportal/blob/main/Student/PlacementDrives.php"
click node_recruiter_panel "https://github.com/vijay11-08/rku_placementportal/blob/main/Recruiter/index.php"
click node_recruiter_drives "https://github.com/vijay11-08/rku_placementportal/blob/main/Recruiter/CreateDrive.php"
click node_faculty_panel "https://github.com/vijay11-08/rku_placementportal/blob/main/Faculty/index.php"
click node_faculty_review "https://github.com/vijay11-08/rku_placementportal/blob/main/Faculty/StudentPortfolio.php"
click node_tpo_panel "https://github.com/vijay11-08/rku_placementportal/blob/main/TPO/index.php"
click node_tpo_approval "https://github.com/vijay11-08/rku_placementportal/blob/main/TPO/Placment_Drive_Approval.php"
click node_admin_panel "https://github.com/vijay11-08/rku_placementportal/blob/main/Admin/index.php"
click node_admin_master "https://github.com/vijay11-08/rku_placementportal/blob/main/Admin/UniversalDashboard.php"
click node_mail_log "https://github.com/vijay11-08/rku_placementportal/blob/main/logs/mail.log"
click node_migrate_job "https://github.com/vijay11-08/rku_placementportal/blob/main/cron/cleanup_logs.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_root_entry,node_auth_core,node_layout_shell,node_db_core,node_helpers_core,node_notifications_core,node_ajax_api toneBlue
class node_student_panel,node_student_onboarding,node_student_docs,node_student_drives,node_recruiter_panel,node_recruiter_drives,node_faculty_panel,node_faculty_review,node_tpo_panel,node_tpo_approval,node_admin_panel,node_admin_master toneAmber
class node_uploads_store,node_mail_log toneMint
class node_migrate_job toneRose
```

## Components

### Shared core

Common ingress, auth, persistence, and cross-cutting services.

- [Public entry](https://github.com/vijay11-08/rku_placementportal/blob/main/index.php): entry/auth · Landing, login, registration, reset, and session entry flow. · `index.php`
- [Auth core](https://github.com/vijay11-08/rku_placementportal/blob/main/auth.php): auth/security · Login processing, OTP/reset flow, CSRF, and rate limiting. · `auth.php`
- [Global layout](https://github.com/vijay11-08/rku_placementportal/blob/main/layout.php): ui shell · Shared site chrome used by the public-facing pages. · `layout.php`
- [DB config](https://github.com/vijay11-08/rku_placementportal/blob/main/db_config.php): persistence · Primary MySQL connection and recruiter-specific connection config. · `db_config.php`
- [Helpers](https://github.com/vijay11-08/rku_placementportal/blob/main/helpers/email_helper.php): support libs · Mail, logging, settings, AJAX auth, and upload helpers. · `helpers/email_helper.php`
- [Notifications](https://github.com/vijay11-08/rku_placementportal/blob/main/notifications/notification_service.php): event/notify · Central notification controller, service, model, API, and events. · `notifications/notification_service.php`
- [AJAX data](https://github.com/vijay11-08/rku_placementportal/blob/main/ajax/get_batches.php): async endpoints · Dependent dropdown and filter endpoints for batches, branches, departments, divisions, semesters. · `ajax/get_batches.php`

### Role panels

Permissioned PHP shells and their major workflows.

- [Student panel](https://github.com/vijay11-08/rku_placementportal/blob/main/Student/index.php): role UI · Student-facing shell for onboarding, profile, and applications. · `Student/index.php`
- [Profile steps](https://github.com/vijay11-08/rku_placementportal/blob/main/Student/Step1.php): workflow · Multi-step registration and profile completion workflow. · `Student/Step1.php`
- [Student docs](https://github.com/vijay11-08/rku_placementportal/blob/main/Student/AcademicDetails.php): profile/docs · Academic details, projects, internships, certifications, resume checking, and uploads. · `Student/AcademicDetails.php`
- [Student drives](https://github.com/vijay11-08/rku_placementportal/blob/main/Student/PlacementDrives.php): applications · Drive browsing, details, applications, notice board, and notifications. · `Student/PlacementDrives.php`
- [Recruiter panel](https://github.com/vijay11-08/rku_placementportal/blob/main/Recruiter/index.php): role UI · Recruiter shell for company profile, drives, and candidate actions. · `Recruiter/index.php`
- [Recruiter drives](https://github.com/vijay11-08/rku_placementportal/blob/main/Recruiter/CreateDrive.php): drive mgmt · Create/edit drives, manage listings, applications, shortlists, selections, feedback. · `Recruiter/CreateDrive.php`
- [Faculty panel](https://github.com/vijay11-08/rku_placementportal/blob/main/Faculty/index.php): role UI · Faculty shell for screening, drive oversight, and communications. · `Faculty/index.php`
- [Faculty review](https://github.com/vijay11-08/rku_placementportal/blob/main/Faculty/StudentPortfolio.php): screening · Student review, drive attendance, selection reports, portfolios, and debar/deregistration. · `Faculty/StudentPortfolio.php`
- [TPO panel](https://github.com/vijay11-08/rku_placementportal/blob/main/TPO/index.php): role UI · Training and placement office shell for approvals and administration. · `TPO/index.php`
- [TPO approval](https://github.com/vijay11-08/rku_placementportal/blob/main/TPO/Placment_Drive_Approval.php): approval/ops · Drive approval, student approval, reports, company management, and recruitment coordination. · `TPO/Placment_Drive_Approval.php`
- [Admin panel](https://github.com/vijay11-08/rku_placementportal/blob/main/Admin/index.php): role UI · Admin shell for master data, settings, reports, and oversight. · `Admin/index.php`
- [Admin master](https://github.com/vijay11-08/rku_placementportal/blob/main/Admin/UniversalDashboard.php): admin ops · Users, branches, batches, departments, drives, logs, notices, and broadcasts. · `Admin/UniversalDashboard.php`

### Data & assets

Database, uploads, and operational storage.

- **Uploads**: file store · Structured storage for resumes, student documents, drives, offers, certificates, QR codes, and internships.
- [Mail log](https://github.com/vijay11-08/rku_placementportal/blob/main/logs/mail.log): ops log · Captured outbound mail activity and notification traces. · `logs/mail.log`

### Operations

Maintenance scripts and background jobs.

- [Cleanup job](https://github.com/vijay11-08/rku_placementportal/blob/main/cron/cleanup_logs.php): maintenance · Log cleanup and lightweight scheduled maintenance. · `cron/cleanup_logs.php`

## Connections

- Public entry → Auth core: authenticate · Public login and recovery flow establishes the session.
- Public entry → Global layout: render · Shared public pages use the common layout shell.
- Auth core → DB config: reads/writes · Authentication and session state rely on MySQL.
- Helpers → DB config: uses · Shared helpers wrap common persistence and side effects.
- Helpers → Mail log: writes · Outbound mail activity is recorded for operational traceability.
- Notifications → DB config: stores · Notifications are persisted centrally.
- Notifications → Helpers: sends · Notification delivery reuses mail and logging helpers.
- Student panel → Profile steps: navigates · Student shell exposes the registration/profile workflow.
- Student panel → Student docs: navigates · Student shell exposes academic and document management.
- Student panel → Student drives: navigates · Students browse drives, applications, and notices.
- Profile steps → DB config: persists · Profile steps save student data into MySQL.
- Student docs → Uploads: uploads · Student artifacts are stored in the uploads tree.
- Student drives → Notifications: receives · Application and status events surface through notifications.
- Recruiter panel → Recruiter drives: navigates · Recruiter shell exposes drive and candidate workflows.
- Recruiter drives → DB config: reads/writes · Drive creation, feedback, and selection operate on shared data.
- Recruiter drives → Uploads: attaches · Drive postings and related documents are stored as files.
- Faculty panel → Faculty review: navigates · Faculty shell exposes screening and report workflows.
- Faculty review → DB config: reads/writes · Faculty views and updates shared student/drive records.
- TPO panel → TPO approval: navigates · TPO shell exposes approval and reporting workflows.
- TPO approval → DB config: reads/writes · TPO approval and student management use shared MySQL data.
- Admin panel → Admin master: navigates · Admin shell exposes master data, reports, and broadcasts.
- Admin master → DB config: reads/writes · Administrative changes persist through the central database.
- Admin master → Notifications: publishes · Admin actions can trigger notices and broadcasts.
- AJAX data → DB config: reads · Async UI endpoints resolve reference data from MySQL.
- Cleanup job → Mail log: cleans · Scheduled maintenance trims operational logs.
