# bruno1991cp-prog/projetoecoconectaferraz architecture

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

- Interactive diagram: https://gitdiagram.com/bruno1991cp-prog/projetoecoconectaferraz
- Repository: https://github.com/bruno1991cp-prog/projetoecoconectaferraz

## Overview

Eco-Conecta Ferraz is a municipal reverse-logistics and community-enforcement platform, but the supplied implementation is a browser-only prototype: its management data and tokens are not persisted, and login and recovery are not connected to services. The README describes a broader citizen-to-collection workflow and collector and municipal capabilities; those documented subsystems are included, but their runtime implementation is not present in the tree. Edges for those capabilities rely on README statements; links between page scripts and HTML are omitted because the HTML excerpts were not supplied.

Main entry points: [`JS/mensagens.js`](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/mensagens.js) (Toast and dialogs), [`README.md`](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/README.md) (Collector PWA), [`JS/gestora-coletores.js`](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/gestora-coletores.js) (Collector management), [`JS/gestora-baixa-carga.js`](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/gestora-baixa-carga.js) (Load closeout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public access"]
  node_registration["Profile registration<br/>[cadastro.js]"]
  node_login["Login demo<br/>[login.js]"]
  node_recovery["Password recovery"]
  node_citizen_home["Home interactions<br/>[index.js]"]
  node_whatsapp["WhatsApp requests<br/>[README.md]"]
end

subgraph group_field["Collection operations"]
  node_collector_app["Collector PWA<br/>[README.md]"]
  node_route_planning["Optimized routes<br/>[README.md]"]
  node_destination_proof["Destination proof<br/>[README.md]"]
end

subgraph group_admin["Municipal management"]
  node_team_management["Collector management"]
  node_load_tracking["Load closeout"]
  node_token_generation["Load tokens<br/>[gestora-token.js]"]
  node_transparency["Transparency records<br/>[transparencia.js]"]
end

subgraph group_shared["Shared interface"]
  node_notices["Toast and dialogs<br/>[mensagens.js]"]
end

node_citizen(("Citizen"))
node_collector(("Collector"))
node_municipality(("Municipality"))

node_citizen -->|"requests collection"| node_whatsapp
node_citizen -->|"reports dumping"| node_whatsapp
node_whatsapp -->|"organizes collection"| node_collector_app
node_collector -->|"views requests"| node_collector_app
node_collector_app -->|"offers routes"| node_route_planning
node_collector_app -->|"records delivery"| node_destination_proof
node_municipality -->|"manages teams"| node_team_management
node_municipality -->|"monitors collections"| node_load_tracking
node_municipality -.->|"reviews records"| node_transparency
node_registration -.->|"shows notices"| node_notices
node_login -->|"shows notices"| node_notices
node_recovery -->|"shows notices"| node_notices
node_load_tracking -->|"shows dialogs"| node_notices
node_team_management -->|"shows notices"| node_notices
node_token_generation -->|"shows notices"| node_notices

click node_registration "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/cadastro.js"
click node_login "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/login.js"
click node_recovery "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/recuperacao-senha.js"
click node_citizen_home "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/index.js"
click node_whatsapp "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/README.md"
click node_collector_app "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/README.md"
click node_route_planning "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/README.md"
click node_destination_proof "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/README.md"
click node_team_management "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/gestora-coletores.js"
click node_load_tracking "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/gestora-baixa-carga.js"
click node_token_generation "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/gestora-token.js"
click node_transparency "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/transparencia.js"
click node_notices "https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/mensagens.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_registration,node_login,node_recovery,node_citizen_home,node_whatsapp toneBlue
class node_collector_app,node_route_planning,node_destination_proof toneAmber
class node_team_management,node_load_tracking,node_token_generation,node_transparency toneMint
class node_notices toneRose
class node_citizen,node_collector,node_municipality toneIndigo
```

## Components

### Public access

- [Profile registration](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/cadastro.js): `JS/cadastro.js`
- [Login demo](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/login.js): `JS/login.js`
- [Password recovery](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/recuperacao-senha.js): `JS/recuperacao-senha.js`
- [Home interactions](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/index.js): `JS/index.js`
- [WhatsApp requests](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/README.md): `README.md`

### Collection operations

- [Collector PWA](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/README.md): `README.md`
- [Optimized routes](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/README.md): `README.md`
- [Destination proof](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/README.md): `README.md`

### Municipal management

- [Collector management](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/gestora-coletores.js): `JS/gestora-coletores.js`
- [Load closeout](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/gestora-baixa-carga.js): `JS/gestora-baixa-carga.js`
- [Load tokens](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/gestora-token.js): `JS/gestora-token.js`
- [Transparency records](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/transparencia.js): `JS/transparencia.js`

### Shared interface

- [Toast and dialogs](https://github.com/bruno1991cp-prog/projetoecoconectaferraz/blob/main/JS/mensagens.js): `JS/mensagens.js`

### Other components

- **Citizen**
- **Collector**
- **Municipality**

## Connections

- Citizen → WhatsApp requests: requests collection (evidence: `README.md`)
- Citizen → WhatsApp requests: reports dumping (evidence: `README.md`)
- WhatsApp requests → Collector PWA: organizes collection (evidence: `README.md`)
- Collector → Collector PWA: views requests (evidence: `README.md`)
- Collector PWA → Optimized routes: offers routes (evidence: `README.md`)
- Collector PWA → Destination proof: records delivery (evidence: `README.md`)
- Municipality → Collector management: manages teams (evidence: `README.md`)
- Municipality → Load closeout: monitors collections (evidence: `README.md`)
- Municipality → Transparency records: reviews records
- Profile registration → Toast and dialogs: shows notices
- Login demo → Toast and dialogs: shows notices (evidence: `JS/login.js`)
- Password recovery → Toast and dialogs: shows notices (evidence: `JS/recuperacao-senha.js`)
- Load closeout → Toast and dialogs: shows dialogs (evidence: `JS/gestora-baixa-carga.js`)
- Collector management → Toast and dialogs: shows notices (evidence: `JS/gestora-coletores.js`)
- Load tokens → Toast and dialogs: shows notices (evidence: `JS/gestora-token.js`)
