# slogllykop/networx-trial-reset architecture

> Architecture diagram of the GitHub repository slogllykop/networx-trial-reset, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/slogllykop/networx-trial-reset
- Repository: https://github.com/slogllykop/networx-trial-reset

## Overview

##### Project type and purpose
- This is a single‐purpose utility script written in Python, packaged with a Windows batch launcher (`run.bat`).
- Its sole function is to reset the trial period of the NetWorx bandwidth monitoring software by updating its local database file.

##### File structure
- Top‐level files only:
- `reset.py` – the Python script that implements the reset logic
- `run.bat` – a batch file that invokes `reset.py` under elevated (Administrator) privileges
- `README.md` – documentation
- No additional directories, libraries, or services are involved. No network or external API calls occur.

##### README for additional insights
- The script locates the NetWorx “trial info” database in ProgramData (e.g., `C:\ProgramData\NetWorx\…`).
- It opens/modifies that file to set the trial start date to “today.”
- Requires: Python interpreter on PATH + Administrator privileges.
- No registry changes, no internet connectivity, no external dependencies beyond Python itself.

##### Components
a. Main components
- Windows Operating System (with UAC/Admin privilege boundary)
- Batch Launcher (`run.bat`)
- Python Interpreter (runtime)
- Reset Script (`reset.py`)
- NetWorx Trial Database File (in ProgramData)
- Output/Logger (console success message)

b. Relationships and interactions
1. User (Administrator) ➔ invokes `run.bat`
2. `run.bat` ➔ starts `python reset.py`
3. `reset.py` ➔ locates & opens the NetWorx DB file on disk
4. `reset.py` ➔ modifies trial start date within the DB
5. `reset.py` ➔ writes changes back to the file
6. `reset.py` ➔ prints success message to console

c. Architectural patterns / design principles
- Procedural script, single module
- Minimal layering: launcher ➔ interpreter ➔ script ➔ file system
- No network, no inter-process communication beyond file I/O

d. Relevant technologies
- Windows Batch Scripting (`run.bat`)
- Python standard library (file I/O, date/time functions)
- Local file system (ProgramData folder)

##### Detail without overthinking
- Although it’s a small utility, capture each step: user invocation, privilege elevation, script launch, file update, and confirmation message.

## Diagram (Mermaid)

```mermaid
flowchart TD
    User["Administrator"]:::user
    WinOS["Windows OS\n(UAC Boundary)"]:::runtime

    subgraph "Runtime Execution"
        BL["Batch Launcher\n(run.bat)"]:::exec
        PI["Python Interpreter"]:::runtime
        RS["Reset Script\n(reset.py)"]:::exec
    end

    subgraph "Data Storage"
        DB["NetWorx Trial DB File"]:::storage
    end

    CO["Console Output\n(Success Message)"]:::user
    Documentation["Documentation\n(README.md)"]:::doc

    User -->|"Invoke run.bat"| BL
    BL -->|"Launch Python"| PI
    PI -->|"Execute script"| RS
    RS -->|"Open DB file"| DB
    RS -->|"Write updated date"| DB
    RS -->|"Print success"| CO
    BL -.->|"UAC Elevation"| WinOS

    click BL "https://github.com/slogllykop/networx-trial-reset/blob/main/run.bat"
    click RS "https://github.com/slogllykop/networx-trial-reset/blob/main/reset.py"
    click Documentation "https://github.com/slogllykop/networx-trial-reset/blob/main/README.md"

    classDef runtime fill:#D0E6FF,stroke:#0366d6,stroke-width:2px
    classDef exec fill:#DFFFD0,stroke:#4b8b3b,stroke-width:2px
    classDef storage fill:#FFE4B5,stroke:#d2691e,stroke-width:2px
    classDef user fill:#FFFACD,stroke:#e1ad01,stroke-width:2px
    classDef doc fill:#F0F0F0,stroke:#333333,stroke-width:1px
```
