# joaohsantana2007/farma-vite architecture

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

## Overview

FarmaVite is a static front-end prototype for a pharmacy marketplace, with customer browsing and supporting customer, pharmacy, and courier pages. The documented customer journey begins at the public landing page and branches into product search and exploration; the tree also shows cart, payment, and order pages. Pharmacy inventory and payment-method behavior are implemented client-side with localStorage. The README confirms there is no backend/API. Unsampled page relationships are shown only as unverified where useful; source-level evidence is limited to the excerpts provided.

Main entry points: [`index.html`](https://github.com/joaohsantana2007/farma-vite/blob/main/index.html) (Marketplace home), [`pages/usuario/public/compra/metododepagamento.html`](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/metododepagamento.html) (Payment methods), [`pages/usuario/public/compra/carrinho.html`](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/carrinho.html) (Shopping cart), [`js/metododepagamento.js`](https://github.com/joaohsantana2007/farma-vite/blob/main/js/metododepagamento.js) (Payment interaction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_market["Customer marketplace"]
  node_landing["Marketplace home<br/>[index.html]"]
  node_search["Product search<br/>[pesquisa.html]"]
  node_explore["Explore products"]
  node_cart["Shopping cart<br/>[carrinho.html]"]
  node_payment["Payment methods"]
  node_payment_logic["Payment interaction"]
  node_confirmation["Payment confirmation"]
  node_orders["Customer orders<br/>[pedidos.html]"]
  node_customer_profile["Customer profile<br/>[dados.html]"]
end

subgraph group_pharmacy["Pharmacy operations"]
  node_pharmacy_home["Pharmacy home"]
  node_pharmacy_profile["Pharmacy profile<br/>[minhafarmacia.html]"]
  node_inventory["Inventory management"]
  node_medicine_registration["Medicine registration"]
  node_pharmacy_finance["Pharmacy finances"]
  node_sanitation["Sanitation tracking<br/>[higienizacao.js]"]
end

subgraph group_delivery["Courier operations"]
  node_courier_home["Courier home<br/>[tela-inicial.html]"]
  node_deliveries["Delivery listings<br/>[entregas.js]"]
  node_courier_profile["Courier details"]
  node_vehicle_profile["Vehicle details<br/>[dadosveiculo.js]"]
  node_courier_finance["Courier finances"]
end

subgraph group_shared["Shared interface"]
  node_public_includes["Public page includes<br/>[includes.js]"]
  node_pharmacy_includes["Pharmacy page includes"]
  node_courier_includes["Courier page includes"]
end

node_customer(("Customer"))
node_pharmacy_actor(("Pharmacy operator"))
node_courier_actor(("Courier"))
node_browser_storage[("Browser localStorage")]

node_customer -->|"opens"| node_landing
node_landing -->|"offers search"| node_search
node_landing -->|"offers exploration"| node_explore
node_landing -->|"loads navigation"| node_public_includes
node_customer -.->|"browses toward"| node_cart
node_cart -.->|"continues to"| node_payment
node_payment -.->|"uses interaction"| node_payment_logic
node_payment_logic -->|"reads and writes"| node_browser_storage
node_payment -.->|"continues to"| node_confirmation
node_confirmation -.->|"leads to"| node_orders
node_pharmacy_actor -.->|"opens"| node_pharmacy_home
node_pharmacy_actor -.->|"manages profile"| node_pharmacy_profile
node_pharmacy_actor -.->|"manages stock"| node_inventory
node_inventory -->|"reads and writes"| node_browser_storage
node_pharmacy_actor -.->|"registers medicine"| node_medicine_registration
node_pharmacy_actor -.->|"reviews finances"| node_pharmacy_finance
node_pharmacy_actor -.->|"tracks sanitation"| node_sanitation
node_courier_actor -.->|"opens"| node_courier_home
node_courier_actor -.->|"views deliveries"| node_deliveries
node_courier_actor -.->|"manages details"| node_courier_profile
node_courier_actor -.->|"manages vehicle"| node_vehicle_profile
node_courier_actor -.->|"reviews finances"| node_courier_finance

click node_landing "https://github.com/joaohsantana2007/farma-vite/blob/main/index.html"
click node_search "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/produtos/pesquisa.html"
click node_explore "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/produtos/explorarprodutos.html"
click node_cart "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/carrinho.html"
click node_payment "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/metododepagamento.html"
click node_payment_logic "https://github.com/joaohsantana2007/farma-vite/blob/main/js/metododepagamento.js"
click node_confirmation "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/confirmpagamento.html"
click node_orders "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/pedidos.html"
click node_customer_profile "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/private/dados.html"
click node_pharmacy_home "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/farmacia/public/tela-inicial-farmacia.html"
click node_pharmacy_profile "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/farmacia/private/minhafarmacia.html"
click node_inventory "https://github.com/joaohsantana2007/farma-vite/blob/main/js/estoque-farmacia.js"
click node_medicine_registration "https://github.com/joaohsantana2007/farma-vite/blob/main/js/cadastroremedios.js"
click node_pharmacy_finance "https://github.com/joaohsantana2007/farma-vite/blob/main/js/financeiro-farmacia.js"
click node_sanitation "https://github.com/joaohsantana2007/farma-vite/blob/main/js/higienizacao.js"
click node_courier_home "https://github.com/joaohsantana2007/farma-vite/blob/main/pages/entregador/public/tela-inicial.html"
click node_deliveries "https://github.com/joaohsantana2007/farma-vite/blob/main/js/entregas.js"
click node_courier_profile "https://github.com/joaohsantana2007/farma-vite/blob/main/js/dados-entregador.js"
click node_vehicle_profile "https://github.com/joaohsantana2007/farma-vite/blob/main/js/dadosveiculo.js"
click node_courier_finance "https://github.com/joaohsantana2007/farma-vite/blob/main/js/financeiro-entregador.js"
click node_public_includes "https://github.com/joaohsantana2007/farma-vite/blob/main/js/includes.js"
click node_pharmacy_includes "https://github.com/joaohsantana2007/farma-vite/blob/main/js/includes-farmacia.js"
click node_courier_includes "https://github.com/joaohsantana2007/farma-vite/blob/main/js/includes-entregador.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_landing,node_search,node_explore,node_cart,node_payment,node_payment_logic,node_confirmation,node_orders,node_customer_profile toneBlue
class node_pharmacy_home,node_pharmacy_profile,node_inventory,node_medicine_registration,node_pharmacy_finance,node_sanitation,node_browser_storage toneAmber
class node_courier_home,node_deliveries,node_courier_profile,node_vehicle_profile,node_courier_finance toneMint
class node_public_includes,node_pharmacy_includes,node_courier_includes toneRose
class node_customer,node_pharmacy_actor,node_courier_actor toneIndigo
```

## Components

### Customer marketplace

- [Marketplace home](https://github.com/joaohsantana2007/farma-vite/blob/main/index.html): `index.html`
- [Product search](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/produtos/pesquisa.html): `pages/usuario/public/produtos/pesquisa.html`
- [Explore products](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/produtos/explorarprodutos.html): `pages/usuario/public/produtos/explorarprodutos.html`
- [Shopping cart](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/carrinho.html): `pages/usuario/public/compra/carrinho.html`
- [Payment methods](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/metododepagamento.html): `pages/usuario/public/compra/metododepagamento.html`
- [Payment interaction](https://github.com/joaohsantana2007/farma-vite/blob/main/js/metododepagamento.js): `js/metododepagamento.js`
- [Payment confirmation](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/confirmpagamento.html): `pages/usuario/public/compra/confirmpagamento.html`
- [Customer orders](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/public/compra/pedidos.html): `pages/usuario/public/compra/pedidos.html`
- [Customer profile](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/usuario/private/dados.html): `pages/usuario/private/dados.html`

### Pharmacy operations

- [Pharmacy home](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/farmacia/public/tela-inicial-farmacia.html): `pages/farmacia/public/tela-inicial-farmacia.html`
- [Pharmacy profile](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/farmacia/private/minhafarmacia.html): `pages/farmacia/private/minhafarmacia.html`
- [Inventory management](https://github.com/joaohsantana2007/farma-vite/blob/main/js/estoque-farmacia.js): `js/estoque-farmacia.js`
- [Medicine registration](https://github.com/joaohsantana2007/farma-vite/blob/main/js/cadastroremedios.js): `js/cadastroremedios.js`
- [Pharmacy finances](https://github.com/joaohsantana2007/farma-vite/blob/main/js/financeiro-farmacia.js): `js/financeiro-farmacia.js`
- [Sanitation tracking](https://github.com/joaohsantana2007/farma-vite/blob/main/js/higienizacao.js): `js/higienizacao.js`

### Courier operations

- [Courier home](https://github.com/joaohsantana2007/farma-vite/blob/main/pages/entregador/public/tela-inicial.html): `pages/entregador/public/tela-inicial.html`
- [Delivery listings](https://github.com/joaohsantana2007/farma-vite/blob/main/js/entregas.js): `js/entregas.js`
- [Courier details](https://github.com/joaohsantana2007/farma-vite/blob/main/js/dados-entregador.js): `js/dados-entregador.js`
- [Vehicle details](https://github.com/joaohsantana2007/farma-vite/blob/main/js/dadosveiculo.js): `js/dadosveiculo.js`
- [Courier finances](https://github.com/joaohsantana2007/farma-vite/blob/main/js/financeiro-entregador.js): `js/financeiro-entregador.js`

### Shared interface

- [Public page includes](https://github.com/joaohsantana2007/farma-vite/blob/main/js/includes.js): `js/includes.js`
- [Pharmacy page includes](https://github.com/joaohsantana2007/farma-vite/blob/main/js/includes-farmacia.js): `js/includes-farmacia.js`
- [Courier page includes](https://github.com/joaohsantana2007/farma-vite/blob/main/js/includes-entregador.js): `js/includes-entregador.js`

### Other components

- **Customer**
- **Pharmacy operator**
- **Courier**
- **Browser localStorage**

## Connections

- Customer → Marketplace home: opens (evidence: `README.md`)
- Marketplace home → Product search: offers search (evidence: `README.md`)
- Marketplace home → Explore products: offers exploration (evidence: `README.md`)
- Marketplace home → Public page includes: loads navigation (evidence: `README.md`)
- Customer → Shopping cart: browses toward
- Shopping cart → Payment methods: continues to
- Payment methods → Payment interaction: uses interaction
- Payment interaction → Browser localStorage: reads and writes (evidence: `js/metododepagamento.js`)
- Payment methods → Payment confirmation: continues to
- Payment confirmation → Customer orders: leads to
- Pharmacy operator → Pharmacy home: opens
- Pharmacy operator → Pharmacy profile: manages profile
- Pharmacy operator → Inventory management: manages stock
- Inventory management → Browser localStorage: reads and writes (evidence: `js/estoque-farmacia.js`)
- Pharmacy operator → Medicine registration: registers medicine
- Pharmacy operator → Pharmacy finances: reviews finances
- Pharmacy operator → Sanitation tracking: tracks sanitation
- Courier → Courier home: opens
- Courier → Delivery listings: views deliveries
- Courier → Courier details: manages details
- Courier → Vehicle details: manages vehicle
- Courier → Courier finances: reviews finances
