# gowtham1103/consumption architecture

> Architecture diagram of the GitHub repository gowtham1103/consumption, 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/gowtham1103/consumption
- Repository: https://github.com/gowtham1103/consumption

## Overview

GoWatr is a React water-consumption management app. Users sign in, choose a property, inspect meter status and consumption totals, open per-door history, and generate or download invoices. The route component enforces client-side authentication and selects the property, detail, and invoice screens. Fetch components retrieve data for several screens and show a shared loading view while waiting. Source excerpts show some route and component relationships, but not every data-fetching implementation or integration, so those links are omitted where evidence is unavailable.

Main entry points: [`src/App.jsx`](https://github.com/gowtham1103/consumption/blob/main/src/App.jsx) (Routes and auth), [`src/components/morecomponent/FetchMore.jsx`](https://github.com/gowtham1103/consumption/blob/main/src/components/morecomponent/FetchMore.jsx) (Meter history data), [`src/components/plutus/FetchPlutus.jsx`](https://github.com/gowtham1103/consumption/blob/main/src/components/plutus/FetchPlutus.jsx) (Plutus data), [`src/components/Invoice/FetchingData.jsx`](https://github.com/gowtham1103/consumption/blob/main/src/components/Invoice/FetchingData.jsx) (Invoice data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and routing"]
  node_app["Routes and auth<br/>[App.jsx]"]
  node_loginlogic["Login logic<br/>[LoginLogic.jsx]"]
  node_loginpage["Login screen<br/>[LoginPage.jsx]"]
  node_loading["Loading screen<br/>[LoadingPage.jsx]"]
end

subgraph group_property["Property selection"]
  node_propertyfetch["Property data<br/>[ApiLit.jsx]"]
  node_propertychoice["Property chooser<br/>[Page2.jsx]"]
end

subgraph group_consumption["Consumption views"]
  node_cloudfetch["Cloud Graze data<br/>[CloudGraze.jsx]"]
  node_cloudtable["Cloud Graze meters<br/>[TableData.jsx]"]
  node_plutusfetch["Plutus data<br/>[FetchPlutus.jsx]"]
  node_plutustable["Plutus meters<br/>[PlutusTable.jsx]"]
  node_morefetch["Meter history data<br/>[FetchMore.jsx]"]
  node_moreview["Meter history<br/>[More.jsx]"]
end

subgraph group_billing["Invoice flow"]
  node_invoicefetch["Invoice data<br/>[FetchingData.jsx]"]
  node_invoice["Cloud Graze invoice<br/>[Invoice.jsx]"]
  node_invoice2fetch["Invoice 2 data<br/>[FetchingData2.jsx]"]
  node_invoice2["Plutus invoice<br/>[Invoic2.jsx]"]
  node_download["Invoice download"]
end

node_user(("Property user"))
node_plutusapi{{"Plutus data service"}}
node_historyapi{{"Meter detail service"}}

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_loginlogic
node_app -->|"routes to"| node_propertyfetch
node_app -->|"routes to"| node_cloudfetch
node_app -->|"routes to"| node_plutusfetch
node_app -->|"routes to"| node_morefetch
node_app -->|"routes to"| node_invoicefetch
node_app -->|"routes to"| node_invoice2fetch
node_app -->|"routes to"| node_download
node_loginlogic -->|"renders"| node_loginpage
node_propertyfetch -->|"renders"| node_propertychoice
node_propertychoice -->|"navigates to"| node_cloudfetch
node_propertychoice -->|"navigates to"| node_plutusfetch
node_cloudfetch -->|"renders"| node_cloudtable
node_plutusfetch -->|"requests"| node_plutusapi
node_plutusfetch -->|"renders"| node_plutustable
node_morefetch -->|"requests"| node_historyapi
node_morefetch -->|"renders"| node_moreview
node_invoicefetch -->|"renders"| node_invoice
node_invoice2fetch -.->|"renders"| node_invoice2
node_invoice -->|"passes invoice data"| node_download
node_invoice2 -->|"passes invoice data"| node_download
node_cloudtable -->|"opens invoice"| node_invoicefetch
node_cloudtable -->|"opens history"| node_morefetch
node_plutustable -->|"opens invoice"| node_invoice2fetch
node_plutustable -->|"opens history"| node_morefetch
node_morefetch -->|"renders while waiting"| node_loading
node_plutusfetch -->|"renders while waiting"| node_loading
node_invoicefetch -->|"renders while waiting"| node_loading

click node_app "https://github.com/gowtham1103/consumption/blob/main/src/App.jsx"
click node_loginlogic "https://github.com/gowtham1103/consumption/blob/main/src/components/loginpage/LoginLogic.jsx"
click node_loginpage "https://github.com/gowtham1103/consumption/blob/main/src/components/loginpage/LoginPage.jsx"
click node_propertyfetch "https://github.com/gowtham1103/consumption/blob/main/src/components/property/ApiLit.jsx"
click node_propertychoice "https://github.com/gowtham1103/consumption/blob/main/src/components/property/Page2.jsx"
click node_cloudfetch "https://github.com/gowtham1103/consumption/blob/main/src/components/cloudGlaze/CloudGraze.jsx"
click node_cloudtable "https://github.com/gowtham1103/consumption/blob/main/src/components/cloudGlaze/TableData.jsx"
click node_plutusfetch "https://github.com/gowtham1103/consumption/blob/main/src/components/plutus/FetchPlutus.jsx"
click node_plutustable "https://github.com/gowtham1103/consumption/blob/main/src/components/plutus/PlutusTable.jsx"
click node_morefetch "https://github.com/gowtham1103/consumption/blob/main/src/components/morecomponent/FetchMore.jsx"
click node_moreview "https://github.com/gowtham1103/consumption/blob/main/src/components/morecomponent/More.jsx"
click node_invoicefetch "https://github.com/gowtham1103/consumption/blob/main/src/components/Invoice/FetchingData.jsx"
click node_invoice "https://github.com/gowtham1103/consumption/blob/main/src/components/Invoice/Invoice.jsx"
click node_invoice2fetch "https://github.com/gowtham1103/consumption/blob/main/src/components/cloudGlaze/FetchingData2.jsx"
click node_invoice2 "https://github.com/gowtham1103/consumption/blob/main/src/components/Invoice/Invoic2.jsx"
click node_download "https://github.com/gowtham1103/consumption/blob/main/src/components/Invoice/DownloadInvoice.jsx"
click node_loading "https://github.com/gowtham1103/consumption/blob/main/src/components/loading/LoadingPage.jsx"

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_loginlogic,node_loginpage,node_loading,node_user toneBlue
class node_propertyfetch,node_propertychoice toneAmber
class node_cloudfetch,node_cloudtable,node_plutusfetch,node_plutustable,node_morefetch,node_moreview toneMint
class node_invoicefetch,node_invoice,node_invoice2fetch,node_invoice2,node_download toneRose
class node_plutusapi,node_historyapi toneIndigo
```

## Components

### Access and routing

- [Routes and auth](https://github.com/gowtham1103/consumption/blob/main/src/App.jsx): `src/App.jsx`
- [Login logic](https://github.com/gowtham1103/consumption/blob/main/src/components/loginpage/LoginLogic.jsx): `src/components/loginpage/LoginLogic.jsx`
- [Login screen](https://github.com/gowtham1103/consumption/blob/main/src/components/loginpage/LoginPage.jsx): `src/components/loginpage/LoginPage.jsx`
- [Loading screen](https://github.com/gowtham1103/consumption/blob/main/src/components/loading/LoadingPage.jsx): `src/components/loading/LoadingPage.jsx`

### Property selection

- [Property data](https://github.com/gowtham1103/consumption/blob/main/src/components/property/ApiLit.jsx): `src/components/property/ApiLit.jsx`
- [Property chooser](https://github.com/gowtham1103/consumption/blob/main/src/components/property/Page2.jsx): `src/components/property/Page2.jsx`

### Consumption views

- [Cloud Graze data](https://github.com/gowtham1103/consumption/blob/main/src/components/cloudGlaze/CloudGraze.jsx): `src/components/cloudGlaze/CloudGraze.jsx`
- [Cloud Graze meters](https://github.com/gowtham1103/consumption/blob/main/src/components/cloudGlaze/TableData.jsx): `src/components/cloudGlaze/TableData.jsx`
- [Plutus data](https://github.com/gowtham1103/consumption/blob/main/src/components/plutus/FetchPlutus.jsx): `src/components/plutus/FetchPlutus.jsx`
- [Plutus meters](https://github.com/gowtham1103/consumption/blob/main/src/components/plutus/PlutusTable.jsx): `src/components/plutus/PlutusTable.jsx`
- [Meter history data](https://github.com/gowtham1103/consumption/blob/main/src/components/morecomponent/FetchMore.jsx): `src/components/morecomponent/FetchMore.jsx`
- [Meter history](https://github.com/gowtham1103/consumption/blob/main/src/components/morecomponent/More.jsx): `src/components/morecomponent/More.jsx`

### Invoice flow

- [Invoice data](https://github.com/gowtham1103/consumption/blob/main/src/components/Invoice/FetchingData.jsx): `src/components/Invoice/FetchingData.jsx`
- [Cloud Graze invoice](https://github.com/gowtham1103/consumption/blob/main/src/components/Invoice/Invoice.jsx): `src/components/Invoice/Invoice.jsx`
- [Invoice 2 data](https://github.com/gowtham1103/consumption/blob/main/src/components/cloudGlaze/FetchingData2.jsx): `src/components/cloudGlaze/FetchingData2.jsx`
- [Plutus invoice](https://github.com/gowtham1103/consumption/blob/main/src/components/Invoice/Invoic2.jsx): `src/components/Invoice/Invoic2.jsx`
- [Invoice download](https://github.com/gowtham1103/consumption/blob/main/src/components/Invoice/DownloadInvoice.jsx): `src/components/Invoice/DownloadInvoice.jsx`

### Other components

- **Property user**
- **Plutus data service**
- **Meter detail service**

## Connections

- Property user → Routes and auth: uses
- Routes and auth → Login logic: routes to (evidence: `src/App.jsx`)
- Routes and auth → Property data: routes to (evidence: `src/App.jsx`)
- Routes and auth → Cloud Graze data: routes to (evidence: `src/App.jsx`)
- Routes and auth → Plutus data: routes to (evidence: `src/App.jsx`)
- Routes and auth → Meter history data: routes to (evidence: `src/App.jsx`)
- Routes and auth → Invoice data: routes to (evidence: `src/App.jsx`)
- Routes and auth → Invoice 2 data: routes to (evidence: `src/App.jsx`)
- Routes and auth → Invoice download: routes to (evidence: `src/App.jsx`)
- Login logic → Login screen: renders (evidence: `src/components/loginpage/LoginLogic.jsx`)
- Property data → Property chooser: renders (evidence: `src/components/property/ApiLit.jsx`)
- Property chooser → Cloud Graze data: navigates to (evidence: `src/components/property/Page2.jsx`)
- Property chooser → Plutus data: navigates to (evidence: `src/components/property/Page2.jsx`)
- Cloud Graze data → Cloud Graze meters: renders (evidence: `src/components/cloudGlaze/CloudGraze.jsx`)
- Plutus data → Plutus data service: requests (evidence: `src/components/plutus/FetchPlutus.jsx`)
- Plutus data → Plutus meters: renders (evidence: `src/components/plutus/FetchPlutus.jsx`)
- Meter history data → Meter detail service: requests (evidence: `src/components/morecomponent/FetchMore.jsx`)
- Meter history data → Meter history: renders (evidence: `src/components/morecomponent/FetchMore.jsx`)
- Invoice data → Cloud Graze invoice: renders (evidence: `src/components/Invoice/FetchingData.jsx`)
- Invoice 2 data → Plutus invoice: renders (evidence: `src/components/cloudGlaze/FetchingData2.jsx`)
- Cloud Graze invoice → Invoice download: passes invoice data (evidence: `src/components/Invoice/Invoice.jsx`)
- Plutus invoice → Invoice download: passes invoice data (evidence: `src/components/Invoice/Invoic2.jsx`)
- Cloud Graze meters → Invoice data: opens invoice (evidence: `src/components/cloudGlaze/TableData.jsx`)
- Cloud Graze meters → Meter history data: opens history (evidence: `src/components/cloudGlaze/TableData.jsx`)
- Plutus meters → Invoice 2 data: opens invoice (evidence: `src/components/plutus/PlutusTable.jsx`)
- Plutus meters → Meter history data: opens history (evidence: `src/components/plutus/PlutusTable.jsx`)
- Meter history data → Loading screen: renders while waiting (evidence: `src/components/morecomponent/FetchMore.jsx`)
- Plutus data → Loading screen: renders while waiting (evidence: `src/components/plutus/FetchPlutus.jsx`)
- Invoice data → Loading screen: renders while waiting (evidence: `src/components/Invoice/FetchingData.jsx`)
