# getprojectsidea/create-school-management-system-with-php-mysql architecture

> Architecture diagram of the GitHub repository getprojectsidea/create-school-management-system-with-php-mysql, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/getprojectsidea/create-school-management-system-with-php-mysql
- Repository: https://github.com/getprojectsidea/create-school-management-system-with-php-mysql

## Overview

This repository is a legacy PHP/MySQL school management system built as a server-rendered web app with a custom, framework-free structure. The core app lives under `School Management System/`, and the database schema is in `Database/DemoSMS.sql`.

The application is organized into three main runtime layers: `view/` for HTML pages, `model/` for action and data-access scripts, and `controller/` for bootstrap/configuration. This is not a modern API-first split; instead, page scripts typically include shared layout files, read data directly, and post to small PHP handlers for CRUD operations.

The primary entry points are `index.php` at the project root and `view/index.php`, with `controller/index.php` and `controller/config.php` likely handling initialization and database connection setup. The architecture is centered on PHP page loads rather than a single front controller with a formal router.

Presentation is built from a large set of reusable partials in `view/`: headers, sidebars, navbar, footer, and role-specific chrome such as `header_admin.php`, `header_teacher.php`, `header_student.php`, and `header_parents.php`. This indicates the UI is segmented by user role, with different dashboards and menus for each audience.

The `model/` directory contains many small purpose-specific endpoints, mostly named by action: add, update, delete, get, approve, confirm, and login. These scripts are the mutation boundary of the system and are the main bridge between forms in `view/` and the MySQL database.

The domain modules are the standard school-management set: students, teachers, classes/classrooms, subjects, grades, attendance, exam marks, timetables, events, payments, salary, petty cash, messaging/friends, and leave requests. The volume of `my_*`, `all_*`, and `show_*` pages shows the app exposes both administrative lists and personal “my records” pages for different user roles.

A strong data-flow pattern appears throughout the repo: browser submits a form from a `view/*.php` page, the matching `model/*.php` script writes to or updates MySQL, then list/detail pages pull the refreshed data back for display. There are also many `get_*.php` scripts used for fetching entity records and populating forms or tables.

Analytics and dashboards are supported through charting and reporting assets. The repo vendors Chart.js under `Chart.js-master/` and also includes chart-related pages plus AdminLTE dashboard scripts under `dist/js/pages/`, which suggests graphs are used on the dashboard and summary views.

The frontend stack is mostly static vendor assets: Bootstrap, AdminLTE, jQuery plugins, DataTables, CKEditor, Select2, Datepicker, Daterangepicker, FullCalendar, Morris, Flot, iCheck, and related UI helpers. These are bundled as local dependencies rather than fetched from a CDN, so the app is self-contained and deployable as a traditional PHP site.

File uploads are supported through the `uploads/` directory, which is treated as a storage boundary for user-uploaded content. There are also log files like `error_log` in multiple places, implying the app is meant to run on a conventional PHP web server with filesystem access.

The database layer is MySQL-centric and likely owns all core business state: people records, enrollment, attendance, marks, schedules, finance, and communication data. `DemoSMS.sql` is the seed/schema artifact that defines the tables the PHP scripts expect.

Overall, this repo is a monolithic, server-rendered CRUD system with role-based screens, many specialized action scripts, and a database-first architecture. When diagramming it, the key boundaries are: browser/UI pages, PHP action handlers, MySQL persistence, static vendor assets, and uploaded files/logs.

