# gabriellaalubis/if2150-2025-k01-g05-greencloset architecture

> Architecture diagram of the GitHub repository gabriellaalubis/if2150-2025-k01-g05-greencloset, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gabriellaalubis/if2150-2025-k01-g05-greencloset
- Repository: https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset

## Overview

GreenCloset is a Python desktop app for sustainable-fashion shopping, barter, clothing donations, community chat, and news. Users enter through the CustomTkinter application, navigate its views, and use feature controllers to manage domain records in MySQL. The README documents an MVC structure and MySQL persistence; sampled controllers confirm direct SQL access in several areas, while the database connection implementation and most view-to-controller wiring were not sampled, so those links are shown only where supported.

Main entry points: [`src/database`](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/tree/main/src/database) (MySQL database), [`src/mainApp.py`](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/mainApp.py) (App navigation), [`src/model`](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/tree/main/src/model) (Domain entities), [`src/controller/barterController.py`](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/barterController.py) (Barter requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_main["App navigation<br/>[mainApp.py]"]
  node_home["Home and news<br/>[home_page.py]"]
  node_catalog["Product catalog<br/>[product_catalog.py]"]
  node_product_detail["Product detail<br/>[product_detail.py]"]
  node_purchase["Purchase form<br/>[pembelian_form.py]"]
  node_transactions["My transactions<br/>[my_transaction.py]"]
  node_profile["Profile and address<br/>[profile.py]"]
end

subgraph group_commerce["Commerce flows"]
  node_produk_controller["Product management"]
  node_pesanan_controller["Shopping orders"]
  node_barter_controller["Barter requests"]
  node_donasi_controller["Donation records"]
end

subgraph group_community["Community features"]
  node_chat_view["Chat interface<br/>[chat.py]"]
  node_chat_controller["Chat messaging<br/>[chatController.py]"]
  node_news_view["News catalog and detail<br/>[news_catalog.py]"]
  node_berita_controller["News management"]
  node_notif_controller["Notifications"]
end

subgraph group_data["Domain and persistence"]
  node_customer_controller["Customer accounts"]
  node_owner_controller["Owner accounts<br/>[ownerController.py]"]
  node_entities["Domain entities"]
  node_mysql[("MySQL database")]
end

node_user(("Customer or owner"))

node_user -->|"uses"| node_main
node_main -->|"navigates"| node_home
node_main -->|"navigates"| node_catalog
node_main -->|"navigates"| node_profile
node_main -->|"opens news"| node_news_view
node_catalog -->|"selects item"| node_product_detail
node_product_detail -->|"starts purchase"| node_purchase
node_user -->|"reviews activity"| node_transactions
node_user -->|"sends messages"| node_chat_view
node_home -->|"opens articles"| node_news_view
node_produk_controller -->|"queries products"| node_mysql
node_pesanan_controller -->|"manages orders"| node_mysql
node_barter_controller -->|"manages barter"| node_mysql
node_barter_controller -->|"loads entities"| node_entities
node_donasi_controller -->|"manages donations"| node_mysql
node_chat_controller -->|"reads and writes"| node_mysql
node_chat_controller -->|"maps messages"| node_entities
node_berita_controller -->|"queries news"| node_mysql
node_berita_controller -->|"maps news"| node_entities
node_notif_controller -->|"stores notifications"| node_mysql
node_customer_controller -->|"manages customers"| node_mysql
node_customer_controller -->|"maps customers"| node_entities
node_owner_controller -->|"manages owners"| node_mysql
node_owner_controller -->|"uses entities"| node_entities

click node_main "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/mainApp.py"
click node_home "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/home_page.py"
click node_catalog "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/product_catalog.py"
click node_product_detail "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/product_detail.py"
click node_purchase "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/pembelian_form.py"
click node_transactions "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/my_transaction.py"
click node_profile "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/profile.py"
click node_produk_controller "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/produkController.py"
click node_pesanan_controller "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/pesananController.py"
click node_barter_controller "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/barterController.py"
click node_donasi_controller "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/donasiController.py"
click node_chat_view "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/chat.py"
click node_chat_controller "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/chatController.py"
click node_news_view "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/news_catalog.py"
click node_berita_controller "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/beritaController.py"
click node_notif_controller "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/notifikasiController.py"
click node_customer_controller "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/customerController.py"
click node_owner_controller "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/ownerController.py"
click node_entities "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/tree/main/src/model"
click node_mysql "https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/tree/main/src/database"

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_main,node_home,node_catalog,node_product_detail,node_purchase,node_transactions,node_profile toneBlue
class node_produk_controller,node_pesanan_controller,node_barter_controller,node_donasi_controller toneAmber
class node_chat_view,node_chat_controller,node_news_view,node_berita_controller,node_notif_controller toneMint
class node_customer_controller,node_owner_controller,node_entities,node_mysql toneRose
class node_user toneIndigo
```

## Components

### Desktop app

- [App navigation](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/mainApp.py): `src/mainApp.py`
- [Home and news](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/home_page.py): `src/view/home_page.py`
- [Product catalog](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/product_catalog.py): `src/view/product_catalog.py`
- [Product detail](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/product_detail.py): `src/view/product_detail.py`
- [Purchase form](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/pembelian_form.py): `src/view/pembelian_form.py`
- [My transactions](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/my_transaction.py): `src/view/my_transaction.py`
- [Profile and address](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/profile.py): `src/view/profile.py`

### Commerce flows

- [Product management](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/produkController.py): `src/controller/produkController.py`
- [Shopping orders](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/pesananController.py): `src/controller/pesananController.py`
- [Barter requests](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/barterController.py): `src/controller/barterController.py`
- [Donation records](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/donasiController.py): `src/controller/donasiController.py`

### Community features

- [Chat interface](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/chat.py): `src/view/chat.py`
- [Chat messaging](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/chatController.py): `src/controller/chatController.py`
- [News catalog and detail](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/view/news_catalog.py): `src/view/news_catalog.py`
- [News management](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/beritaController.py): `src/controller/beritaController.py`
- [Notifications](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/notifikasiController.py): `src/controller/notifikasiController.py`

### Domain and persistence

- [Customer accounts](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/customerController.py): `src/controller/customerController.py`
- [Owner accounts](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/blob/main/src/controller/ownerController.py): `src/controller/ownerController.py`
- [Domain entities](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/tree/main/src/model): `src/model`
- [MySQL database](https://github.com/gabriellaalubis/if2150-2025-k01-g05-greencloset/tree/main/src/database): `src/database`

### Other components

- **Customer or owner**

## Connections

- Customer or owner → App navigation: uses
- App navigation → Home and news: navigates
- App navigation → Product catalog: navigates
- App navigation → Profile and address: navigates
- App navigation → News catalog and detail: opens news
- Product catalog → Product detail: selects item
- Product detail → Purchase form: starts purchase
- Customer or owner → My transactions: reviews activity
- Customer or owner → Chat interface: sends messages
- Home and news → News catalog and detail: opens articles
- Product management → MySQL database: queries products
- Shopping orders → MySQL database: manages orders
- Barter requests → MySQL database: manages barter
- Barter requests → Domain entities: loads entities
- Donation records → MySQL database: manages donations
- Chat messaging → MySQL database: reads and writes
- Chat messaging → Domain entities: maps messages
- News management → MySQL database: queries news
- News management → Domain entities: maps news
- Notifications → MySQL database: stores notifications
- Customer accounts → MySQL database: manages customers
- Customer accounts → Domain entities: maps customers
- Owner accounts → MySQL database: manages owners
- Owner accounts → Domain entities: uses entities
