# ashbirx/pharmacy-management-system architecture

> Architecture diagram of the GitHub repository ashbirx/pharmacy-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ashbirx/pharmacy-management-system
- Repository: https://github.com/ashbirx/pharmacy-management-system

## Overview

This is a small Tkinter pharmacy-management application backed by MySQL. The principal workflow is a user operating the desktop interface to manage customer and medicine records, inspect inventory, or view a sales report; the application queries the database and presents results in tables. The sampled source shows database access and several operations, but omits some GUI bindings and the SQL file contents, so those connections are not inferred.

Main entry points: [`actual_project.py`](https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py) (Customer records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop application"]
  node_gui["Tkinter interface<br/>[actual_project.py]"]
  node_results["Result display<br/>[actual_project.py]"]
end

subgraph group_domain["Pharmacy operations"]
  node_customers["Customer records<br/>[actual_project.py]"]
  node_medicines["Medicine records<br/>[actual_project.py]"]
  node_inventory["Inventory queries<br/>[actual_project.py]"]
  node_sales["Sales report<br/>[actual_project.py]"]
end

subgraph group_storage["Persistence"]
  node_mysql[("MySQL database")]
end

node_user(("Pharmacy user"))

node_user -->|"uses"| node_gui
node_gui -->|"dispatches"| node_customers
node_customers -->|"reads and writes"| node_mysql
node_medicines -->|"reads and writes"| node_mysql
node_inventory -->|"queries"| node_mysql
node_sales -->|"queries"| node_mysql
node_inventory -->|"displays"| node_results
node_sales -->|"displays"| node_results
node_customers -->|"populates table"| node_results

click node_gui "https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py"
click node_customers "https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py"
click node_medicines "https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py"
click node_inventory "https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py"
click node_sales "https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py"
click node_results "https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gui,node_results,node_user toneBlue
class node_customers,node_medicines,node_inventory,node_sales toneAmber
class node_mysql toneMint
```

## Components

### Desktop application

- [Tkinter interface](https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py): `actual_project.py`
- [Result display](https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py): `actual_project.py`

### Pharmacy operations

- [Customer records](https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py): `actual_project.py`
- [Medicine records](https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py): `actual_project.py`
- [Inventory queries](https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py): `actual_project.py`
- [Sales report](https://github.com/ashbirx/pharmacy-management-system/blob/main/actual_project.py): `actual_project.py`

### Persistence

- **MySQL database**

### Other components

- **Pharmacy user**

## Connections

- Pharmacy user → Tkinter interface: uses
- Tkinter interface → Customer records: dispatches (evidence: `actual_project.py`)
- Customer records → MySQL database: reads and writes (evidence: `actual_project.py`)
- Medicine records → MySQL database: reads and writes (evidence: `actual_project.py`)
- Inventory queries → MySQL database: queries (evidence: `actual_project.py`)
- Sales report → MySQL database: queries (evidence: `actual_project.py`)
- Inventory queries → Result display: displays (evidence: `actual_project.py`)
- Sales report → Result display: displays (evidence: `actual_project.py`)
- Customer records → Result display: populates table (evidence: `actual_project.py`)
