# tabgshu-ux/rech architecture

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

- Interactive diagram: https://gitdiagram.com/tabgshu-ux/rech
- Repository: https://github.com/tabgshu-ux/rech

## Overview

This is a Streamlit ERP-style operations system for REETECH Industrial. Users sign in, choose a department and function, then work in a module for operational, financial, workforce, or administrative tasks. The visible app dispatches to sales AR, payroll, and invoice pages; its imports and navigation identify additional major modules, but their dispatch calls are not shown. The graph preserves those modules with unverified dashed links. Source excerpts also show AR database access, invoice parsing, field attendance, warehouse WIP costing, and executive market/AI analysis.

Main entry points: [`app.py`](https://github.com/tabgshu-ux/rech/blob/main/app.py) (Streamlit app), [`modules/executive_dashboard.py`](https://github.com/tabgshu-ux/rech/blob/main/modules/executive_dashboard.py) (Executive dashboard), [`modules/sales_order_ar.py`](https://github.com/tabgshu-ux/rech/blob/main/modules/sales_order_ar.py) (Sales orders & AR), [`modules/approval_workflow.py`](https://github.com/tabgshu-ux/rech/blob/main/modules/approval_workflow.py) (Approval workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application"]
  node_app["Streamlit app<br/>[app.py]"]
end

subgraph group_finance["Finance &amp; Sales"]
  node_approval["Approval workflow"]
  node_executive["Executive dashboard"]
  node_invoices["Invoice management"]
  node_procurement["Procurement &amp; AP<br/>[procurement_ap.py]"]
  node_salesar["Sales orders &amp; AR<br/>[sales_order_ar.py]"]
  node_quotation["Sales quotation<br/>[sales_quotation.py]"]
  node_finance_tax["Finance &amp; tax<br/>[finance_tax.py]"]
end

subgraph group_operations["Operations"]
  node_engineering["Engineering pipeline"]
  node_warehouse["Warehouse management"]
  node_assets["Asset management"]
  node_field["Field attendance"]
  node_gate["Vehicle gate log"]
  node_maintenance["Vehicle maintenance"]
end

subgraph group_people["People &amp; Administration"]
  node_employee["Employee management"]
  node_payroll["Payroll management"]
  node_users["User management<br/>[user_management.py]"]
  node_general["General affairs<br/>[general_affairs.py]"]
end

subgraph group_platform["Shared Services"]
  node_dbconn["DB connection<br/>[db_connection.py]"]
  node_database[("ERP database")]
  node_licensing["System licensing"]
  node_dashboard["ERP dashboard<br/>[erp_dashboard.py]"]
  node_security["Security utilities<br/>[security_utils.py]"]
end

node_user(("ERP user"))
node_market["Market data"]
node_gemini["Google Gemini"]

node_user -->|"signs in"| node_app
node_app -.->|"initializes"| node_dbconn
node_app -->|"renders"| node_salesar
node_app -->|"renders"| node_payroll
node_app -->|"renders"| node_invoices
node_app -.->|"dispatches to"| node_approval
node_app -.->|"dispatches to"| node_executive
node_app -.->|"dispatches to"| node_procurement
node_app -.->|"dispatches to"| node_quotation
node_app -.->|"dispatches to"| node_finance_tax
node_app -.->|"dispatches to"| node_engineering
node_app -.->|"dispatches to"| node_warehouse
node_app -.->|"dispatches to"| node_assets
node_app -.->|"dispatches to"| node_field
node_app -.->|"dispatches to"| node_gate
node_app -.->|"dispatches to"| node_maintenance
node_app -.->|"dispatches to"| node_employee
node_app -.->|"dispatches to"| node_users
node_app -.->|"dispatches to"| node_general
node_app -.->|"dispatches to"| node_licensing
node_app -.->|"dispatches to"| node_dashboard
node_app -.->|"dispatches to"| node_security
node_salesar -->|"reads and writes"| node_database
node_executive -->|"fetches prices"| node_market
node_executive -->|"requests insights"| node_gemini

click node_app "https://github.com/tabgshu-ux/rech/blob/main/app.py"
click node_dbconn "https://github.com/tabgshu-ux/rech/blob/main/modules/db_connection.py"
click node_approval "https://github.com/tabgshu-ux/rech/blob/main/modules/approval_workflow.py"
click node_executive "https://github.com/tabgshu-ux/rech/blob/main/modules/executive_dashboard.py"
click node_invoices "https://github.com/tabgshu-ux/rech/blob/main/modules/invoice_management.py"
click node_procurement "https://github.com/tabgshu-ux/rech/blob/main/modules/procurement_ap.py"
click node_salesar "https://github.com/tabgshu-ux/rech/blob/main/modules/sales_order_ar.py"
click node_quotation "https://github.com/tabgshu-ux/rech/blob/main/modules/sales_quotation.py"
click node_finance_tax "https://github.com/tabgshu-ux/rech/blob/main/modules/finance_tax.py"
click node_engineering "https://github.com/tabgshu-ux/rech/blob/main/modules/engineering_pipeline.py"
click node_warehouse "https://github.com/tabgshu-ux/rech/blob/main/modules/warehouse_management.py"
click node_assets "https://github.com/tabgshu-ux/rech/blob/main/modules/asset_management.py"
click node_field "https://github.com/tabgshu-ux/rech/blob/main/modules/field_attendance.py"
click node_gate "https://github.com/tabgshu-ux/rech/blob/main/modules/vehicle_gate_log.py"
click node_maintenance "https://github.com/tabgshu-ux/rech/blob/main/modules/vehicle_maintenance.py"
click node_employee "https://github.com/tabgshu-ux/rech/blob/main/modules/employee_management.py"
click node_payroll "https://github.com/tabgshu-ux/rech/blob/main/modules/payroll_management.py"
click node_users "https://github.com/tabgshu-ux/rech/blob/main/modules/user_management.py"
click node_general "https://github.com/tabgshu-ux/rech/blob/main/modules/general_affairs.py"
click node_licensing "https://github.com/tabgshu-ux/rech/blob/main/modules/system_licensing.py"
click node_dashboard "https://github.com/tabgshu-ux/rech/blob/main/modules/erp_dashboard.py"
click node_security "https://github.com/tabgshu-ux/rech/blob/main/modules/security_utils.py"

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_user toneBlue
class node_approval,node_executive,node_invoices,node_procurement,node_salesar,node_quotation,node_finance_tax toneAmber
class node_engineering,node_warehouse,node_assets,node_field,node_gate,node_maintenance toneMint
class node_employee,node_payroll,node_users,node_general toneRose
class node_dbconn,node_database,node_licensing,node_dashboard,node_security,node_market,node_gemini toneIndigo
```

## Components

### Application

- [Streamlit app](https://github.com/tabgshu-ux/rech/blob/main/app.py): `app.py`

### Finance & Sales

- [Approval workflow](https://github.com/tabgshu-ux/rech/blob/main/modules/approval_workflow.py): `modules/approval_workflow.py`
- [Executive dashboard](https://github.com/tabgshu-ux/rech/blob/main/modules/executive_dashboard.py): `modules/executive_dashboard.py`
- [Invoice management](https://github.com/tabgshu-ux/rech/blob/main/modules/invoice_management.py): `modules/invoice_management.py`
- [Procurement & AP](https://github.com/tabgshu-ux/rech/blob/main/modules/procurement_ap.py): `modules/procurement_ap.py`
- [Sales orders & AR](https://github.com/tabgshu-ux/rech/blob/main/modules/sales_order_ar.py): `modules/sales_order_ar.py`
- [Sales quotation](https://github.com/tabgshu-ux/rech/blob/main/modules/sales_quotation.py): `modules/sales_quotation.py`
- [Finance & tax](https://github.com/tabgshu-ux/rech/blob/main/modules/finance_tax.py): `modules/finance_tax.py`

### Operations

- [Engineering pipeline](https://github.com/tabgshu-ux/rech/blob/main/modules/engineering_pipeline.py): `modules/engineering_pipeline.py`
- [Warehouse management](https://github.com/tabgshu-ux/rech/blob/main/modules/warehouse_management.py): `modules/warehouse_management.py`
- [Asset management](https://github.com/tabgshu-ux/rech/blob/main/modules/asset_management.py): `modules/asset_management.py`
- [Field attendance](https://github.com/tabgshu-ux/rech/blob/main/modules/field_attendance.py): `modules/field_attendance.py`
- [Vehicle gate log](https://github.com/tabgshu-ux/rech/blob/main/modules/vehicle_gate_log.py): `modules/vehicle_gate_log.py`
- [Vehicle maintenance](https://github.com/tabgshu-ux/rech/blob/main/modules/vehicle_maintenance.py): `modules/vehicle_maintenance.py`

### People & Administration

- [Employee management](https://github.com/tabgshu-ux/rech/blob/main/modules/employee_management.py): `modules/employee_management.py`
- [Payroll management](https://github.com/tabgshu-ux/rech/blob/main/modules/payroll_management.py): `modules/payroll_management.py`
- [User management](https://github.com/tabgshu-ux/rech/blob/main/modules/user_management.py): `modules/user_management.py`
- [General affairs](https://github.com/tabgshu-ux/rech/blob/main/modules/general_affairs.py): `modules/general_affairs.py`

### Shared Services

- [DB connection](https://github.com/tabgshu-ux/rech/blob/main/modules/db_connection.py): `modules/db_connection.py`
- **ERP database**
- [System licensing](https://github.com/tabgshu-ux/rech/blob/main/modules/system_licensing.py): `modules/system_licensing.py`
- [ERP dashboard](https://github.com/tabgshu-ux/rech/blob/main/modules/erp_dashboard.py): `modules/erp_dashboard.py`
- [Security utilities](https://github.com/tabgshu-ux/rech/blob/main/modules/security_utils.py): `modules/security_utils.py`

### Other components

- **ERP user**
- **Market data**
- **Google Gemini**

## Connections

- ERP user → Streamlit app: signs in (evidence: `app.py`)
- Streamlit app → DB connection: initializes (evidence: `app.py`)
- Streamlit app → Sales orders & AR: renders (evidence: `app.py`)
- Streamlit app → Payroll management: renders (evidence: `app.py`)
- Streamlit app → Invoice management: renders (evidence: `app.py`)
- Streamlit app → Approval workflow: dispatches to (evidence: `app.py`)
- Streamlit app → Executive dashboard: dispatches to (evidence: `app.py`)
- Streamlit app → Procurement & AP: dispatches to (evidence: `app.py`)
- Streamlit app → Sales quotation: dispatches to
- Streamlit app → Finance & tax: dispatches to
- Streamlit app → Engineering pipeline: dispatches to (evidence: `app.py`)
- Streamlit app → Warehouse management: dispatches to (evidence: `app.py`)
- Streamlit app → Asset management: dispatches to (evidence: `app.py`)
- Streamlit app → Field attendance: dispatches to (evidence: `app.py`)
- Streamlit app → Vehicle gate log: dispatches to (evidence: `app.py`)
- Streamlit app → Vehicle maintenance: dispatches to (evidence: `app.py`)
- Streamlit app → Employee management: dispatches to (evidence: `app.py`)
- Streamlit app → User management: dispatches to (evidence: `app.py`)
- Streamlit app → General affairs: dispatches to
- Streamlit app → System licensing: dispatches to (evidence: `app.py`)
- Streamlit app → ERP dashboard: dispatches to
- Streamlit app → Security utilities: dispatches to
- Sales orders & AR → ERP database: reads and writes (evidence: `modules/sales_order_ar.py`)
- Executive dashboard → Market data: fetches prices (evidence: `modules/executive_dashboard.py`)
- Executive dashboard → Google Gemini: requests insights (evidence: `modules/executive_dashboard.py`)
