How mxavier-dev/vending-machine works
This repository is a small vending-machine simulator offered as separate English and Portuguese CustomTkinter applications. In each version, a user selects products, adjusts the cart while stock changes, enters payment, and finalizes a purchase; the purchase handler validates payment, calculates change when due, and resets the cart. The excerpts show the UI callbacks and change-calculation calls. Each node represents responsibilities within a single script, not a separately implemented module.
Main entry points: vending_machine_EN.py English UI · vending_machine_PT-BR.py Portuguese UI
Components 9
User interaction
- English UI
vending_machine_EN.py - Portuguese UI
vending_machine_PT-BR.py
Cart and purchase
- English cart and stock
vending_machine_EN.py - English checkout
vending_machine_EN.py - Portuguese cart and stock
vending_machine_PT-BR.py - Portuguese checkout
vending_machine_PT-BR.py
Change calculation
- English change helpers
vending_machine_EN.py - Portuguese change helpers
vending_machine_PT-BR.py
Other components
- Customer
Connections 8
- Customer → English UI: uses
README.md - English UI → English cart and stock: adjusts cart
vending_machine_EN.py - English UI → English checkout: finalizes purchase
vending_machine_EN.py - English checkout → English change helpers: calculates change
vending_machine_EN.py - Customer → Portuguese UI: uses
README.md - Portuguese UI → Portuguese cart and stock: adjusts cart
vending_machine_PT-BR.py - Portuguese UI → Portuguese checkout: finalizes purchase
vending_machine_PT-BR.py - Portuguese checkout → Portuguese change helpers: calculates change
vending_machine_PT-BR.py