# fullstack-verse/yms architecture

> Architecture diagram of the GitHub repository fullstack-verse/yms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fullstack-verse/yms
- Repository: https://github.com/fullstack-verse/yms

## Overview

##### Main Actors
- Admin: This actor interacts with several management features like adding categories, packages, posts, handling booking history, reports, and user profiles.
- Employer/User: There are separate login credentials mentioned (e.g., for an “employer” or registered user), representing the typical user who might book classes or events.
- Guest: Unauthenticated site visitors who can browse items such as class details or contact information.

##### Major Use Cases
- User Authentication:
- Login
- Registration (new user signup)
- Logout
- Change Password
- Booking Management:
- View Booking Details
- New Bookings (for new registration/bookings)
- Partial Payment Bookings
- Full Payment Bookings
- Booking History (for users and admins)
- Content Management (Admin Use Cases):
- /Edit Post (blog or class/post updates)
- Category/Package (to update offerings)
- Manage Posts
- Reports & Administration:
- Report on Booking
- Report on Registration
- Profile Management (for users/admin)
- Navigation & General Interaction:
- Browse classes, posts, and package details
- Access pages like “about”, “contact”, etc.

##### System Boundary
- Encapsulate all the use cases within a boundary (often called “Gym/Yoga Management System”).
- Which use cases are internal to the system.

