# sandeepkanti/labgate architecture

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

- Interactive diagram: https://gitdiagram.com/sandeepkanti/labgate
- Repository: https://github.com/sandeepkanti/labgate

## Overview

labgate is a desktop lab-access application with user login/logout, session activity logging, USB and file-transfer monitoring, and an OS-integrity watchdog. The main workflow is a user signing in through the GUI, which starts monitoring; the GUI also presents activity and corruption reports. The excerpts show watchdog checks and database writes, but not all database configuration or the full monitor implementations, so some subsystem connections are left out.

Main entry points: [`SUKFINAL FINAL2/enhanced_lock.py`](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py) (Login GUI), [`SUKFINAL FINAL2/watchdog_monitor.py`](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/watchdog_monitor.py) (OS watchdog), [`SUKFINAL FINAL2/system_integrity.db`](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/system_integrity.db) (Integrity records), [`SUKFINAL FINAL2/login_status.db`](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/login_status.db) (Login status)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and sessions"]
  node_login_ui["Login GUI<br/>[enhanced_lock.py]"]
  node_authentication["Authentication<br/>[enhanced_lock.py]"]
  node_session_status[("Login status<br/>[login_status.db]")]
  node_students["Student data<br/>[students.csv]"]
  node_demo_store[("Demo database<br/>[students_demo.db]")]
end

subgraph group_activity["Activity monitoring"]
  node_activity_log["Activity logging<br/>[enhanced_lock.py]"]
  node_activity_store[("Activity records<br/>[activity_logs.db]")]
  node_system_monitor["System monitor<br/>[enhanced_lock.py]"]
  node_usb_monitor["USB and transfers<br/>[enhanced_lock.py]"]
end

subgraph group_integrity["OS integrity"]
  node_watchdog["OS watchdog"]
  node_file_integrity["File integrity checks"]
  node_health_boot["Health and boot checks"]
  node_integrity_store[("Integrity records")]
end

node_user(("Lab user"))

node_user -->|"enters credentials"| node_login_ui
node_login_ui -->|"authenticates"| node_authentication
node_login_ui -->|"starts monitoring"| node_system_monitor
node_login_ui -->|"starts watchdog"| node_watchdog
node_system_monitor -->|"checks devices"| node_usb_monitor
node_usb_monitor -->|"logs events"| node_activity_log
node_login_ui -->|"queries activity"| node_activity_log
node_activity_log -->|"writes records"| node_activity_store
node_watchdog -->|"checks files"| node_file_integrity
node_watchdog -->|"records metrics"| node_health_boot
node_file_integrity -->|"stores events"| node_integrity_store
node_health_boot -->|"stores checks"| node_integrity_store
node_watchdog -->|"logs watchdog events"| node_activity_log
node_login_ui -->|"updates session"| node_session_status

click node_login_ui "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py"
click node_authentication "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py"
click node_session_status "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/login_status.db"
click node_activity_log "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py"
click node_activity_store "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/activity_logs.db"
click node_system_monitor "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py"
click node_usb_monitor "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py"
click node_watchdog "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/watchdog_monitor.py"
click node_file_integrity "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/watchdog_monitor.py"
click node_health_boot "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/watchdog_monitor.py"
click node_integrity_store "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/system_integrity.db"
click node_students "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/students.csv"
click node_demo_store "https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/students_demo.db"

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_login_ui,node_authentication,node_session_status,node_students,node_demo_store,node_user toneBlue
class node_activity_log,node_activity_store,node_system_monitor,node_usb_monitor toneAmber
class node_watchdog,node_file_integrity,node_health_boot,node_integrity_store toneMint
```

## Components

### Access and sessions

- [Login GUI](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py): `SUKFINAL FINAL2/enhanced_lock.py`
- [Authentication](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py): `SUKFINAL FINAL2/enhanced_lock.py`
- [Login status](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/login_status.db): `SUKFINAL FINAL2/login_status.db`
- [Student data](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/students.csv): `SUKFINAL FINAL2/students.csv`
- [Demo database](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/students_demo.db): `SUKFINAL FINAL2/students_demo.db`

### Activity monitoring

- [Activity logging](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py): `SUKFINAL FINAL2/enhanced_lock.py`
- [Activity records](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/activity_logs.db): `SUKFINAL FINAL2/activity_logs.db`
- [System monitor](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py): `SUKFINAL FINAL2/enhanced_lock.py`
- [USB and transfers](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/enhanced_lock.py): `SUKFINAL FINAL2/enhanced_lock.py`

### OS integrity

- [OS watchdog](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/watchdog_monitor.py): `SUKFINAL FINAL2/watchdog_monitor.py`
- [File integrity checks](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/watchdog_monitor.py): `SUKFINAL FINAL2/watchdog_monitor.py`
- [Health and boot checks](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/watchdog_monitor.py): `SUKFINAL FINAL2/watchdog_monitor.py`
- [Integrity records](https://github.com/sandeepkanti/labgate/blob/main/SUKFINAL%20FINAL2/system_integrity.db): `SUKFINAL FINAL2/system_integrity.db`

### Other components

- **Lab user**

## Connections

- Lab user → Login GUI: enters credentials (evidence: `SUKFINAL FINAL2/enhanced_lock.py`)
- Login GUI → Authentication: authenticates (evidence: `SUKFINAL FINAL2/enhanced_lock.py`)
- Login GUI → System monitor: starts monitoring (evidence: `SUKFINAL FINAL2/enhanced_lock.py`)
- Login GUI → OS watchdog: starts watchdog (evidence: `SUKFINAL FINAL2/enhanced_lock.py`)
- System monitor → USB and transfers: checks devices (evidence: `SUKFINAL FINAL2/enhanced_lock.py`)
- USB and transfers → Activity logging: logs events (evidence: `SUKFINAL FINAL2/enhanced_lock.py`)
- Login GUI → Activity logging: queries activity (evidence: `SUKFINAL FINAL2/enhanced_lock.py`)
- Activity logging → Activity records: writes records (evidence: `SUKFINAL FINAL2/enhanced_lock.py`)
- OS watchdog → File integrity checks: checks files (evidence: `SUKFINAL FINAL2/watchdog_monitor.py`)
- OS watchdog → Health and boot checks: records metrics (evidence: `SUKFINAL FINAL2/watchdog_monitor.py`)
- File integrity checks → Integrity records: stores events (evidence: `SUKFINAL FINAL2/watchdog_monitor.py`)
- Health and boot checks → Integrity records: stores checks (evidence: `SUKFINAL FINAL2/watchdog_monitor.py`)
- OS watchdog → Activity logging: logs watchdog events (evidence: `SUKFINAL FINAL2/watchdog_monitor.py`)
- Login GUI → Login status: updates session (evidence: `SUKFINAL FINAL2/enhanced_lock.py`)
