# renancarlins/web-1 architecture

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

- Interactive diagram: https://gitdiagram.com/renancarlins/web-1
- Repository: https://github.com/renancarlins/web-1

## Overview

Kbona is a browser-based store-management and shopping app with local persistence and no backend. The main workflow is managing products and customers, assembling a cart, finalizing a sale, and viewing sales and dashboard totals. The sampled app.js shows these flows and the localStorage access; README capabilities such as search, filters, sorting, validation, combos, and installment simulation are documented but not verified in the sampled source, so their connections are omitted.

Main entry points: [`app.js`](https://github.com/renancarlins/web-1/blob/main/app.js) (App runtime), [`carrinho.html`](https://github.com/renancarlins/web-1/blob/main/carrinho.html) (Cart page), [`index.html`](https://github.com/renancarlins/web-1/blob/main/index.html) (Dashboard), [`produtos.html`](https://github.com/renancarlins/web-1/blob/main/produtos.html) (Products page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Page interfaces"]
  node_dashboard["Dashboard<br/>[index.html]"]
  node_product_page["Products page<br/>[produtos.html]"]
  node_customer_page["Customers page<br/>[clientes.html]"]
  node_cart_page["Cart page<br/>[carrinho.html]"]
  node_sales_page["Sales page<br/>[vendas.html]"]
end

subgraph group_commerce["Store workflows"]
  node_app["App runtime<br/>[app.js]"]
  node_product_crud["Product records<br/>[app.js]"]
  node_customer_crud["Customer records<br/>[app.js]"]
  node_cart["Shopping cart<br/>[app.js]"]
  node_checkout["Sale finalization<br/>[app.js]"]
  node_sales_history["Sales history<br/>[app.js]"]
  node_dashboard_metrics["Dashboard metrics<br/>[app.js]"]
  node_theme["Theme toggle<br/>[app.js]"]
end

subgraph group_persistence["Local persistence"]
  node_local_storage[("localStorage")]
end

node_shopper(("Store user"))

node_shopper -->|"opens"| node_dashboard
node_shopper -->|"manages"| node_product_page
node_shopper -->|"manages"| node_customer_page
node_shopper -->|"shops"| node_cart_page
node_shopper -->|"reviews"| node_sales_page
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_product_page
node_app -->|"renders"| node_customer_page
node_app -->|"renders"| node_cart_page
node_app -->|"renders"| node_sales_page
node_app -->|"reads and writes"| node_local_storage
node_dashboard -->|"shows"| node_dashboard_metrics
node_product_page -->|"manages"| node_product_crud
node_customer_page -->|"manages"| node_customer_crud
node_cart_page -->|"manages"| node_cart
node_cart_page -->|"finalizes"| node_checkout
node_sales_page -->|"displays"| node_sales_history
node_checkout -->|"reads and clears"| node_cart
node_checkout -->|"reads products"| node_product_crud
node_checkout -->|"reads customer"| node_customer_crud
node_checkout -->|"records sale"| node_sales_history
node_dashboard_metrics -->|"reads totals"| node_sales_history
node_dashboard_metrics -->|"counts customers"| node_customer_crud
node_dashboard_metrics -->|"sums stock"| node_product_crud
node_shopper -->|"toggles"| node_theme

click node_dashboard "https://github.com/renancarlins/web-1/blob/main/index.html"
click node_product_page "https://github.com/renancarlins/web-1/blob/main/produtos.html"
click node_customer_page "https://github.com/renancarlins/web-1/blob/main/clientes.html"
click node_cart_page "https://github.com/renancarlins/web-1/blob/main/carrinho.html"
click node_sales_page "https://github.com/renancarlins/web-1/blob/main/vendas.html"
click node_app "https://github.com/renancarlins/web-1/blob/main/app.js"
click node_product_crud "https://github.com/renancarlins/web-1/blob/main/app.js"
click node_customer_crud "https://github.com/renancarlins/web-1/blob/main/app.js"
click node_cart "https://github.com/renancarlins/web-1/blob/main/app.js"
click node_checkout "https://github.com/renancarlins/web-1/blob/main/app.js"
click node_sales_history "https://github.com/renancarlins/web-1/blob/main/app.js"
click node_dashboard_metrics "https://github.com/renancarlins/web-1/blob/main/app.js"
click node_theme "https://github.com/renancarlins/web-1/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_dashboard,node_product_page,node_customer_page,node_cart_page,node_sales_page,node_shopper toneBlue
class node_app,node_product_crud,node_customer_crud,node_cart,node_checkout,node_sales_history,node_dashboard_metrics,node_theme toneAmber
class node_local_storage toneMint
```

## Components

### Page interfaces

- [Dashboard](https://github.com/renancarlins/web-1/blob/main/index.html): `index.html`
- [Products page](https://github.com/renancarlins/web-1/blob/main/produtos.html): `produtos.html`
- [Customers page](https://github.com/renancarlins/web-1/blob/main/clientes.html): `clientes.html`
- [Cart page](https://github.com/renancarlins/web-1/blob/main/carrinho.html): `carrinho.html`
- [Sales page](https://github.com/renancarlins/web-1/blob/main/vendas.html): `vendas.html`

### Store workflows

- [App runtime](https://github.com/renancarlins/web-1/blob/main/app.js): `app.js`
- [Product records](https://github.com/renancarlins/web-1/blob/main/app.js): `app.js`
- [Customer records](https://github.com/renancarlins/web-1/blob/main/app.js): `app.js`
- [Shopping cart](https://github.com/renancarlins/web-1/blob/main/app.js): `app.js`
- [Sale finalization](https://github.com/renancarlins/web-1/blob/main/app.js): `app.js`
- [Sales history](https://github.com/renancarlins/web-1/blob/main/app.js): `app.js`
- [Dashboard metrics](https://github.com/renancarlins/web-1/blob/main/app.js): `app.js`
- [Theme toggle](https://github.com/renancarlins/web-1/blob/main/app.js): `app.js`

### Local persistence

- **localStorage**

### Other components

- **Store user**

## Connections

- Store user → Dashboard: opens (evidence: `README.md`)
- Store user → Products page: manages (evidence: `README.md`)
- Store user → Customers page: manages (evidence: `README.md`)
- Store user → Cart page: shops (evidence: `README.md`)
- Store user → Sales page: reviews (evidence: `README.md`)
- App runtime → Dashboard: renders (evidence: `app.js`)
- App runtime → Products page: renders (evidence: `app.js`)
- App runtime → Customers page: renders (evidence: `app.js`)
- App runtime → Cart page: renders (evidence: `app.js`)
- App runtime → Sales page: renders (evidence: `app.js`)
- App runtime → localStorage: reads and writes (evidence: `app.js`)
- Dashboard → Dashboard metrics: shows (evidence: `app.js`)
- Products page → Product records: manages (evidence: `app.js`)
- Customers page → Customer records: manages (evidence: `app.js`)
- Cart page → Shopping cart: manages (evidence: `app.js`)
- Cart page → Sale finalization: finalizes (evidence: `app.js`)
- Sales page → Sales history: displays (evidence: `app.js`)
- Sale finalization → Shopping cart: reads and clears (evidence: `app.js`)
- Sale finalization → Product records: reads products (evidence: `app.js`)
- Sale finalization → Customer records: reads customer (evidence: `app.js`)
- Sale finalization → Sales history: records sale (evidence: `app.js`)
- Dashboard metrics → Sales history: reads totals (evidence: `app.js`)
- Dashboard metrics → Customer records: counts customers (evidence: `app.js`)
- Dashboard metrics → Product records: sums stock (evidence: `app.js`)
- Store user → Theme toggle: toggles (evidence: `app.js`)
