# chiragpaul/market-management-system-using-python-tkinter-and-my-sql architecture

> Architecture diagram of the GitHub repository chiragpaul/market-management-system-using-python-tkinter-and-my-sql, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chiragpaul/market-management-system-using-python-tkinter-and-my-sql
- Repository: https://github.com/chiragpaul/market-management-system-using-python-tkinter-and-my-sql

## Overview

##### Project type and purpose
- This is a lightweight, full-stack Python desktop/web hybrid application whose primary feature is a secure login system.
- Frontend: a Tkinter‐based GUI (Allmart_User.py).
- Backend: a Python service handling authentication logic (AllMart_custlogserv.py) with a MySQL database as persistent storage.

##### File structure
- Top‐level scripts:
- Allmart_User.py – GUI entry point, collects credentials and user input, reads states.txt for address dropdowns.
- AllMart_custlogserv.py – “service” layer, receives requests from the GUI, runs SQL queries.
- states.txt – static list of states used by the GUI.
- No separate “frontend” or “backend” directories, but the two scripts imply a clear separation of concerns (UI vs. business logic).
- No build or deployment scripts; the system runs as two cooperating Python processes (or modules).

##### Key insights from the README
- Emphasis on “secured login system,” “MySQL database,” and “Tkinter module for visual appearance.”
- No mention of additional microservices or external 3rd-party APIs beyond MySQL.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Actor
    User["User"]:::user

    %% Presentation Layer
    subgraph "Presentation Layer"
        GUI["Tkinter GUI\n(Allmart_User.py)"]:::ui
        Static["Static Resource\n(states.txt)"]:::static
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        Service["Authentication Service\n(AllMart_custlogserv.py)"]:::service
    end

    %% Data Layer
    subgraph "Data Layer"
        DB[(MySQL Database)]:::db
    end

    %% Documentation
    Docs["Project Documentation\n(README.md)"]:::doc

    %% Connections
    User -->|"Enter credentials"| GUI
    Static -->|"Load states list"| GUI
    GUI -->|"Authenticate(username, password)"| Service
    Service -->|"SELECT ... FROM users WHERE ..."| DB
    DB -->|"Query result"| Service
    Service -->|"Authentication result"| GUI
    GUI -->|"Display result"| User

    %% Click Events
    click GUI "https://github.com/chiragpaul/market-management-system-using-python-tkinter-and-my-sql/blob/main/Allmart_User.py"
    click Service "https://github.com/chiragpaul/market-management-system-using-python-tkinter-and-my-sql/blob/main/AllMart_custlogserv.py"
    click Static "https://github.com/chiragpaul/market-management-system-using-python-tkinter-and-my-sql/blob/main/states.txt"
    click Docs "https://github.com/chiragpaul/market-management-system-using-python-tkinter-and-my-sql/blob/main/README.md"

    %% Styles
    classDef user fill:#e3f2fd,stroke:#90caf9,stroke-width:1px
    classDef ui fill:#bbdefb,stroke:#64b5f6,stroke-width:1px
    classDef service fill:#c8e6c9,stroke:#81c784,stroke-width:1px
    classDef db fill:#ffe0b2,stroke:#ffb74d,stroke-width:1px
    classDef static fill:#eeeeee,stroke:#bdbdbd,stroke-width:1px
    classDef doc fill:#f5f5f5,stroke:#9e9e9e,stroke-width:1px
```
