# uswaarif/medicines-guide-system architecture

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

- Interactive diagram: https://gitdiagram.com/uswaarif/medicines-guide-system
- Repository: https://github.com/uswaarif/medicines-guide-system

## Overview

##### Project Type and Purpose
- The project appears to be a Python desktop (or standalone) application that demonstrates a range of algorithms. There are many separate files covering various sorting algorithms (e.g., bubbleSort.py, insertionSort.py, quickSort.py, etc.) and searching algorithms (e.g., binarySearch.py, LinearSearch.py, AdvancedSearch.py).
- In addition, there are several UI files (with .ui extensions) and corresponding Python modules (like FirstPage.py, MedicineGuide.py, MedicineGuide2.py) which indicate that the application has a graphical user interface – likely built using a framework such as Qt (given the .ui file naming and the presence of loadUI.py).
- There are also modules related to web scraping (e.g., SeleniumScrap.py, scrap.py, scrapping.py) and data file resources (CSV and Excel files).
- Overall, the project seems to be a demonstrative or educational application, possibly for a course (as suggested by the “CS261F22PID36” in the README) that integrates algorithm visualization, data processing, and web scraping functions.

##### File Structure
- A UI Component: Files like FirstPage.ui, MedicineGuide.ui, AdvancedSearch.ui, along with their corresponding Python controllers, indicate the visual front-end of the application.
- An Algorithm Component: There are many standalone modules containing implementations of various sorting and searching algorithms. Each algorithm (e.g., TimSort, mergeSort, quickSort, etc.) is implemented in its own file, suggesting a modular approach.
- A Data Handling Component: Data files (CSV, Excel) are used as input or for display purposes. They may serve as the dataset upon which the algorithms operate.
- A Web Scraping Component: Multiple files hint at scraping functionality. For instance, SeleniumScrap.py suggests usage of Selenium for automating web data collection.
- Utility/Integration Component: loadUI.py and pageUIDataTable.py are likely used to load and bind the UI to the functional logic.

##### Elements
– Each component should have a clear label (e.g., “UI Frontend”, “Sorting Algorithms”, “Searching Algorithms”, “Data Files”, “Web Scraping Engine”).

## Diagram (Mermaid)

```mermaid
flowchart TD
    User["User"]:::external

    subgraph "UI Frontend"
        FP["FirstPage"]:::ui
        MG["MedicineGuide"]:::ui
        MG2["MedicineGuide2"]:::ui
        AS["AdvancedSearch"]:::ui
    end

    subgraph "Utility/Integration"
        UIB["UI Loader/Bridge"]:::util
    end

    subgraph "Algorithm Module"
        SA["Sorting Algorithms"]:::algo
        SEA["Searching Algorithms"]:::algo
    end

    subgraph "Data Module"
        DF["Data Files"]:::data
    end

    subgraph "Web Scraping Engine"
        WS["Web Scraping Engine"]:::scrape
    end

    %% Connections / Data Flow
    User -->|"uses"| FP
    FP -->|"loadsUI"| UIB
    UIB -->|"invokes_sort"| SA
    UIB -->|"invokes_search"| SEA
    DF -->|"data_input"| SA
    DF -->|"data_input"| SEA
    WS -->|"supplies_data"| DF
    WS -->|"updatesUI"| FP

    %% Click Events for UI Frontend
    click FP "https://github.com/uswaarif/medicines-guide-system/blob/main/FirstPage.py"
    click FP "https://github.com/uswaarif/medicines-guide-system/blob/main/FirstPage.ui"
    click FP "https://github.com/uswaarif/medicines-guide-system/blob/main/firstPage.qrc"
    
    click MG "https://github.com/uswaarif/medicines-guide-system/blob/main/MedicineGuide.py"
    click MG "https://github.com/uswaarif/medicines-guide-system/blob/main/MedicineGuide.ui"
    
    click MG2 "https://github.com/uswaarif/medicines-guide-system/blob/main/MedicineGuide2.py"
    click MG2 "https://github.com/uswaarif/medicines-guide-system/blob/main/MedicineGuide2.ui"
    
    click AS "https://github.com/uswaarif/medicines-guide-system/blob/main/AdvancedSearch.py"
    click AS "https://github.com/uswaarif/medicines-guide-system/blob/main/AdvancedSearch.ui"
    
    %% Click Events for Algorithm Module - Sorting Algorithms
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/bubbleSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/insertionSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/InsertionSort2.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/quickSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/mergeSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/heapSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/shellSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/selectionSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/countingSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/bucketSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/radixSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/pigeonHoleSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/OddEvenSort.py"
    click SA "https://github.com/uswaarif/medicines-guide-system/blob/main/TimSort.py"
    
    %% Click Events for Algorithm Module - Searching Algorithms
    click SEA "https://github.com/uswaarif/medicines-guide-system/blob/main/binarySearch.py"
    click SEA "https://github.com/uswaarif/medicines-guide-system/blob/main/LinearSearch.py"
    click SEA "https://github.com/uswaarif/medicines-guide-system/blob/main/Search.py"
    click SEA "https://github.com/uswaarif/medicines-guide-system/blob/main/SearchingFilters.py"
    
    %% Click Events for Data Module
    click DF "https://github.com/uswaarif/medicines-guide-system/blob/main/700Data.csv"
    click DF "https://github.com/uswaarif/medicines-guide-system/blob/main/Data.xlsx"
    click DF "https://github.com/uswaarif/medicines-guide-system/blob/main/newdata.csv"
    click DF "https://github.com/uswaarif/medicines-guide-system/blob/main/newdata2.csv"
    click DF "https://github.com/uswaarif/medicines-guide-system/blob/main/newdata3.csv"
    click DF "https://github.com/uswaarif/medicines-guide-system/blob/main/newdata4.csv"
    
    %% Click Events for Web Scraping Engine
    click WS "https://github.com/uswaarif/medicines-guide-system/blob/main/SeleniumScrap.py"
    click WS "https://github.com/uswaarif/medicines-guide-system/blob/main/scrap.py"
    click WS "https://github.com/uswaarif/medicines-guide-system/blob/main/scrap2.py"
    click WS "https://github.com/uswaarif/medicines-guide-system/blob/main/scrapping.py"
    click WS "https://github.com/uswaarif/medicines-guide-system/blob/main/scrapping2.py"
    
    %% Click Events for Utility/Integration Component
    click UIB "https://github.com/uswaarif/medicines-guide-system/blob/main/loadUI.py"
    click UIB "https://github.com/uswaarif/medicines-guide-system/blob/main/pageUIDataTable.py"
    
    %% Styles
    classDef ui fill:#ADD8E6,stroke:#000,stroke-width:1px;
    classDef algo fill:#90EE90,stroke:#000,stroke-width:1px;
    classDef data fill:#FFA500,stroke:#000,stroke-width:1px;
    classDef scrape fill:#FFB6C1,stroke:#000,stroke-width:1px;
    classDef util fill:#FFFFE0,stroke:#000,stroke-width:1px;
    classDef external fill:#D3D3D3,stroke:#000,stroke-width:1px;
```
