# kazcfz/alumni-portal architecture

> Architecture diagram of the GitHub repository kazcfz/alumni-portal, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kazcfz/alumni-portal
- Repository: https://github.com/kazcfz/alumni-portal

## Overview

##### Project type and purpose
- This is a monolithic, full-stack LAMP web application (“Alumni Portal”) written in PHP with Bootstrap, DataTables, jQuery on the front end and MySQL as the data store.
- It provides two user personas (Admin and regular Alumni users) supporting CRUD on events, news/advertisements, user profiles, and authentication/authorization.

##### File structure
- Top-level PHP files each act as a “page-controller” (e.g. login.php, main_menu.php, view_events.php).
- A single db_controller.php centralizes all MySQL connections and queries.
- Static assets are under css/styles.css, images/, and profile_images/.
- There is no formal MVC or microservices split—presentation, business logic, and data access are co-located in each PHP script.
- init_db.php handles schema bootstrap; validation_field.php encapsulates input checks.

##### README for additional insights
- Technologies: PHP (server side), Bootstrap + DataTables + jQuery (client side), MySQL (database).
- Runtime environment: Apache + PHP, deployable under XAMPP.
- Two roles: Admin (user management, content management), User (view and apply on listings, profile editing).

## Diagram (Mermaid)

```mermaid
flowchart TD
  %% Client Layer
  Browser["Web Browser"]:::client
  Browser -->|HTTP Requests| WebServer

  %% Static Assets and External
  Browser -->|GET CSS/JS/Images| StaticAssets
  Browser -->|GET Libraries| CDN

  %% Server Layer
  subgraph "Web Server (Apache + PHP)" 
    direction TB
    WebServer["Apache + PHP Runtime"]:::backend

    subgraph "Authentication Module"
      direction TB
      Login["login.php"]:::backend
      Logout["logout.php"]:::backend
      Registration["registration.php"]:::backend
      ProcessRegister["process_register.php"]:::backend
      Validation["validation_field.php"]:::backend
    end

    subgraph "User Module"
      direction TB
      ProfileDetail["profile_detail.php"]:::backend
      UpdateProfile["update_profile.php"]:::backend
      ProcessUpdate["process_update.php"]:::backend
      GetAlumnus["get_alumnus_by_email.php"]:::backend
      ViewResume["view_resume.php"]:::backend
      NavUser["nav_user.php"]:::backend
      LoggedUser["logged_user.php"]:::backend
      MainMenuUser["main_menu.php"]:::backend
    end

    subgraph "Event Module"
      direction TB
      ViewEvents["view_events.php"]:::backend
      AddEvent["add_event.php"]:::backend
      EditEvent["edit_event.php"]:::backend
      ManageEvents["manage_events.php"]:::backend
    end

    subgraph "Advertisement Module"
      direction TB
      ViewAds["view_advertisements.php"]:::backend
      AddAd["add_advertisement.php"]:::backend
      EditAd["edit_advertisement.php"]:::backend
      ApplyAd["advertisement_apply.php"]:::backend
      ManageAds["manage_advertisements.php"]:::backend
    end

    subgraph "Admin Module"
      direction TB
      LoggedAdmin["logged_admin.php"]:::backend
      MainMenuAdmin["main_menu_admin.php"]:::backend
      ManageAccounts["manage_accounts.php"]:::backend
    end

    subgraph "Data Access Layer"
      direction TB
      DBController["db_controller.php"]:::backend
      InitDB["init_db.php"]:::backend
    end

  end

  %% Database
  MySQL["MySQL Database\n(Users, Events, Ads, Applications)"]:::db

  %% External Libraries/CDN
  CDN["External Libraries/CDN\n(jQuery, DataTables, Bootstrap)"]:::external

  %% Static Asset Server
  StaticAssets["Static Asset Server\n(css/, images/, profile_images/)"]:::static

  %% Data Flows
  WebServer -->|uses| Login
  WebServer -->|uses| Logout
  WebServer -->|uses| Registration
  WebServer -->|uses| ProcessRegister
  WebServer -->|uses| Validation

  WebServer -->|routes to| ProfileDetail
  WebServer -->|routes to| UpdateProfile
  WebServer -->|routes to| ProcessUpdate
  WebServer -->|routes to| GetAlumnus
  WebServer -->|routes to| ViewResume
  WebServer -->|routes to| NavUser
  WebServer -->|routes to| LoggedUser
  WebServer -->|routes to| MainMenuUser

  WebServer -->|routes to| ViewEvents
  WebServer -->|routes to| AddEvent
  WebServer -->|routes to| EditEvent
  WebServer -->|routes to| ManageEvents

  WebServer -->|routes to| ViewAds
  WebServer -->|routes to| AddAd
  WebServer -->|routes to| EditAd
  WebServer -->|routes to| ApplyAd
  WebServer -->|routes to| ManageAds

  WebServer -->|routes to| LoggedAdmin
  WebServer -->|routes to| MainMenuAdmin
  WebServer -->|routes to| ManageAccounts

  %% All modules query DBController
  Login -->|SQL Calls| DBController
  Logout -->|SQL Calls| DBController
  Registration -->|SQL Calls| DBController
  ProcessRegister -->|SQL Calls| DBController
  Validation -->|uses| DBController

  ProfileDetail -->|SQL Calls| DBController
  UpdateProfile -->|SQL Calls| DBController
  ProcessUpdate -->|SQL Calls| DBController
  GetAlumnus -->|SQL Calls| DBController
  ViewResume -->|SQL Calls| DBController

  ViewEvents -->|SQL Calls| DBController
  AddEvent -->|SQL Calls| DBController
  EditEvent -->|SQL Calls| DBController
  ManageEvents -->|SQL Calls| DBController

  ViewAds -->|SQL Calls| DBController
  AddAd -->|SQL Calls| DBController
  EditAd -->|SQL Calls| DBController
  ApplyAd -->|SQL Calls| DBController
  ManageAds -->|SQL Calls| DBController

  LoggedAdmin -->|SQL Calls| DBController
  MainMenuAdmin -->|SQL Calls| DBController
  ManageAccounts -->|SQL Calls| DBController

  InitDB -->|initializes| DBController
  DBController -->|queries| MySQL

  %% HTTP/AJAX flows
  Browser -->|AJAX/JSON| ApplyAd
  Browser -->|AJAX/JSON| ViewAds
  Browser -->|AJAX/JSON| ViewEvents

  WebServer -->|serves assets| StaticAssets
  WebServer -->|includes libraries| CDN

  %% Click Events
  click Login "https://github.com/kazcfz/alumni-portal/blob/main/login.php"
  click Logout "https://github.com/kazcfz/alumni-portal/blob/main/logout.php"
  click Registration "https://github.com/kazcfz/alumni-portal/blob/main/registration.php"
  click ProcessRegister "https://github.com/kazcfz/alumni-portal/blob/main/process_register.php"
  click Validation "https://github.com/kazcfz/alumni-portal/blob/main/validation_field.php"

  click ProfileDetail "https://github.com/kazcfz/alumni-portal/blob/main/profile_detail.php"
  click UpdateProfile "https://github.com/kazcfz/alumni-portal/blob/main/update_profile.php"
  click ProcessUpdate "https://github.com/kazcfz/alumni-portal/blob/main/process_update.php"
  click GetAlumnus "https://github.com/kazcfz/alumni-portal/blob/main/get_alumnus_by_email.php"
  click ViewResume "https://github.com/kazcfz/alumni-portal/blob/main/view_resume.php"
  click NavUser "https://github.com/kazcfz/alumni-portal/blob/main/nav_user.php"
  click LoggedUser "https://github.com/kazcfz/alumni-portal/blob/main/logged_user.php"
  click MainMenuUser "https://github.com/kazcfz/alumni-portal/blob/main/main_menu.php"

  click ViewEvents "https://github.com/kazcfz/alumni-portal/blob/main/view_events.php"
  click AddEvent "https://github.com/kazcfz/alumni-portal/blob/main/add_event.php"
  click EditEvent "https://github.com/kazcfz/alumni-portal/blob/main/edit_event.php"
  click ManageEvents "https://github.com/kazcfz/alumni-portal/blob/main/manage_events.php"

  click ViewAds "https://github.com/kazcfz/alumni-portal/blob/main/view_advertisements.php"
  click AddAd "https://github.com/kazcfz/alumni-portal/blob/main/add_advertisement.php"
  click EditAd "https://github.com/kazcfz/alumni-portal/blob/main/edit_advertisement.php"
  click ApplyAd "https://github.com/kazcfz/alumni-portal/blob/main/advertisement_apply.php"
  click ManageAds "https://github.com/kazcfz/alumni-portal/blob/main/manage_advertisements.php"

  click LoggedAdmin "https://github.com/kazcfz/alumni-portal/blob/main/logged_admin.php"
  click MainMenuAdmin "https://github.com/kazcfz/alumni-portal/blob/main/main_menu_admin.php"
  click ManageAccounts "https://github.com/kazcfz/alumni-portal/blob/main/manage_accounts.php"

  click DBController "https://github.com/kazcfz/alumni-portal/blob/main/db_controller.php"
  click InitDB "https://github.com/kazcfz/alumni-portal/blob/main/init_db.php"

  click StaticAssets "https://github.com/kazcfz/alumni-portal/blob/main/css/styles.css"
  click StaticAssets "https://github.com/kazcfz/alumni-portal/tree/main/images/"
  click StaticAssets "https://github.com/kazcfz/alumni-portal/tree/main/profile_images/"

  %% Styles
  classDef client fill:#ADD8E6,stroke:#333,stroke-width:1px
  classDef backend fill:#90EE90,stroke:#333,stroke-width:1px
  classDef db fill:#FFA500,stroke:#333,stroke-width:1px
  classDef external fill:#D3D3D3,stroke:#333,stroke-width:1px
  classDef static fill:#D3D3D3,stroke:#333,stroke-width:1px
```