##### Relationships
- Admin actor to the management and report use cases (like adding content, managing bookings, profile changes).
- Link the Employer/User actor to authentication, booking management, and general navigation use cases.
- That Guest users can access certain non-restricted pages and then be prompted to register or login.
- Use include or extend relationships where needed. For instance, “Login” could be an included action for “Change Password” or “Profile Management” if a user isn’t authenticated. Similarly, booking details might include verification of user accounts.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Actors
    Admin(("Admin")):::actor
    Employer(("Employer/User")):::actor
    Guest(("Guest")):::actor

    %% System Boundary: Gym/Yoga Management System
    subgraph "Gym/Yoga Management System"
        %% User Authentication
        subgraph "User Authentication"
            AdminLogin(("Admin Login"))
            UserLogin(("User Login"))
            Registration(("Registration"))
            AdminLogout(("Admin Logout"))
            UserLogout(("User Logout"))
            AdminChangePassword(("Admin Change Password"))
            UserChangePassword(("User Change Password"))
        end

        %% Booking Management
        subgraph "Booking Management"
            PublicBookingDetails(("View Booking Details"))
            AdminBookingDetails(("Admin Booking Details"))
            AdminNewBookings(("New Bookings"))
            AdminPartialPaymentBookings(("Partial Payment Bookings"))
            AdminFullPaymentBookings(("Full Payment Bookings"))
            BookingHistoryGeneral(("Booking History"))
            AdminBookingHistory(("Admin Booking History"))
        end

        %% Content Management
        subgraph "Content Management"
            AddPost(("Add Post"))
            EditPost(("Edit Post"))
            ManagePosts(("Manage Posts"))
            AddCategory(("Add Category"))
            AddPackage(("Add Package"))
        end

        %% Reports & Administration
        subgraph "Reports & Administration"
            BookingReport(("Booking Report"))
            RegistrationReport(("Registration Report"))
            AdminProfile(("Profile Management (Admin)"))
            UserProfile(("Profile Management (User)"))
        end

        %% Navigation & General Interaction
        subgraph "Navigation & General Interaction"
            Browse(("Browse Classes & Posts"))
            About(("About Page"))
            Contact(("Contact Page"))
            Home(("Home/Index Page"))
        end
    end

    %% Associations for Admin
    Admin --> AdminLogin
    Admin --> AdminLogout
    Admin --> AdminChangePassword
    Admin --> AdminBookingDetails
    Admin --> AdminNewBookings
    Admin --> AdminPartialPaymentBookings
    Admin --> AdminFullPaymentBookings
    Admin --> AdminBookingHistory
    Admin --> AddPost
    Admin --> EditPost
    Admin --> ManagePosts
    Admin --> AddCategory
    Admin --> AddPackage
    Admin --> BookingReport
    Admin --> RegistrationReport
    Admin --> AdminProfile

    %% Associations for Employer/User
    Employer --> UserLogin
    Employer --> Registration
    Employer --> UserLogout
    Employer --> UserChangePassword
    Employer --> PublicBookingDetails
    Employer --> BookingHistoryGeneral
    Employer --> Browse
    Employer --> About
    Employer --> Contact
    Employer --> Home
    Employer --> UserProfile

    %% Associations for Guest
    Guest --> Browse
    Guest --> About
    Guest --> Contact
    Guest --> Registration
    Guest --> UserLogin

    %% Click Events for User Authentication
    click AdminLogin "https://github.com/fullstack-verse/yms/blob/master/admin/login.php"
    click UserLogin "https://github.com/fullstack-verse/yms/blob/master/login.php"
    click Registration "https://github.com/fullstack-verse/yms/blob/master/registration.php"
    click AdminLogout "https://github.com/fullstack-verse/yms/blob/master/admin/logout.php"
    click UserLogout "https://github.com/fullstack-verse/yms/blob/master/logout.php"
    click AdminChangePassword "https://github.com/fullstack-verse/yms/blob/master/admin/change-password.php"
    click UserChangePassword "https://github.com/fullstack-verse/yms/blob/master/changepassword.php"

    %% Click Events for Booking Management
    click PublicBookingDetails "https://github.com/fullstack-verse/yms/blob/master/booking-details.php"
    click AdminBookingDetails "https://github.com/fullstack-verse/yms/blob/master/admin/booking-history-details.php"
    click AdminNewBookings "https://github.com/fullstack-verse/yms/blob/master/admin/new-bookings.php"
    click AdminPartialPaymentBookings "https://github.com/fullstack-verse/yms/blob/master/admin/partial-payment-bookings.php"
    click AdminFullPaymentBookings "https://github.com/fullstack-verse/yms/blob/master/admin/full-payment-bookings.php"
    click BookingHistoryGeneral "https://github.com/fullstack-verse/yms/blob/master/Booking-History.php"
    click AdminBookingHistory "https://github.com/fullstack-verse/yms/blob/master/admin/booking-history.php"

    %% Click Events for Content Management
    click AddPost "https://github.com/fullstack-verse/yms/blob/master/admin/add-post.php"
    click EditPost "https://github.com/fullstack-verse/yms/blob/master/admin/edit-post.php"
    click ManagePosts "https://github.com/fullstack-verse/yms/blob/master/admin/manage-post.php"
    click AddCategory "https://github.com/fullstack-verse/yms/blob/master/admin/add-category.php"
    click AddPackage "https://github.com/fullstack-verse/yms/blob/master/admin/add-package.php"

    %% Click Events for Reports & Administration
    click BookingReport "https://github.com/fullstack-verse/yms/blob/master/admin/report-booking.php"
    click RegistrationReport "https://github.com/fullstack-verse/yms/blob/master/admin/report-registration.php"
    click AdminProfile "https://github.com/fullstack-verse/yms/blob/master/admin/profile.php"
    click UserProfile "https://github.com/fullstack-verse/yms/blob/master/profile.php"

    %% Click Events for Navigation & General Interaction
    click About "https://github.com/fullstack-verse/yms/blob/master/about.php"
    click Contact "https://github.com/fullstack-verse/yms/blob/master/contact.php"
    click Home "https://github.com/fullstack-verse/yms/blob/master/index.php"

    %% Styles
    classDef actor fill:#ffcccc,stroke:#333,stroke-width:2px;
    classDef usecase fill:#ccffcc,stroke:#333,stroke-width:2px;
    class AdminLogin,UserLogin,Registration,AdminLogout,UserLogout,AdminChangePassword,UserChangePassword,PublicBookingDetails,AdminBookingDetails,AdminNewBookings,AdminPartialPaymentBookings,AdminFullPaymentBookings,BookingHistoryGeneral,AdminBookingHistory,AddPost,EditPost,ManagePosts,AddCategory,AddPackage,BookingReport,RegistrationReport,AdminProfile,UserProfile,Browse,About,Contact,Home usecase;
```
