# kaualimagallijose/sistema_rj architecture

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

- Interactive diagram: https://gitdiagram.com/kaualimagallijose/sistema_rj
- Repository: https://github.com/kaualimagallijose/sistema_rj

## Overview

Sistema RJ is a browser-based jewelry order and inventory management system. The main workflow starts in the office order form, submits an order classified as PF (to manufacture), PG (part manufacture/part stock), or PE (already in stock), and persists it for later search, editing, and status tracking. Separate capabilities manage stock, record weights, exchange order files, and present protected order and stock analytics; the repository also includes a 3D ring-design tool. The workflow links reflect the supplied excerpts and README; unsampled subsystem details are represented only where the tree and documentation support them.

Main entry points: [`Escritorio/Estoque/Estoque_Pagina_Inicial.php`](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Estoque/Estoque_Pagina_Inicial.php) (Stock overview), [`Escritorio/php/PG2_Escritorio1.php`](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/php/PG2_Escritorio1.php) (Order persistence), [`ferramentas_menu/graficos/dasboard/index.php`](https://github.com/kaualimagallijose/sistema_rj/blob/main/ferramentas_menu/graficos/dasboard/index.php) (Order analytics), [`menu/index.php`](https://github.com/kaualimagallijose/sistema_rj/blob/main/menu/index.php) (Main menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Navigation and orders"]
  node_home["System entry<br/>[index.php]"]
  node_menu["Main menu<br/>[index.php]"]
  node_office["Order form<br/>[main.js]"]
  node_submit["Order persistence"]
end

subgraph group_operations["Order operations"]
  node_orderlist["Order search<br/>[pedidos.php]"]
  node_editorder["Order editing<br/>[editarPedido.php]"]
  node_status["Order status<br/>[statusPedidos.php]"]
  node_orderjson["Order JSON files"]
  node_weight["Order weighing<br/>[cadastrar_Peso.php]"]
  node_exchange["Import and export"]
end

subgraph group_inventory["Inventory management"]
  node_stockhome["Stock overview"]
  node_stockcreate["Create stock<br/>[CriarEstoque.php]"]
  node_stockview["View stock<br/>[ver_estoque.php]"]
  node_stockadd["Increase stock"]
end

subgraph group_insights["Tools and reporting"]
  node_dashboardauth["Dashboard access<br/>[protege_dash.php]"]
  node_dashboard["Order analytics<br/>[index.php]"]
  node_charts["Chart rendering<br/>[graficos_js.js]"]
  node_ring["3D ring design<br/>[alianca3D.php]"]
end

node_user(("Office user"))
node_db[("MySQL database")]

node_user -->|"opens"| node_home
node_home -->|"redirects"| node_menu
node_user -->|"selects tools"| node_menu
node_menu -->|"opens office"| node_office
node_office -->|"posts order"| node_submit
node_submit -->|"writes order"| node_db
node_user -->|"searches orders"| node_orderlist
node_orderlist -->|"queries orders"| node_db
node_user -->|"edits order"| node_editorder
node_editorder -->|"updates orders"| node_db
node_user -->|"tracks status"| node_status
node_status -->|"reads status"| node_db
node_user -->|"manages stock"| node_stockhome
node_stockhome -->|"creates stock"| node_stockcreate
node_stockhome -->|"opens stock"| node_stockview
node_stockhome -->|"adds stock"| node_stockadd
node_stockcreate -->|"stores stock"| node_db
node_stockview -->|"reads stock"| node_db
node_stockadd -->|"updates stock"| node_db
node_user -->|"records weights"| node_weight
node_weight -->|"reads orders"| node_db
node_user -->|"imports or exports"| node_exchange
node_exchange -->|"exchanges order data"| node_db
node_user -->|"opens analytics"| node_dashboardauth
node_dashboardauth -->|"grants access"| node_dashboard
node_dashboard -->|"queries metrics"| node_db
node_dashboard -->|"renders charts"| node_charts
node_user -->|"designs ring"| node_ring
node_submit -.->|"stores order files"| node_orderjson

click node_home "https://github.com/kaualimagallijose/sistema_rj/blob/main/index.php"
click node_menu "https://github.com/kaualimagallijose/sistema_rj/blob/main/menu/index.php"
click node_office "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/main.js"
click node_submit "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/php/PG2_Escritorio1.php"
click node_orderlist "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/pedidos/pedidos.php"
click node_editorder "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/pedidos/phpScripts/editarPedido.php"
click node_status "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/statusPedidos/statusPedidos.php"
click node_orderjson "https://github.com/kaualimagallijose/sistema_rj/tree/main/arquivoJson/php"
click node_stockhome "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Estoque/Estoque_Pagina_Inicial.php"
click node_stockcreate "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Estoque/Criar_estoque/CriarEstoque.php"
click node_stockview "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Estoque/Ver_estoque/ver_estoque.php"
click node_stockadd "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Estoque/Aumentar_estoque/aumentarEstoque.php"
click node_weight "https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Peso/cadastrar_Peso.php"
click node_exchange "https://github.com/kaualimagallijose/sistema_rj/tree/main/Escritorio/ExportarImportar"
click node_dashboardauth "https://github.com/kaualimagallijose/sistema_rj/blob/main/ferramentas_menu/graficos/php/protege_dash.php"
click node_dashboard "https://github.com/kaualimagallijose/sistema_rj/blob/main/ferramentas_menu/graficos/dasboard/index.php"
click node_charts "https://github.com/kaualimagallijose/sistema_rj/blob/main/ferramentas_menu/graficos/js/graficos_js.js"
click node_ring "https://github.com/kaualimagallijose/sistema_rj/blob/main/ferramentas_menu/Alianca3D/alianca3D.php"

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_home,node_menu,node_office,node_submit,node_user toneBlue
class node_orderlist,node_editorder,node_status,node_orderjson,node_weight,node_exchange,node_db toneAmber
class node_stockhome,node_stockcreate,node_stockview,node_stockadd toneMint
class node_dashboardauth,node_dashboard,node_charts,node_ring toneRose
```

## Components

### Navigation and orders

- [System entry](https://github.com/kaualimagallijose/sistema_rj/blob/main/index.php): `index.php`
- [Main menu](https://github.com/kaualimagallijose/sistema_rj/blob/main/menu/index.php): `menu/index.php`
- [Order form](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/main.js): `Escritorio/main.js`
- [Order persistence](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/php/PG2_Escritorio1.php): `Escritorio/php/PG2_Escritorio1.php`

### Order operations

- [Order search](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/pedidos/pedidos.php): `Escritorio/pedidos/pedidos.php`
- [Order editing](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/pedidos/phpScripts/editarPedido.php): `Escritorio/pedidos/phpScripts/editarPedido.php`
- [Order status](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/statusPedidos/statusPedidos.php): `Escritorio/statusPedidos/statusPedidos.php`
- [Order JSON files](https://github.com/kaualimagallijose/sistema_rj/tree/main/arquivoJson/php): `arquivoJson/php`
- [Order weighing](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Peso/cadastrar_Peso.php): `Escritorio/Peso/cadastrar_Peso.php`
- [Import and export](https://github.com/kaualimagallijose/sistema_rj/tree/main/Escritorio/ExportarImportar): `Escritorio/ExportarImportar`

### Inventory management

- [Stock overview](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Estoque/Estoque_Pagina_Inicial.php): `Escritorio/Estoque/Estoque_Pagina_Inicial.php`
- [Create stock](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Estoque/Criar_estoque/CriarEstoque.php): `Escritorio/Estoque/Criar_estoque/CriarEstoque.php`
- [View stock](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Estoque/Ver_estoque/ver_estoque.php): `Escritorio/Estoque/Ver_estoque/ver_estoque.php`
- [Increase stock](https://github.com/kaualimagallijose/sistema_rj/blob/main/Escritorio/Estoque/Aumentar_estoque/aumentarEstoque.php): `Escritorio/Estoque/Aumentar_estoque/aumentarEstoque.php`

### Tools and reporting

- [Dashboard access](https://github.com/kaualimagallijose/sistema_rj/blob/main/ferramentas_menu/graficos/php/protege_dash.php): `ferramentas_menu/graficos/php/protege_dash.php`
- [Order analytics](https://github.com/kaualimagallijose/sistema_rj/blob/main/ferramentas_menu/graficos/dasboard/index.php): `ferramentas_menu/graficos/dasboard/index.php`
- [Chart rendering](https://github.com/kaualimagallijose/sistema_rj/blob/main/ferramentas_menu/graficos/js/graficos_js.js): `ferramentas_menu/graficos/js/graficos_js.js`
- [3D ring design](https://github.com/kaualimagallijose/sistema_rj/blob/main/ferramentas_menu/Alianca3D/alianca3D.php): `ferramentas_menu/Alianca3D/alianca3D.php`

### Other components

- **Office user**
- **MySQL database**

## Connections

- Office user → System entry: opens
- System entry → Main menu: redirects
- Office user → Main menu: selects tools
- Main menu → Order form: opens office
- Order form → Order persistence: posts order
- Order persistence → MySQL database: writes order
- Office user → Order search: searches orders
- Order search → MySQL database: queries orders
- Office user → Order editing: edits order
- Order editing → MySQL database: updates orders
- Office user → Order status: tracks status
- Order status → MySQL database: reads status
- Office user → Stock overview: manages stock
- Stock overview → Create stock: creates stock
- Stock overview → View stock: opens stock
- Stock overview → Increase stock: adds stock
- Create stock → MySQL database: stores stock
- View stock → MySQL database: reads stock
- Increase stock → MySQL database: updates stock
- Office user → Order weighing: records weights
- Order weighing → MySQL database: reads orders
- Office user → Import and export: imports or exports
- Import and export → MySQL database: exchanges order data
- Office user → Dashboard access: opens analytics
- Dashboard access → Order analytics: grants access
- Order analytics → MySQL database: queries metrics
- Order analytics → Chart rendering: renders charts
- Office user → 3D ring design: designs ring
- Order persistence → Order JSON files: stores order files
