How dmsharma99/gym-management-system works
Main Components
• Client/User Interface: This includes the static and dynamic pages (index.php, about.php, blogs.php, contact-us.php, courses.php, pricing.php, registration.php, userlogin.php, etc.) along with their associated CSS (about.css, blogs.css, contact-us.css, etc.) and JavaScript files (about.js, blogs.js, contact-us.js, etc.).
• Application Logic / Backend: The PHP files (admin_login.php, dashboard.php, registration.php, userlogin.php, billing.php [biling.php], coach.php, receptionist.php, etc.) serve as the controllers and the view generators for each webpage. Also include utility files such as config.php, connection.php, and database.php that handle database connectivity and configuration.
• Administration Module: Specialized components like admin_login.php and dashboard.php that facilitate login and management functionalities specific to the admin user. This module would also handle actions like adding members or staff.
• Database: The MySQL database (defined in gym.sql) that stores all gym-related information (member data, staff, courses, schedules, etc.).
Relationships and Interactions
• Users access the system via a web browser and interact with various frontend pages.
• These pages make HTTP requests to the PHP backend, which then processes the logic (authentication, data retrieval, data manipulation) and, in many cases, interacts with the MySQL database.
• For login and registration, data flows from the frontend to specific PHP scripts (userlogin.php, registration.php) that validate credentials and query/update the MySQL database.
• In the admin module, after successful authentication (admin_login.php), the admin dashboard (dashboard.php) and any forms for adding members or staff take over, again interacting with the database.
• Each page (e.g., courses, pricing, blogs) functions as both a view and a controller by rendering content and possibly making further logical decisions.
Architectural Patterns and Design Principles
• This system uses a monolithic architecture where each PHP file functions as both a controller and a view (often referred to as “spaghetti” PHP), with separation being more logical than physical.
• There is a clear separation between presentation (HTML/CSS/JavaScript files) and server-side processing.
• The database layer is centralized and is accessed through standardized connection/configuration files.
Relevant Technologies
• Web Server (likely Apache or Nginx configured for PHP).
• PHP as the server-side scripting language.
• MySQL as the database.
• HTML, CSS, JavaScript for client-side structure and behavior.