# dheeraj00001/se-lab-3-assignment architecture

> Architecture diagram of the GitHub repository dheeraj00001/se-lab-3-assignment, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dheeraj00001/se-lab-3-assignment
- Repository: https://github.com/dheeraj00001/se-lab-3-assignment

## Overview

This is a Python reference implementation of a self-service coffee kiosk, organized as presentation, business, and local data layers. The customer selects a beverage and size in the UI; the order manager prices and creates the order, processes payment, records the outcome, and requests a receipt. The main module assembles the components and demonstrates the flow. The README documents physical kiosk capabilities, but sampled code simulates card reading and receipt printing; no external hardware integration is shown.

Main entry points: [`src/main.py`](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/main.py) (Kiosk Bootstrap), [`src/business/order_manager.py`](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/business/order_manager.py) (Order Manager), [`src/presentation/ui_component.py`](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/presentation/ui_component.py) (Kiosk UI), [`src/interfaces.py`](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/interfaces.py) (Component Contracts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Presentation"]
  node_ui["Kiosk UI<br/>[ui_component.py]"]
end

subgraph group_business["Business Logic"]
  node_order["Order Manager<br/>[order_manager.py]"]
  node_payment["Payment Service<br/>[payment_service.py]"]
  node_receipt["Receipt Printer<br/>[receipt_printer.py]"]
  node_contracts["Component Contracts<br/>[interfaces.py]"]
end

subgraph group_persistence["Local Persistence"]
  node_database[("SQLite Data")]
end

subgraph group_assembly["Runtime Assembly"]
  node_main["Kiosk Bootstrap<br/>[main.py]"]
end

node_customer(("Customer"))

node_customer -->|"selects drink"| node_ui
node_ui -->|"requests order"| node_order
node_main -->|"reads token"| node_payment
node_main -->|"runs demo"| node_ui
node_order -->|"reads price; stores order"| node_database
node_order -->|"processes payment"| node_payment
node_order -->|"prints receipt"| node_receipt
node_main -->|"assembles"| node_database
node_main -->|"assembles"| node_order
node_main -->|"assembles"| node_receipt
node_main -->|"assembles"| node_payment
node_main -->|"assembles"| node_ui
node_ui -->|"uses types"| node_contracts
node_order -->|"uses interfaces"| node_contracts
node_payment -->|"uses interface"| node_contracts
node_receipt -->|"uses interface"| node_contracts
node_database -->|"uses types"| node_contracts

click node_ui "https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/presentation/ui_component.py"
click node_order "https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/business/order_manager.py"
click node_payment "https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/business/payment_service.py"
click node_receipt "https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/business/receipt_printer.py"
click node_database "https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/data/database_component.py"
click node_contracts "https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/interfaces.py"
click node_main "https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/main.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_ui toneBlue
class node_order,node_payment,node_receipt,node_contracts toneAmber
class node_database toneMint
class node_main toneRose
class node_customer toneIndigo
```

## Components

### Presentation

- [Kiosk UI](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/presentation/ui_component.py): `src/presentation/ui_component.py`

### Business Logic

- [Order Manager](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/business/order_manager.py): `src/business/order_manager.py`
- [Payment Service](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/business/payment_service.py): `src/business/payment_service.py`
- [Receipt Printer](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/business/receipt_printer.py): `src/business/receipt_printer.py`
- [Component Contracts](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/interfaces.py): `src/interfaces.py`

### Local Persistence

- [SQLite Data](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/data/database_component.py): `src/data/database_component.py`

### Runtime Assembly

- [Kiosk Bootstrap](https://github.com/dheeraj00001/se-lab-3-assignment/blob/main/src/main.py): `src/main.py`

### Other components

- **Customer**

## Connections

- Customer → Kiosk UI: selects drink (evidence: `README.md`)
- Kiosk UI → Order Manager: requests order (evidence: `src/presentation/ui_component.py`)
- Kiosk Bootstrap → Payment Service: reads token (evidence: `src/main.py`)
- Kiosk Bootstrap → Kiosk UI: runs demo (evidence: `src/main.py`)
- Order Manager → SQLite Data: reads price; stores order (evidence: `src/business/order_manager.py`)
- Order Manager → Payment Service: processes payment (evidence: `src/business/order_manager.py`)
- Order Manager → Receipt Printer: prints receipt (evidence: `src/business/order_manager.py`)
- Kiosk Bootstrap → SQLite Data: assembles (evidence: `src/main.py`)
- Kiosk Bootstrap → Order Manager: assembles (evidence: `src/main.py`)
- Kiosk Bootstrap → Receipt Printer: assembles (evidence: `src/main.py`)
- Kiosk Bootstrap → Payment Service: assembles (evidence: `src/main.py`)
- Kiosk Bootstrap → Kiosk UI: assembles (evidence: `src/main.py`)
- Kiosk UI → Component Contracts: uses types (evidence: `src/presentation/ui_component.py`)
- Order Manager → Component Contracts: uses interfaces (evidence: `src/business/order_manager.py`)
- Payment Service → Component Contracts: uses interface (evidence: `src/business/payment_service.py`)
- Receipt Printer → Component Contracts: uses interface (evidence: `src/business/receipt_printer.py`)
- SQLite Data → Component Contracts: uses types (evidence: `src/data/database_component.py`)
