# mavenzer/placement--management--system architecture

> Architecture diagram of the GitHub repository mavenzer/placement--management--system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mavenzer/placement--management--system
- Repository: https://github.com/mavenzer/placement--management--system

## Overview

##### Project type and purpose
- Full-stack web application for coordinating campus recruitments.
- Provides three core portals (Student, Institute/HOD, Principal) and one Placement/Company portal.
- Two public homepages (“Master” and “Drives”) for visitors.

##### File structure
- Top-level directories map directly to modules/portals:
– SProfile → Student Portal
– HODProfile → Institute/HOD Portal
– PriProfile → Principal Portal
– PProfile & updation--companies → Placement/Company Portal
– Homepage & Drives → Public frontends
- Database folder holds two SQL schemas (“details” and “placement”).
- Static assets (CSS/JS/images) are local per‐module.
- Entry points are PHP scripts in each folder (e.g., index.php, login.php, mail.php).

##### Extract architectural hints from the README
- Monolithic PHP code, object-oriented DB access with mysqli.
- Two MySQL databases imported via Revised.sql / Skeleton Database.sql.
- Uses Bootstrap, jQuery, Ajax, Google Maps API and simple mail.php for notifications.
- Four “portals” with distinct responsibilities and shared underlying data models.

##### Main components
a. Clients (browsers/mobile) for:
– Public users (Master Homepage, Drives Homepage)
– Students (SProfile)
– Institutes/HODs (HODProfile)
– Principals (PriProfile)
– Placement/Companies (PProfile & updation--companies)
b. Web Server Layer
– Apache/PHP runtime hosting all .php entry scripts
– Shared libraries for database access, session management, authentication
c. Data Layer
– MySQL “details” DB holds student profiles, credentials, preferences
– MySQL “placement” DB holds companies, drives, eligibility, assignments
d. External Services
– SMTP/Mail service via mail.php
– Google Maps API for location-based features
e. Optional Shared Cache or Session Store (if introduced later)

##### Relationships & Data Flows
- Client → HTTPS → Apache/PHP → Business Logic
- Business Logic → SQL queries → MySQL
- Business Logic → External API calls (Mail, Google Maps)
- Responses flow back to client; modules communicate via shared tables.

##### Architectural patterns & principles
- Layered architecture: Presentation (PHP+HTML+CSS+JS) → Business logic (PHP classes) → Data access (mysqli) → Data store (MySQL).
- Module-based separation: each portal is a folder, but they share common DB schemas and styling frameworks.
- Notification pattern: mail.php invoked by portal controllers.
- Role-based access: authentication & session management per portal.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Clients Layer
    subgraph "Clients" 
        direction TB
        PublicMaster["Public Master Homepage"]:::frontend
        PublicDrives["Public Drives Homepage"]:::frontend
        StudentClient["Student Portal UI"]:::frontend
        InstituteClient["Institute Portal UI"]:::frontend
        PrincipalClient["Principal Portal UI"]:::frontend
        CompanyClient["Company Portal UI"]:::frontend
    end

    %% Web Server Layer
    Apache["Apache/PHP Web Server"]:::backend

    subgraph "Server Portals"
        direction TB
        StudentPortal["Student Portal (SProfile)"]:::backend
        InstitutePortal["Institute/HOD Portal (HODProfile)"]:::backend
        PrincipalPortal["Principal Portal (PriProfile)"]:::backend
        CompanyPortal["Placement/Company Portal (PProfile)"]:::backend
        CompanyAdmin["Company Admin Submodule"]:::backend
    end

    %% Databases Layer
    subgraph "Databases"
        direction TB
        DetailsDB["MySQL Details DB"]:::db
        PlacementDB["MySQL Placement DB"]:::db
    end

    %% External Services
    SMTP["SMTP Mail Service"]:::external
    Maps["Google Maps API"]:::external

    %% Connections: Clients to Server
    PublicMaster -->|"HTTPS"| Apache
    PublicDrives -->|"HTTPS"| Apache
    StudentClient -->|"HTTPS"| Apache
    InstituteClient -->|"HTTPS"| Apache
    PrincipalClient -->|"HTTPS"| Apache
    CompanyClient -->|"HTTPS"| Apache

    %% Server to Portals
    Apache --> StudentPortal
    Apache --> InstitutePortal
    Apache --> PrincipalPortal
    Apache --> CompanyPortal
    Apache --> CompanyAdmin

    %% Portals to Databases
    StudentPortal -->|"SQL"| DetailsDB
    StudentPortal -->|"SQL"| PlacementDB
    InstitutePortal -->|"SQL"| DetailsDB
    InstitutePortal -->|"SQL"| PlacementDB
    PrincipalPortal -->|"SQL"| DetailsDB
    PrincipalPortal -->|"SQL"| PlacementDB
    CompanyPortal -->|"SQL"| DetailsDB
    CompanyPortal -->|"SQL"| PlacementDB
    CompanyAdmin -->|"SQL"| DetailsDB
    CompanyAdmin -->|"SQL"| PlacementDB

    %% Portals to External Services
    StudentPortal -->|"SMTP/API"| SMTP
    StudentPortal -->|"Maps API"| Maps
    InstitutePortal -->|"SMTP/API"| SMTP
    InstitutePortal -->|"Maps API"| Maps
    PrincipalPortal -->|"SMTP/API"| SMTP
    PrincipalPortal -->|"Maps API"| Maps
    CompanyPortal -->|"SMTP/API"| SMTP
    CompanyPortal -->|"Maps API"| Maps
    CompanyAdmin -->|"SMTP/API"| SMTP
    CompanyAdmin -->|"Maps API"| Maps

    %% Click Events
    click PublicMaster "https://github.com/mavenzer/placement--management--system/tree/master/Homepage/"
    click PublicDrives "https://github.com/mavenzer/placement--management--system/tree/master/Drives/"
    click StudentPortal "https://github.com/mavenzer/placement--management--system/tree/master/SProfile/"
    click InstitutePortal "https://github.com/mavenzer/placement--management--system/tree/master/HODProfile/"
    click PrincipalPortal "https://github.com/mavenzer/placement--management--system/tree/master/PriProfile/"
    click CompanyPortal "https://github.com/mavenzer/placement--management--system/tree/master/PProfile/"
    click CompanyAdmin "https://github.com/mavenzer/placement--management--system/tree/master/updation--companies/"
    click DetailsDB "https://github.com/mavenzer/placement--management--system/blob/master/Database/Revised.sql"
    click PlacementDB "https://github.com/mavenzer/placement--management--system/blob/master/Database/Skeleton Database.sql"

    %% Styles
    classDef frontend fill:#8FBC8F,stroke:#333,stroke-width:1px
    classDef backend fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef db fill:#FFA500,stroke:#333,stroke-width:1px
    classDef external fill:#DDA0DD,stroke:#333,stroke-width:1px
```
