# manoharkonala/zomato-clone-with-python-tkinter-and-mysql architecture

> Architecture diagram of the GitHub repository manoharkonala/zomato-clone-with-python-tkinter-and-mysql, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql
- Repository: https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql

## Overview

##### Project type and purpose
- This is a desktop “full‐stack” application:
- Frontend: Python Tkinter GUI
- Backend: Python application logic (authentication, menu browsing, order processing)
- Persistence: MySQL database

##### File structure
- Top‐level directories:
- GUI → Tkinter code modules (main.py, Main_window.py, user_authentication_zomato.py)
- No separate “services” or microservices; it is a monolithic client application with a remote DB

##### README for additional insights
- Features: user signup/login, restaurant browsing by cuisine, menu viewing, order placement, order history
- Dependencies: mysql-connector-python, Pillow (for Images)

a. Main components
1) Presentation Layer (GUI)
- Tkinter windows and widgets
- Images module loaded via Pillow
2) Application Layer (Business Logic)
- Authentication module
- Restaurant/Menu/Order management module
3) Persistence Layer (Database)
- MySQL server with tables: users, restaurants, menus, orders, order_details
4) External/Infrastructure
- mysql-connector-python driver
- File system for Images
b. Component interactions
- GUI → Business Logic: user actions (clicks, form entries) call Python functions
- Business Logic → Database: CRUD operations via mysql-connector
- Business Logic → GUI: updates views based on query results (e.g., populate menus)
c. Architectural patterns
- Three‐tier/Layered architecture:
- Tier 1: View (Tkinter)
- Tier 2: Controller (Python modules handling UI events and business rules)
- Tier 3: Model (MySQL tables accessed via connector)
- MVC‐inspired separation (View vs. Model with controller logic in between)
d. Key technologies/frameworks
- Python 3.x, Tkinter, mysql-connector-python, MySQL, Pillow

##### Detail checklist
- Break business logic into sub‐components (Authentication, Restaurant service, Order service)
- Image asset loader module (Pillow) as a dependency of GUI
- Mysql-connector-python library as the interface between logic and DB

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Presentation Layer"
        MainApp["Main Application (Tkinter)"]:::ui
        MainWindow["Main Window"]:::ui
        AuthUI["User Authentication UI"]:::ui
    end

    subgraph "Business Logic Layer"
        AuthManager["Auth Manager"]:::logic
        MenuManager["Restaurant & Menu Manager"]:::logic
        OrderManager["Order Manager"]:::logic
    end

    subgraph "Persistence Layer"
        DB[(MySQL: zomato_clone)]:::db
    end

    subgraph "SQL Scripts" 
        SQLAll["ALL-IN-ONE-FILE.sql"]:::db
        SQLUsers["zomato_clone_users.sql"]:::db
        SQLRests["zomato_clone_restaurants.sql"]:::db
        SQLMenus["zomato_clone_menus.sql"]:::db
        SQLOrders["zomato_clone_orders.sql"]:::db
        SQLOrderDetails["zomato_clone_orderdetails.sql"]:::db
    end

    subgraph "Schema Documentation"
        ERDiagram["zomato ER diagram.pbix"]:::db
        ExcelSheet["zomatosqlexcelsheet.xlsx"]:::db
    end

    subgraph "External Dependencies"
        Connector["mysql-connector-python"]:::external
        ImageLoader["Image Assets Loader"]:::external
        README["README.md"]:::external
    end

    MainApp --> MainWindow
    MainWindow --> AuthUI
    AuthUI --> AuthManager
    MainApp --> MenuManager
    MainApp --> OrderManager

    AuthManager -->|SELECT/INSERT| Connector
    MenuManager -->|SELECT| Connector
    OrderManager -->|INSERT| Connector

    Connector --> DB

    SQLAll --> DB
    SQLUsers --> DB
    SQLRests --> DB
    SQLMenus --> DB
    SQLOrders --> DB
    SQLOrderDetails --> DB

    ERDiagram -.-> DB
    ExcelSheet -.-> DB

    ImageLoader -.-> MainWindow
    README -.-> MainApp

    %% Click Events
    click MainApp "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/GUI/main.py"
    click MainWindow "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/GUI/Main_window.py"
    click AuthUI "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/GUI/user_authentication_zomato.py"
    click AuthManager "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/GUI/user_authentication_zomato.py"
    click MenuManager "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/GUI/main.py"
    click OrderManager "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/GUI/main.py"
    click ImageLoader "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/tree/main/Images/"
    click SQLAll "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/Database/ALL-IN-ONE-FILE.sql"
    click SQLUsers "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/Database/zomato_clone_users.sql"
    click SQLRests "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/Database/zomato_clone_restaurants.sql"
    click SQLMenus "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/Database/zomato_clone_menus.sql"
    click SQLOrders "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/Database/zomato_clone_orders.sql"
    click SQLOrderDetails "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/Database/zomato_clone_orderdetails.sql"
    click ERDiagram "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/Database_Schema_and_Data/zomato ER diagram.pbix"
    click ExcelSheet "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/Database_Schema_and_Data/zomatosqlexcelsheet.xlsx"
    click README "https://github.com/manoharkonala/zomato-clone-with-python-tkinter-and-mysql/blob/main/README.md"

    classDef ui fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef logic fill:#90EE90,stroke:#333,stroke-width:1px
    classDef db fill:#FFA500,stroke:#333,stroke-width:1px
    classDef external fill:#D3D3D3,stroke:#333,stroke-width:1px
```
