# artbombs/app-mananciais-sp-zeppos architecture

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

- Interactive diagram: https://gitdiagram.com/artbombs/app-mananciais-sp-zeppos
- Repository: https://github.com/artbombs/app-mananciais-sp-zeppos

## Overview

Mananciais SP is a Zepp OS watch app for browsing public reservoir conditions across eight Sabesp systems. The user opens the watch app to see cached data, then requests an update through the phone side service, which fetches Sabesp data and packages it for the watch. The watch presents volume, rain, levels and flows, reservoirs, a 30-day trend, and system diagrams, with Portuguese/English labels; a separate About screen provides support QR art. Edges follow README statements or shown imports and calls; some UI internals and the watch-to-phone transport are documented but not implemented in the sampled page excerpt.

Main entry points: [`page/index/index.page.js`](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/index/index.page.js) (Reservoir dashboard), [`app-side/index.js`](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/app-side/index.js) (Phone side service), [`shared/sabesp.js`](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/shared/sabesp.js) (Payload builder), [`page/about/index.page.js`](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/about/index.page.js) (About screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_watch["Watch experience"]
  node_main["Reservoir dashboard<br/>[index.page.js]"]
  node_diagram["System diagrams<br/>[diagrama.js]"]
  node_watchcache[("Watch cache<br/>[index.page.js]")]
  node_watchdata["Watch display<br/>[index.page.js]"]
end

subgraph group_data["Data retrieval"]
  node_side["Phone side service<br/>[index.js]"]
  node_sabesp["Sabesp API"]
  node_phonecache[("Phone cache<br/>[index.js]")]
end

subgraph group_domain["Payload modeling"]
  node_payload["Payload builder<br/>[sabesp.js]"]
  node_systems["System catalog<br/>[sabesp.js]"]
end

subgraph group_support["About and language"]
  node_i18n["Language and labels<br/>[i18n.js]"]
  node_about["About screen<br/>[index.page.js]"]
  node_app["Zepp app lifecycle<br/>[app.js]"]
end

node_user(("Watch user"))

node_user -->|"opens and browses"| node_main
node_main -->|"reads cached data"| node_watchcache
node_main -->|"requests update"| node_side
node_side -->|"fetches public data"| node_sabesp
node_side -->|"reads stale values"| node_phonecache
node_side -->|"stores payload"| node_phonecache
node_side -->|"builds payload"| node_payload
node_payload -->|"uses catalog"| node_systems
node_main -->|"renders metrics"| node_watchdata
node_main -->|"renders diagrams"| node_diagram
node_main -->|"uses translations"| node_i18n
node_about -->|"uses translations"| node_i18n
node_main -->|"opens screen"| node_about
node_side -.->|"returns payload"| node_main
node_main -.->|"saves payload"| node_watchcache

click node_main "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/index/index.page.js"
click node_diagram "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/index/diagrama.js"
click node_watchcache "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/index/index.page.js"
click node_watchdata "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/index/index.page.js"
click node_side "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/app-side/index.js"
click node_phonecache "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/app-side/index.js"
click node_payload "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/shared/sabesp.js"
click node_systems "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/shared/sabesp.js"
click node_i18n "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/i18n.js"
click node_about "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/about/index.page.js"
click node_app "https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/app.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_main,node_diagram,node_watchcache,node_watchdata,node_user toneBlue
class node_side,node_sabesp,node_phonecache toneAmber
class node_payload,node_systems toneMint
class node_i18n,node_about,node_app toneRose
```

## Components

### Watch experience

- [Reservoir dashboard](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/index/index.page.js): `page/index/index.page.js`
- [System diagrams](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/index/diagrama.js): `page/index/diagrama.js`
- [Watch cache](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/index/index.page.js): `page/index/index.page.js`
- [Watch display](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/index/index.page.js): `page/index/index.page.js`

### Data retrieval

- [Phone side service](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/app-side/index.js): `app-side/index.js`
- **Sabesp API**
- [Phone cache](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/app-side/index.js): `app-side/index.js`

### Payload modeling

- [Payload builder](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/shared/sabesp.js): `shared/sabesp.js`
- [System catalog](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/shared/sabesp.js): `shared/sabesp.js`

### About and language

- [Language and labels](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/i18n.js): `page/i18n.js`
- [About screen](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/page/about/index.page.js): `page/about/index.page.js`
- [Zepp app lifecycle](https://github.com/artbombs/app-mananciais-sp-zeppos/blob/main/app.js): `app.js`

### Other components

- **Watch user**

## Connections

- Watch user → Reservoir dashboard: opens and browses (evidence: `README.md`)
- Reservoir dashboard → Watch cache: reads cached data (evidence: `README.md`)
- Reservoir dashboard → Phone side service: requests update (evidence: `README.md`)
- Phone side service → Sabesp API: fetches public data (evidence: `app-side/index.js`)
- Phone side service → Phone cache: reads stale values (evidence: `app-side/index.js`)
- Phone side service → Phone cache: stores payload (evidence: `app-side/index.js`)
- Phone side service → Payload builder: builds payload (evidence: `app-side/index.js`)
- Payload builder → System catalog: uses catalog (evidence: `shared/sabesp.js`)
- Reservoir dashboard → Watch display: renders metrics (evidence: `page/index/index.page.js`)
- Reservoir dashboard → System diagrams: renders diagrams (evidence: `page/index/index.page.js`)
- Reservoir dashboard → Language and labels: uses translations (evidence: `page/index/index.page.js`)
- About screen → Language and labels: uses translations (evidence: `page/about/index.page.js`)
- Reservoir dashboard → About screen: opens screen (evidence: `README.md`)
- Phone side service → Reservoir dashboard: returns payload
- Reservoir dashboard → Watch cache: saves payload (evidence: `page/index/index.page.js`)
