# lewisl2026/peoplesafe_device_sign-out architecture

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

- Interactive diagram: https://gitdiagram.com/lewisl2026/peoplesafe_device_sign-out
- Repository: https://github.com/lewisl2026/peoplesafe_device_sign-out

## Overview

PeopleSafe Checkout is a Tkinter desktop app for recording which device is assigned to an engineer and when it is returned. The main workflow collects team, engineer, shift, device, and condition; users sign devices back in from the activity table. The app also tracks device availability, reports faulty devices, and provides authorised maintenance actions. Its CSV log is the shared record of assignments and device status. The graph reflects the README and shown source excerpts; some event wiring and sign-in details are in omitted portions of the single source file.

Main entry points: [`src/PeopleSafe_Checkout_app.py`](https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py) (Activity table)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_checkout["Checkout workflow"]
  node_checkout_ui["Checkout form"]
  node_checkout_entry["Sign-out handling"]
end

subgraph group_records["Log and status"]
  node_status_logic["Device availability"]
  node_activity_view["Activity table"]
  node_csv_log[("Equipment CSV")]
end

subgraph group_operations["Returns and maintenance"]
  node_sign_in["Sign-in handling"]
  node_maintenance["Faulty device maintenance"]
end

node_engineer(("Engineer"))

node_engineer -->|"enters details"| node_checkout_ui
node_checkout_ui -->|"submits checkout"| node_checkout_entry
node_checkout_entry -->|"records assignment"| node_csv_log
node_activity_view -->|"loads entries"| node_csv_log
node_csv_log -->|"derives device state"| node_status_logic
node_status_logic -->|"shows availability"| node_activity_view
node_engineer -->|"selects row"| node_activity_view
node_activity_view -->|"requests sign-in"| node_sign_in
node_sign_in -.->|"updates return"| node_csv_log
node_checkout_entry -->|"reports faulty device"| node_maintenance
node_maintenance -->|"reads fault records"| node_csv_log

click node_checkout_ui "https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py"
click node_checkout_entry "https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py"
click node_status_logic "https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py"
click node_activity_view "https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py"
click node_sign_in "https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py"
click node_maintenance "https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.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_checkout_ui,node_checkout_entry toneBlue
class node_status_logic,node_activity_view,node_csv_log toneAmber
class node_sign_in,node_maintenance toneMint
class node_engineer toneIndigo
```

## Components

### Checkout workflow

- [Checkout form](https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py): `src/PeopleSafe_Checkout_app.py`
- [Sign-out handling](https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py): `src/PeopleSafe_Checkout_app.py`

### Log and status

- [Device availability](https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py): `src/PeopleSafe_Checkout_app.py`
- [Activity table](https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py): `src/PeopleSafe_Checkout_app.py`
- **Equipment CSV**

### Returns and maintenance

- [Sign-in handling](https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py): `src/PeopleSafe_Checkout_app.py`
- [Faulty device maintenance](https://github.com/lewisl2026/peoplesafe_device_sign-out/blob/main/src/PeopleSafe_Checkout_app.py): `src/PeopleSafe_Checkout_app.py`

### Other components

- **Engineer**

## Connections

- Engineer → Checkout form: enters details (evidence: `README.md`)
- Checkout form → Sign-out handling: submits checkout (evidence: `README.md`)
- Sign-out handling → Equipment CSV: records assignment (evidence: `src/PeopleSafe_Checkout_app.py`)
- Activity table → Equipment CSV: loads entries (evidence: `src/PeopleSafe_Checkout_app.py`)
- Equipment CSV → Device availability: derives device state (evidence: `src/PeopleSafe_Checkout_app.py`)
- Device availability → Activity table: shows availability (evidence: `src/PeopleSafe_Checkout_app.py`)
- Engineer → Activity table: selects row (evidence: `README.md`)
- Activity table → Sign-in handling: requests sign-in (evidence: `README.md`)
- Sign-in handling → Equipment CSV: updates return
- Sign-out handling → Faulty device maintenance: reports faulty device (evidence: `src/PeopleSafe_Checkout_app.py`)
- Faulty device maintenance → Equipment CSV: reads fault records (evidence: `src/PeopleSafe_Checkout_app.py`)
