Initial commit: C2LInspecz Automated Diagnostic Tool

This commit is contained in:
Zin Bo Thit
2026-02-09 13:38:21 +06:30
commit 59ddfdd094
6 changed files with 4765 additions and 0 deletions

50
C2LInspecz.md Normal file
View File

@@ -0,0 +1,50 @@
# **PRD Summary: C2LInspecz Diagnostic Tool**
## **1\. Project Overview**
**C2LInspecz** is the official diagnostic and health-monitoring utility by **Code2Lab**. It is a lightweight, high-performance Rust binary designed to identify, troubleshoot, and resolve issues within the POS ecosystem (Cashier Station, Local Server, Networking, and Peripherals).
## **2\. Core Philosophy: "Resolve Before You Spend"**
C2LInspecz acts as a financial and operational buffer. Its primary goal is to guide users through free self-repairs, only permitting a **billable onsite support ticket** once internal diagnostics have been exhausted.
## **3\. Technical Implementation (Rust Stack)**
* **Architecture:** Statically linked Rust binary (zero-dependency deployment).
* **Execution:** Async scanning via `tokio` for near-instant results.
* **UI:** `egui` (Immediate-mode GUI) for a responsive, low-latency interface on all hardware types.
## **4\. Key Functional Modules**
### **A. System Integrity Scan**
* **Health Check:** Monitors Local Server disk I/O, RAM pressure, and database service availability.
* **Network Audit:** Validates internal LAN routes (Cashier $\\leftrightarrow$ Server) and external WAN connectivity to Code2Lab APIs.
### **B. The "Spooler Shield" (Printer Fix)**
* **Detection:** Identifies "Stuck" print jobs that freeze the cashier UI.
* **Automated Fix:** A Rust-driven system command to force-stop the spooler, wipe the PRINTERS cache, and re-initialize the hardware.
### **C. The Billable Escalation Gate**
* **The "Onsite" Lock:** The ticket request button remains disabled until a full system scan is performed.
* **Monetary Consent:** A mandatory modal informs the user of the service fee associated with onsite calls.
* **Log Packaging:** Upon user confirmation, C2LInspecz bundles all system logs and scan results into a JSON payload for the Code2Lab Dev Team.
## **5\. User Workflow**
| Stage | Action | Result |
| :---- | :---- | :---- |
| **1\. Inspect** | User clicks "Run C2LInspecz Scan" | System identifies a network blockage to the Kitchen Printer. |
| **2\. Self-Fix** | User follows the visual "Guide" | User checks the LAN cable as instructed by the UI. |
| **3\. Utility** | User triggers "Clear Print Queue" | Tool purges stuck jobs; printer resumes. **(Cost Saved)** |
| **4\. Escalate** | User clicks "Request Onsite" | UI warns of fees \-\> User agrees \-\>Ticket \# generated. |
## **6\. Success Metrics**
* **Deflection Rate:** Percentage of users who resolve issues without opening a ticket.
* **Technician Readiness:** Developers receive 100% accurate data, reducing onsite repair time by half.
* **Uptime:** Minimal POS downtime due to the "Spooler Shield" automated fixes.