# preritavarshney20/song-catalogue architecture

> Architecture diagram of the GitHub repository preritavarshney20/song-catalogue, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/preritavarshney20/song-catalogue
- Repository: https://github.com/preritavarshney20/song-catalogue

## Overview

Song-Catalogue is a Tkinter desktop application backed by MySQL. Admins manage the song catalogue and review transactions; users browse songs, purchase one, cancel a purchase, and print a receipt. The single Python file combines the interface, workflows, and database access, so nodes represent responsibilities within that file rather than separate modules. The excerpts show catalogue queries and writes, transaction lookup, and receipt lookup; some purchase and cancellation details are omitted, so their database relationships are not inferred.

Main entry points: [`Song Purchase System.py`](https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py) (Tkinter Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop Interface"]
  node_desktop_app["Tkinter Application"]
end

subgraph group_catalogue["Catalogue Management"]
  node_catalogue_admin["Song Administration"]
  node_song_listing["Song Listing"]
end

subgraph group_purchases["Purchase Workflows"]
  node_purchase["Song Purchase"]
  node_cancellation["Purchase Cancellation"]
  node_receipt_history["Receipts and History"]
end

node_admin(("Admin"))
node_user(("User"))
node_mysql[("MySQL Database")]

node_admin -->|"uses"| node_desktop_app
node_user -->|"uses"| node_desktop_app
node_desktop_app -->|"dispatches"| node_catalogue_admin
node_desktop_app -->|"dispatches"| node_song_listing
node_desktop_app -->|"dispatches"| node_purchase
node_desktop_app -->|"dispatches"| node_cancellation
node_desktop_app -->|"dispatches"| node_receipt_history
node_catalogue_admin -->|"reads and writes"| node_mysql
node_song_listing -.->|"queries"| node_mysql
node_purchase -.->|"records purchase"| node_mysql
node_cancellation -.->|"updates purchase"| node_mysql
node_receipt_history -->|"queries transactions"| node_mysql

click node_desktop_app "https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py"
click node_catalogue_admin "https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py"
click node_song_listing "https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py"
click node_purchase "https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py"
click node_cancellation "https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py"
click node_receipt_history "https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.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_desktop_app,node_user toneBlue
class node_catalogue_admin,node_song_listing,node_mysql toneAmber
class node_purchase,node_cancellation,node_receipt_history toneMint
class node_admin toneIndigo
```

## Components

### Desktop Interface

- [Tkinter Application](https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py): `Song Purchase System.py`

### Catalogue Management

- [Song Administration](https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py): `Song Purchase System.py`
- [Song Listing](https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py): `Song Purchase System.py`

### Purchase Workflows

- [Song Purchase](https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py): `Song Purchase System.py`
- [Purchase Cancellation](https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py): `Song Purchase System.py`
- [Receipts and History](https://github.com/preritavarshney20/song-catalogue/blob/main/Song%20Purchase%20System.py): `Song Purchase System.py`

### Other components

- **Admin**
- **User**
- **MySQL Database**

## Connections

- Admin → Tkinter Application: uses (evidence: `README.md`)
- User → Tkinter Application: uses (evidence: `README.md`)
- Tkinter Application → Song Administration: dispatches (evidence: `Song Purchase System.py`)
- Tkinter Application → Song Listing: dispatches (evidence: `Song Purchase System.py`)
- Tkinter Application → Song Purchase: dispatches (evidence: `Song Purchase System.py`)
- Tkinter Application → Purchase Cancellation: dispatches (evidence: `Song Purchase System.py`)
- Tkinter Application → Receipts and History: dispatches (evidence: `Song Purchase System.py`)
- Song Administration → MySQL Database: reads and writes (evidence: `Song Purchase System.py`)
- Song Listing → MySQL Database: queries
- Song Purchase → MySQL Database: records purchase
- Purchase Cancellation → MySQL Database: updates purchase
- Receipts and History → MySQL Database: queries transactions (evidence: `Song Purchase System.py`)