Main entry points: [`[Source Code] School Management System/model/add_student_exam_mark.php`](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/model/add_student_exam_mark.php) (Domain actions), [`[Source Code] School Management System/model/get_student.php`](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/model/get_student.php) (Lookup scripts), [`[Source Code] School Management System/view/index.php`](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/view/index.php) (App home), [`Database/DemoSMS.sql`](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/Database/DemoSMS.sql) (Demo schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_root_index["Root index<br/>php entry<br/>[index.php]"]
  node_controller_index["Init bootstrap<br/>php bootstrap<br/>[index.php]"]
  node_controller_config["Config<br/>[config.php]"]
end

subgraph group_ui["UI layer"]
  node_view_index["App home<br/>php page<br/>[index.php]"]
  node_role_chrome["Role chrome<br/>layout partials<br/>[header_admin.php]"]
  node_dashboard_pages["Dashboards<br/>summary pages<br/>[dashboard.js]"]
  node_roster_pages["Rosters<br/>admin lists<br/>[show_student1.php]"]
  node_personal_pages["My records<br/>role pages<br/>[my_profile.php]"]
  node_finance_pages["Finance screens<br/>finance pages"]
  node_academic_pages["Academic screens<br/>academic pages"]
  node_social_pages["Messages & friends<br/>communication pages<br/>[group_message.php]"]
  node_event_pages["Events<br/>calendar pages<br/>[all_events.php]"]
end

subgraph group_actions["Action handlers"]
  node_model_index["Model hub<br/>php dispatch<br/>[index.php]"]
  node_crud_handlers["CRUD actions<br/>php handlers<br/>[add_student.php]"]
  node_lookup_handlers["Lookup scripts<br/>php fetchers<br/>[get_student.php]"]
  node_profile_handlers["Profile actions<br/>php handlers"]
  node_domain_handlers["Domain actions<br/>php handlers"]
end

subgraph group_data["Persistence"]
  node_schema[("Demo schema<br/>mysql schema<br/>[DemoSMS.sql]")]
end

subgraph group_assets["Front-end assets"]
  node_vendor_ui["Vendor UI<br/>static assets<br/>[app.js]"]
  node_charting["Charts<br/>reporting lib<br/>[chart.js]"]
end

subgraph group_storage["Storage"]
  node_uploads["Uploads<br/>filesystem<br/>[index.php]"]
  node_logs["Error logs<br/>runtime logs"]
end

node_root_index -->|"boots through"| node_controller_index
node_root_index -->|"renders"| node_view_index
node_controller_index -->|"loads config"| node_controller_config
node_view_index -->|"includes"| node_role_chrome
node_dashboard_pages -->|"wraps with"| node_role_chrome
node_roster_pages -->|"posts to"| node_crud_handlers
node_personal_pages -->|"updates via"| node_profile_handlers
node_finance_pages -->|"posts to"| node_domain_handlers
node_academic_pages -->|"posts to"| node_domain_handlers
node_social_pages -->|"posts to"| node_domain_handlers
node_event_pages -->|"posts to"| node_domain_handlers
node_roster_pages -->|"reads via"| node_lookup_handlers
node_academic_pages -->|"reads via"| node_lookup_handlers
node_personal_pages -->|"reads via"| node_lookup_handlers
node_crud_handlers -->|"writes"| node_schema
node_lookup_handlers -->|"reads"| node_schema
node_profile_handlers -->|"reads/writes"| node_schema
node_domain_handlers -->|"reads/writes"| node_schema
node_view_index -->|"uses"| node_vendor_ui
node_dashboard_pages -->|"visualizes"| node_charting
node_vendor_ui -.->|"includes"| node_charting
node_view_index -->|"serves files from"| node_uploads
node_controller_config -.->|"writes errors"| node_logs
node_model_index -->|"dispatches"| node_crud_handlers
node_model_index -->|"dispatches"| node_lookup_handlers
node_model_index -->|"dispatches"| node_domain_handlers

click node_root_index "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/index.php"
click node_view_index "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/view/index.php"
click node_controller_index "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/controller/index.php"
click node_controller_config "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/controller/config.php"
click node_role_chrome "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/view/header_admin.php"
click node_dashboard_pages "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/dist/js/pages/dashboard.js"
click node_roster_pages "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/view/show_student1.php"
click node_personal_pages "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/view/my_profile.php"
click node_finance_pages "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/view/student_payment.php"
click node_academic_pages "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/view/student_exam_marks.php"
click node_social_pages "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/view/group_message.php"
click node_event_pages "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/view/all_events.php"
click node_model_index "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/model/index.php"
click node_crud_handlers "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/model/add_student.php"
click node_lookup_handlers "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/model/get_student.php"
click node_profile_handlers "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/model/update_teacher_profile.php"
click node_domain_handlers "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/model/add_student_exam_mark.php"
click node_schema "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/Database/DemoSMS.sql"
click node_vendor_ui "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/dist/js/app.js"
click node_charting "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/Chart.js-master/src/chart.js"
click node_uploads "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/[Source Code] School Management System/uploads/index.php"
click node_logs "https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/tree/main/[Source Code] School Management System/error_log"

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_index,node_controller_index,node_controller_config toneBlue
class node_view_index,node_role_chrome,node_dashboard_pages,node_roster_pages,node_personal_pages,node_finance_pages,node_academic_pages,node_social_pages,node_event_pages toneAmber
class node_model_index,node_crud_handlers,node_lookup_handlers,node_profile_handlers,node_domain_handlers toneMint
class node_schema toneRose
class node_vendor_ui,node_charting toneIndigo
class node_uploads,node_logs toneTeal
```

## Components

### Entry points

Top-level bootstraps and first page loads

- [Root index](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/index.php): php entry · Project-level entry script · `[Source Code] School Management System/index.php`
- [Init bootstrap](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/controller/index.php): php bootstrap · Application initialization entry · `[Source Code] School Management System/controller/index.php`
- [Config](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/controller/config.php): php config · Shared controller configuration and database setup · `[Source Code] School Management System/controller/config.php`

### UI layer

Server-rendered pages and reusable chrome

- [App home](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/view/index.php): php page · Main web-app landing page · `[Source Code] School Management System/view/index.php`
- [Role chrome](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/view/header_admin.php): layout partials · Shared headers, sidebars, navbar, footer, and role-specific wrappers · `[Source Code] School Management System/view/header_admin.php`
- [Dashboards](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/dist/js/pages/dashboard.js): summary pages · Role-specific dashboard and summary screens · `[Source Code] School Management System/dist/js/pages/dashboard.js`
- [Rosters](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/view/show_student1.php): admin lists · Student, teacher, subject, classroom, grade, and timetable listings · `[Source Code] School Management System/view/show_student1.php`
- [My records](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/view/my_profile.php): role pages · Personal views for students, teachers, and parents · `[Source Code] School Management System/view/my_profile.php`
- [Finance screens](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/view/student_payment.php): finance pages · Payments, salary, petty cash, and invoice views · `[Source Code] School Management System/view/student_payment.php`
- [Academic screens](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/view/student_exam_marks.php): academic pages · Attendance, exams, marks, timetable, and subject routing views · `[Source Code] School Management System/view/student_exam_marks.php`
- [Messages & friends](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/view/group_message.php): communication pages · Friend requests, conversations, and group messaging screens · `[Source Code] School Management System/view/group_message.php`
- [Events](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/view/all_events.php): calendar pages · Event creation, update, and listing screens · `[Source Code] School Management System/view/all_events.php`

### Action handlers

PHP scripts that mutate or fetch domain data

- [Model hub](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/model/index.php): php dispatch · Central model entry script · `[Source Code] School Management System/model/index.php`
- [CRUD actions](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/model/add_student.php): php handlers · Add, update, delete, approve, confirm, and login scripts · `[Source Code] School Management System/model/add_student.php`
- [Lookup scripts](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/model/get_student.php): php fetchers · Get scripts used to populate forms and tables · `[Source Code] School Management System/model/get_student.php`
- [Profile actions](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/model/update_teacher_profile.php): php handlers · Profile-specific get and update scripts for admin, teacher, student, and parent accounts · `[Source Code] School Management System/model/update_teacher_profile.php`
- [Domain actions](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/model/add_student_exam_mark.php): php handlers · Subject routing, exam marks, timetable, attendance, finance, messaging, and leave operations · `[Source Code] School Management System/model/add_student_exam_mark.php`

### Persistence

Database schema and MySQL-backed state

- [Demo schema](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/main/Database/DemoSMS.sql): mysql schema · Seed database and table definitions · `Database/DemoSMS.sql`

### Front-end assets

Bundled vendor UI and reporting libraries

- [Vendor UI](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/dist/js/app.js): static assets · Bootstrap, AdminLTE, jQuery plugins, editors, datatables, calendar, and charting assets · `[Source Code] School Management System/dist/js/app.js`
- [Charts](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/Chart.js-master/src/chart.js): reporting lib · Chart.js and dashboard chart assets · `[Source Code] School Management System/Chart.js-master/src/chart.js`

### Storage

Filesystem boundaries for uploads and logs

- [Uploads](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/blob/HEAD/%5BSource%20Code%5D%20School%20Management%20System/uploads/index.php): filesystem · User-uploaded files storage boundary · `[Source Code] School Management System/uploads/index.php`
- [Error logs](https://github.com/getprojectsidea/create-school-management-system-with-php-mysql/tree/HEAD/%5BSource%20Code%5D%20School%20Management%20System/error_log): runtime logs · Application and model error logs on disk · `[Source Code] School Management System/error_log`

## Connections

- Root index → Init bootstrap: boots through · Root entry hands off to initialization
- Root index → App home: renders · Primary page load reaches the app home
- Init bootstrap → Config: loads config · Bootstrap includes shared configuration and DB setup
- App home → Role chrome: includes · Pages assemble reusable headers, nav, sidebar, and footer
- Dashboards → Role chrome: wraps with · Dashboards use role-specific chrome
- Rosters → CRUD actions: posts to · Roster forms submit create/update/delete actions
- My records → Profile actions: updates via · Personal profile screens use dedicated update handlers
- Finance screens → Domain actions: posts to · Payments, salary, and petty cash workflows write through action scripts
- Academic screens → Domain actions: posts to · Attendance, exam, timetable, and subject pages use action scripts
- Messages & friends → Domain actions: posts to · Messaging and friend workflows use action scripts
- Events → Domain actions: posts to · Event screens save through action scripts
- Rosters → Lookup scripts: reads via · Tables and forms are populated from small fetch scripts
- Academic screens → Lookup scripts: reads via · Exam, timetable, and grade pages query lookup endpoints
- My records → Lookup scripts: reads via · Profile and history pages fetch current records
- CRUD actions → Demo schema: writes · Core CRUD actions persist school data to MySQL
- Lookup scripts → Demo schema: reads · Lookup scripts query the database schema
- Profile actions → Demo schema: reads/writes · Profile updates and profile views touch MySQL records
- Domain actions → Demo schema: reads/writes · Domain actions are the main persistence boundary
- App home → Vendor UI: uses · Server-rendered pages rely on bundled UI assets
- Dashboards → Charts: visualizes · Dashboards and summaries use charting assets
- Vendor UI → Charts: includes · Dashboard scripts incorporate chart components
- App home → Uploads: serves files from · App pages interact with uploaded content storage
- Config → Error logs: writes errors · Runtime errors surface in filesystem logs
- Model hub → CRUD actions: dispatches · Model layer routes to specialized action scripts
- Model hub → Lookup scripts: dispatches · Model layer routes to specialized fetch scripts
- Model hub → Domain actions: dispatches · Model layer routes to domain-specific operations
