How alireza021/yoga works
Main Components
• Client Interface: Represent the end user interacting with the system through a web browser. This includes:
• The Public Site: Shown by pages like yoga/index.php and confirmBooking.php where users view classes and submit booking forms.
• The Admin Interface: Accessible via yoga/admin/login.php and other admin pages (e.g., index.php, users.php, change_password.php) where administrators or editors manage class schedules, bookings, and users.
• Application Core: This includes the central PHP scripts like yoga/core/init.php and configuration file (yoga/config.php) that bootstrap the application and handle business logic.
• Database: Although not explicitly detailed in file names, run via databaseInstaller.php, it is where class records, user details, booking information, and other data are stored.
• Static Resources: Include the CSS, JavaScript, and images (inside directories yoga/css, yoga/js, yoga/images, etc.) which handle the frontend presentation and client-side interactions.
• External Dependencies: Any external libraries like Bootstrap, etalage, and megamenu integrated into the UI, possibly impacting UI behavior and overall user experience.
Data Flow & Relationships
• From the Client's Browser:
• Users land on the Public Site (yoga/index.php) to view available classes.
• They can fill out and submit a booking form (likely hitting confirmBooking.php), which then sends booking data to the Application Core.
• Application Processing:
• The core scripts (including those initialized via yoga/core/init.php and configured in yoga/config.php) process HTTP requests, perform operations (e.g., validating availability, handling booking logic), and communicate with the Database.
• Admin Workflow:
• Admin users login via yoga/admin/login.php, which, upon validation, grant access to the backend dashboard.
• The admin pages then allow operations such as adding, editing, deleting classes, and managing enrolled students.
• These operations update or query the Database.
• Data Persistence:
• The database (set up by databaseInstaller.php) receives and returns data between the application core and persistent storage.
• Model-View separation:
• Views: The CSS, JavaScript, and HTML parts forming the user interface.
• Controllers/Business Logic: The PHP scripts (using core/init.php and other PHP scripts) that process user input.
• Model: The Database handling storage and retrieval operations.
• “Public Interface” (for booking and class viewing) to an “Application Core” component that handles logic, then link this to the “Database.”
• Similarly, represent the “Admin Flow” where the Admin logs in, which uses the Application Core for authentication and then interacts with the Database for management operations.