# personaluse12122331-sketch/drvpccleaner architecture

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

- Interactive diagram: https://gitdiagram.com/personaluse12122331-sketch/drvpccleaner
- Repository: https://github.com/personaluse12122331-sketch/drvpccleaner

## Overview

DRV is a Flask-based PC cleaner. Users authenticate with Google, then scan a cleaning feature, review results, and request a clean; the app records cleaning activity for dashboard history. The README also documents ten cleaning capabilities, safety backups, SQLite user/log storage, and daily-use durability. The excerpts show portions of the Flask routes and feature logic plus the browser API calls, but omit key backend sections, so some internal links are documented rather than source-verified.

Main entry points: [`app.py`](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py) (Flask app and routes), [`static/js/main.js`](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/static/js/main.js) (Dashboard API client), [`templates/dashboard.html`](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/templates/dashboard.html) (Cleaner dashboard), [`templates/login.html`](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/templates/login.html) (Login page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_browser["Cleaner dashboard<br/>[dashboard.html]"]
  node_login_page["Login page<br/>[login.html]"]
  node_frontend["Dashboard API client<br/>[main.js]"]
  node_flask["Flask app and routes<br/>[app.py]"]
end

subgraph group_identity["Identity and accounts"]
  node_google["Google OAuth"]
  node_account["User account handling<br/>[app.py]"]
end

subgraph group_cleaning["SafeCleaning"]
  node_scan["Feature scanning<br/>[app.py]"]
  node_clean["Feature cleaning<br/>[app.py]"]
  node_safe_remove["Safe removal and backups<br/>[app.py]"]
  node_feature_set["Ten cleaner features<br/>[app.py]"]
end

subgraph group_records["Activity records"]
  node_sqlite[("SQLite users and logs<br/>[app.py]")]
  node_history["Cleaning history<br/>[app.py]"]
end

node_user(("PC owner"))

node_user -->|"opens"| node_login_page
node_login_page -.->|"requests login"| node_flask
node_flask -->|"starts OAuth"| node_google
node_google -->|"returns identity"| node_flask
node_flask -->|"saves account"| node_account
node_account -->|"updates user"| node_sqlite
node_user -->|"uses"| node_browser
node_browser -.->|"runs client"| node_frontend
node_frontend -->|"calls API"| node_flask
node_flask -.->|"routes scan"| node_scan
node_scan -.->|"scans features"| node_feature_set
node_flask -.->|"routes clean"| node_clean
node_clean -.->|"cleans features"| node_feature_set
node_clean -->|"backs up items"| node_safe_remove
node_flask -->|"serves history"| node_history
node_history -->|"reads logs"| node_sqlite
node_clean -->|"records results"| node_sqlite
node_frontend -->|"loads activity"| node_history

click node_browser "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/templates/dashboard.html"
click node_login_page "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/templates/login.html"
click node_frontend "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/static/js/main.js"
click node_flask "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py"
click node_account "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py"
click node_sqlite "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py"
click node_scan "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py"
click node_clean "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py"
click node_safe_remove "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py"
click node_feature_set "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py"
click node_history "https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/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_browser,node_login_page,node_frontend,node_flask toneBlue
class node_google,node_account toneAmber
class node_scan,node_clean,node_safe_remove,node_feature_set toneMint
class node_sqlite,node_history toneRose
class node_user toneIndigo
```

## Components

### Web interface

- [Cleaner dashboard](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/templates/dashboard.html): `templates/dashboard.html`
- [Login page](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/templates/login.html): `templates/login.html`
- [Dashboard API client](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/static/js/main.js): `static/js/main.js`
- [Flask app and routes](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py): `app.py`

### Identity and accounts

- **Google OAuth**
- [User account handling](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py): `app.py`

### SafeCleaning

- [Feature scanning](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py): `app.py`
- [Feature cleaning](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py): `app.py`
- [Safe removal and backups](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py): `app.py`
- [Ten cleaner features](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py): `app.py`

### Activity records

- [SQLite users and logs](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py): `app.py`
- [Cleaning history](https://github.com/personaluse12122331-sketch/drvpccleaner/blob/main/app.py): `app.py`

### Other components

- **PC owner**

## Connections

- PC owner → Login page: opens (evidence: `README.md`)
- Login page → Flask app and routes: requests login
- Flask app and routes → Google OAuth: starts OAuth (evidence: `README.md`)
- Google OAuth → Flask app and routes: returns identity (evidence: `app.py`)
- Flask app and routes → User account handling: saves account (evidence: `app.py`)
- User account handling → SQLite users and logs: updates user (evidence: `app.py`)
- PC owner → Cleaner dashboard: uses (evidence: `README.md`)
- Cleaner dashboard → Dashboard API client: runs client
- Dashboard API client → Flask app and routes: calls API (evidence: `static/js/main.js`)
- Flask app and routes → Feature scanning: routes scan (evidence: `app.py`)
- Feature scanning → Ten cleaner features: scans features (evidence: `app.py`)
- Flask app and routes → Feature cleaning: routes clean (evidence: `app.py`)
- Feature cleaning → Ten cleaner features: cleans features (evidence: `app.py`)
- Feature cleaning → Safe removal and backups: backs up items (evidence: `README.md`)
- Flask app and routes → Cleaning history: serves history (evidence: `app.py`)
- Cleaning history → SQLite users and logs: reads logs (evidence: `README.md`)
- Feature cleaning → SQLite users and logs: records results (evidence: `README.md`)
- Dashboard API client → Cleaning history: loads activity (evidence: `static/js/main.js`)
