# bisniscuan01/pawonboga architecture

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

- Interactive diagram: https://gitdiagram.com/bisniscuan01/pawonboga
- Repository: https://github.com/bisniscuan01/pawonboga

## Overview

PawonBoga is a browser-only product catalog and management dashboard for small food-and-drink businesses. Users browse, search, filter, and sort products, then can follow an in-stock product’s WhatsApp order link; dashboard users can validate and manage products, view stock statistics, and import or export JSON. Product data is loaded from and saved to localStorage, with sample-data recovery for invalid stored data. The graph separates the UI, application coordination, and data responsibilities; edges reflect the shown calls or README-documented behavior. No backend or authentication is present.

Main entry points: [`src/main.js`](https://github.com/bisniscuan01/pawonboga/blob/main/src/main.js) (App coordinator), [`src/ui.js`](https://github.com/bisniscuan01/pawonboga/blob/main/src/ui.js) (Product cards), [`src/store.js`](https://github.com/bisniscuan01/pawonboga/blob/main/src/store.js) (Product persistence), [`src/products.js`](https://github.com/bisniscuan01/pawonboga/blob/main/src/products.js) (Sample products)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Catalog experience"]
  node_catalog_filter["Catalog filtering<br/>[store.js]"]
  node_catalog_view["Product cards<br/>[ui.js]"]
  node_order_link["WhatsApp links<br/>[ui.js]"]
end

subgraph group_management["Product management"]
  node_app["App coordinator<br/>[main.js]"]
  node_dashboard["Dashboard view<br/>[main.js]"]
  node_product_form["Product validation<br/>[store.js]"]
  node_product_crud["Product CRUD<br/>[main.js]"]
  node_statistics["Stock statistics<br/>[ui.js]"]
  node_json_transfer["JSON import/export<br/>[main.js]"]
end

subgraph group_data["Product data"]
  node_import_parser["Import validation<br/>[store.js]"]
  node_product_store["Product persistence<br/>[store.js]"]
  node_sample_data["Sample products<br/>[products.js]"]
end

node_shopper(("Shopper / owner"))
node_whatsapp(("WhatsApp"))
node_browser_storage[("Browser localStorage")]

node_shopper -->|"uses"| node_app
node_app -->|"filters products"| node_catalog_filter
node_app -->|"renders catalog"| node_catalog_view
node_app -->|"switches views"| node_dashboard
node_app -->|"validates input"| node_product_form
node_app -->|"handles changes"| node_product_crud
node_app -->|"renders stats"| node_statistics
node_app -->|"handles transfer"| node_json_transfer
node_json_transfer -->|"parses import"| node_import_parser
node_app -->|"loads and saves"| node_product_store
node_product_store -->|"reads and writes"| node_browser_storage
node_product_store -->|"restores samples"| node_sample_data
node_import_parser -->|"validates products"| node_product_form
node_catalog_view -->|"renders action"| node_order_link
node_order_link -->|"opens order link"| node_whatsapp
node_catalog_view -->|"uses categories"| node_sample_data

click node_app "https://github.com/bisniscuan01/pawonboga/blob/main/src/main.js"
click node_catalog_filter "https://github.com/bisniscuan01/pawonboga/blob/main/src/store.js"
click node_catalog_view "https://github.com/bisniscuan01/pawonboga/blob/main/src/ui.js"
click node_order_link "https://github.com/bisniscuan01/pawonboga/blob/main/src/ui.js"
click node_dashboard "https://github.com/bisniscuan01/pawonboga/blob/main/src/main.js"
click node_product_form "https://github.com/bisniscuan01/pawonboga/blob/main/src/store.js"
click node_product_crud "https://github.com/bisniscuan01/pawonboga/blob/main/src/main.js"
click node_statistics "https://github.com/bisniscuan01/pawonboga/blob/main/src/ui.js"
click node_json_transfer "https://github.com/bisniscuan01/pawonboga/blob/main/src/main.js"
click node_import_parser "https://github.com/bisniscuan01/pawonboga/blob/main/src/store.js"
click node_product_store "https://github.com/bisniscuan01/pawonboga/blob/main/src/store.js"
click node_sample_data "https://github.com/bisniscuan01/pawonboga/blob/main/src/products.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_catalog_filter,node_catalog_view,node_order_link toneBlue
class node_app,node_dashboard,node_product_form,node_product_crud,node_statistics,node_json_transfer,node_browser_storage toneAmber
class node_import_parser,node_product_store,node_sample_data toneMint
class node_shopper,node_whatsapp toneIndigo
```

## Components

### Catalog experience

- [Catalog filtering](https://github.com/bisniscuan01/pawonboga/blob/main/src/store.js): `src/store.js`
- [Product cards](https://github.com/bisniscuan01/pawonboga/blob/main/src/ui.js): `src/ui.js`
- [WhatsApp links](https://github.com/bisniscuan01/pawonboga/blob/main/src/ui.js): `src/ui.js`

### Product management

- [App coordinator](https://github.com/bisniscuan01/pawonboga/blob/main/src/main.js): `src/main.js`
- [Dashboard view](https://github.com/bisniscuan01/pawonboga/blob/main/src/main.js): `src/main.js`
- [Product validation](https://github.com/bisniscuan01/pawonboga/blob/main/src/store.js): `src/store.js`
- [Product CRUD](https://github.com/bisniscuan01/pawonboga/blob/main/src/main.js): `src/main.js`
- [Stock statistics](https://github.com/bisniscuan01/pawonboga/blob/main/src/ui.js): `src/ui.js`
- [JSON import/export](https://github.com/bisniscuan01/pawonboga/blob/main/src/main.js): `src/main.js`

### Product data

- [Import validation](https://github.com/bisniscuan01/pawonboga/blob/main/src/store.js): `src/store.js`
- [Product persistence](https://github.com/bisniscuan01/pawonboga/blob/main/src/store.js): `src/store.js`
- [Sample products](https://github.com/bisniscuan01/pawonboga/blob/main/src/products.js): `src/products.js`

### Other components

- **Shopper / owner**
- **WhatsApp**
- **Browser localStorage**

## Connections

- Shopper / owner → App coordinator: uses (evidence: `README.md`)
- App coordinator → Catalog filtering: filters products (evidence: `src/main.js`)
- App coordinator → Product cards: renders catalog (evidence: `src/main.js`)
- App coordinator → Dashboard view: switches views (evidence: `src/main.js`)
- App coordinator → Product validation: validates input (evidence: `src/main.js`)
- App coordinator → Product CRUD: handles changes (evidence: `src/main.js`)
- App coordinator → Stock statistics: renders stats (evidence: `src/main.js`)
- App coordinator → JSON import/export: handles transfer (evidence: `src/main.js`)
- JSON import/export → Import validation: parses import (evidence: `src/main.js`)
- App coordinator → Product persistence: loads and saves (evidence: `src/main.js`)
- Product persistence → Browser localStorage: reads and writes (evidence: `src/store.js`)
- Product persistence → Sample products: restores samples (evidence: `src/store.js`)
- Import validation → Product validation: validates products (evidence: `src/store.js`)
- Product cards → WhatsApp links: renders action (evidence: `src/ui.js`)
- WhatsApp links → WhatsApp: opens order link (evidence: `src/ui.js`)
- Product cards → Sample products: uses categories (evidence: `src/ui.js`)
