# gustavomatoi/automa-o-python-e-gs architecture

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

- Interactive diagram: https://gitdiagram.com/gustavomatoi/automa-o-python-e-gs
- Repository: https://github.com/gustavomatoi/automa-o-python-e-gs

## Overview

This repository generates school-feedback reports from a selected CSV, uploads report tabs to Google Sheets, and includes separate Apps Script utilities for formula execution and dashboard refresh. The principal workflow runs from the desktop UI through report generation to Sheets upload. Report categories are implemented within the large reporting module; the excerpts do not establish all individual report stages or the CSVs each stage reads. The Apps Script files are standalone utilities, so their invocation relationship to the desktop app is not shown.

Main entry points: [`appscritps/atualizarDash.js`](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/atualizarDash.js) (Dashboard refresh), [`appscritps/gerarLinks.js`](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/gerarLinks.js) (Dashboard refresh copy), [`main.py`](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/main.py) (Desktop workflow), [`relatorios.py`](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/relatorios.py) (Report generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Report application"]
  node_app["Desktop workflow<br/>[main.py]"]
  node_sheets_upload["Report sheet upload<br/>[main.py]"]
end

subgraph group_reporting["Report processing"]
  node_reportgen["Report generation<br/>[relatorios.py]"]
  node_csv["Selected CSV"]
end

subgraph group_sheets["Sheets utilities"]
  node_formula_web["Formula endpoint"]
  node_formula_apply["Formula execution"]
  node_dash_refresh["Dashboard refresh<br/>[atualizarDash.js]"]
  node_dash_copy["Dashboard refresh copy<br/>[gerarLinks.js]"]
end

subgraph group_integrations["External services"]
  node_google_sheets[("Google Sheets")]
  node_drive[("Google Drive")]
  node_mail["Email service"]
end

node_user(("Report operator"))

node_user -->|"selects and starts"| node_app
node_app -->|"generates reports"| node_reportgen
node_reportgen -.->|"reads input"| node_csv
node_app -->|"uploads reports"| node_sheets_upload
node_sheets_upload -->|"writes tabs"| node_google_sheets
node_formula_web -->|"dispatches"| node_formula_apply
node_formula_apply -->|"sets formulas"| node_google_sheets
node_dash_refresh -->|"replaces dashboards"| node_google_sheets
node_dash_refresh -->|"stages spreadsheet copy"| node_drive
node_dash_refresh -->|"emails analyst"| node_mail
node_dash_copy -->|"replaces dashboards"| node_google_sheets
node_dash_copy -->|"stages spreadsheet copy"| node_drive
node_dash_copy -->|"emails analyst"| node_mail

click node_app "https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/main.py"
click node_reportgen "https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/relatorios.py"
click node_sheets_upload "https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/main.py"
click node_formula_web "https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/executarFormulas.js"
click node_formula_apply "https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/executarFormulas.js"
click node_dash_refresh "https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/atualizarDash.js"
click node_dash_copy "https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/gerarLinks.js"

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_app,node_sheets_upload toneBlue
class node_reportgen,node_csv toneAmber
class node_formula_web,node_formula_apply,node_dash_refresh,node_dash_copy toneMint
class node_google_sheets,node_drive,node_mail toneRose
class node_user toneIndigo
```

## Components

### Report application

- [Desktop workflow](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/main.py): `main.py`
- [Report sheet upload](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/main.py): `main.py`

### Report processing

- [Report generation](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/relatorios.py): `relatorios.py`
- **Selected CSV**

### Sheets utilities

- [Formula endpoint](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/executarFormulas.js): `appscritps/executarFormulas.js`
- [Formula execution](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/executarFormulas.js): `appscritps/executarFormulas.js`
- [Dashboard refresh](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/atualizarDash.js): `appscritps/atualizarDash.js`
- [Dashboard refresh copy](https://github.com/gustavomatoi/automa-o-python-e-gs/blob/master/appscritps/gerarLinks.js): `appscritps/gerarLinks.js`

### External services

- **Google Sheets**
- **Google Drive**
- **Email service**

### Other components

- **Report operator**

## Connections

- Report operator → Desktop workflow: selects and starts (evidence: `main.py`)
- Desktop workflow → Report generation: generates reports (evidence: `main.py`)
- Report generation → Selected CSV: reads input
- Desktop workflow → Report sheet upload: uploads reports (evidence: `main.py`)
- Report sheet upload → Google Sheets: writes tabs (evidence: `main.py`)
- Formula endpoint → Formula execution: dispatches (evidence: `appscritps/executarFormulas.js`)
- Formula execution → Google Sheets: sets formulas (evidence: `appscritps/executarFormulas.js`)
- Dashboard refresh → Google Sheets: replaces dashboards (evidence: `appscritps/atualizarDash.js`)
- Dashboard refresh → Google Drive: stages spreadsheet copy (evidence: `appscritps/atualizarDash.js`)
- Dashboard refresh → Email service: emails analyst (evidence: `appscritps/atualizarDash.js`)
- Dashboard refresh copy → Google Sheets: replaces dashboards (evidence: `appscritps/gerarLinks.js`)
- Dashboard refresh copy → Google Drive: stages spreadsheet copy (evidence: `appscritps/gerarLinks.js`)
- Dashboard refresh copy → Email service: emails analyst (evidence: `appscritps/gerarLinks.js`)
