How getprojectsidea/create-school-management-system-with-php-mysql works
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: add_student_exam_mark.php Domain actions · get_student.php Lookup scripts · index.php App home · DemoSMS.sql Demo schema
Components 22
Entry points
Top-level bootstraps and first page loads
- Root index · Project-level entry script
[Source Code] School Management System/index.php - Init bootstrap · Application initialization entry
[Source Code] School Management System/controller/index.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 · Main web-app landing page
[Source Code] School Management System/view/index.php - Role chrome · Shared headers, sidebars, navbar, footer, and role-specific wrappers
[Source Code] School Management System/view/header_admin.php - Dashboards · Role-specific dashboard and summary screens
[Source Code] School Management System/dist/js/pages/dashboard.js - Rosters · Student, teacher, subject, classroom, grade, and timetable listings
[Source Code] School Management System/view/show_student1.php - My records · Personal views for students, teachers, and parents
[Source Code] School Management System/view/my_profile.php - Finance screens · Payments, salary, petty cash, and invoice views
[Source Code] School Management System/view/student_payment.php - Academic screens · Attendance, exams, marks, timetable, and subject routing views
[Source Code] School Management System/view/student_exam_marks.php - Messages & friends · Friend requests, conversations, and group messaging screens
[Source Code] School Management System/view/group_message.php - Events · 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 · Central model entry script
[Source Code] School Management System/model/index.php - CRUD actions · Add, update, delete, approve, confirm, and login scripts
[Source Code] School Management System/model/add_student.php - Lookup scripts · Get scripts used to populate forms and tables
[Source Code] School Management System/model/get_student.php - Profile actions · 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 · 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 · Seed database and table definitions
Database/DemoSMS.sql
Front-end assets
Bundled vendor UI and reporting libraries
Storage
Filesystem boundaries for uploads and logs
- Uploads · User-uploaded files storage boundary
[Source Code] School Management System/uploads/index.php - Error logs · Application and model error logs on disk
[Source Code] School Management System/error_log
Connections 26
- 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