# eth0voidc/eov_system_web_base architecture

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

- Interactive diagram: https://gitdiagram.com/eth0voidc/eov_system_web_base
- Repository: https://github.com/eth0voidc/eov_system_web_base

## Overview

EOV digitizes employee credit and small-store inventory operations: staff record credit purchases and incoming stock, while administrators manage accounts, employees, products, reporting, and deductions. The principal flow is a role-protected web interface calling backend routes and domain controllers, which query PostgreSQL; product photos are uploaded to Cloudinary. The graph preserves the documented inventory, delivery, credit, settlement, and reporting capabilities. Some API-to-backend links are not shown in sampled code, so they are omitted; unsampled modules are represented only where the tree and README establish their role.

Main entry points: [`frontend/src/App.jsx`](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/App.jsx) (Role-based app routes), [`backend/server.js`](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/server.js) (Express API server), [`backend/routes/authRoutes.js`](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/authRoutes.js) (Authentication routes), [`frontend/src/components/components-staff/ProductView.jsx`](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-staff/ProductView.jsx) (Staff purchasing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Role-based app routes<br/>[App.jsx]"]
  node_employee_views["Employee management"]
  node_inventory_views["Inventory management"]
  node_product_views["Staff purchasing<br/>[ProductView.jsx]"]
  node_delivery_views["Delivery intake<br/>[DeliveryView.jsx]"]
  node_records_views["Employee records<br/>[RecordsView.jsx]"]
  node_admin_dashboard["Admin analytics"]
  node_deduction_views["Deduction processing"]
  node_delivery_history["Delivery history"]
  node_transaction_history["Transaction history"]
  node_employee_api["Employee API client<br/>[employees.js]"]
  node_product_api["Product API client<br/>[products.js]"]
  node_category_api["Category API client<br/>[categories.js]"]
  node_delivery_api["Delivery API client<br/>[delivery.js]"]
  node_records_api["Records API client<br/>[records.js]"]
  node_transaction_api["Transaction API client<br/>[transaction.js]"]
  node_deduction_api["Deductions API client<br/>[deductions.js]"]
  node_dashboard_api["Dashboard API client<br/>[dashboard.js]"]
end

subgraph group_access["Identity and access"]
  node_auth_ui["Sign-in and accounts<br/>[Loginform.jsx]"]
  node_auth_api["Authentication API client<br/>[auth.js]"]
  node_auth_routes["Authentication routes<br/>[authRoutes.js]"]
  node_auth_middleware["Token and role checks<br/>[authMiddleware.js]"]
  node_auth_controller["Authentication controller<br/>[authController.js]"]
end

subgraph group_operations["Store operations"]
  node_employee_routes["Employee routes<br/>[employeeRoutes.js]"]
  node_employee_controller["Employee management"]
  node_product_routes["Product routes<br/>[productRoutes.js]"]
  node_product_controller["Product and image management"]
  node_category_routes["Category routes<br/>[categoryRoutes.js]"]
  node_category_controller["Category management"]
  node_delivery_routes["Delivery routes<br/>[deliveryRoutes.js]"]
  node_delivery_controller["Delivery management"]
end

subgraph group_finance["Credit and reporting"]
end

subgraph group_platform["Backend platform"]
  node_api_server["Express API server<br/>[server.js]"]
end

node_staff(("Staff user"))
node_admin(("Admin user"))

node_staff -->|"opens"| node_app
node_admin -->|"opens"| node_app
node_app -->|"routes to"| node_auth_ui
node_app -->|"routes to"| node_employee_views
node_app -->|"routes to"| node_inventory_views
node_app -->|"routes to"| node_product_views
node_app -->|"routes to"| node_delivery_views
node_app -->|"routes to"| node_records_views
node_app -->|"routes to"| node_admin_dashboard
node_app -->|"routes to"| node_deduction_views
node_app -->|"routes to"| node_delivery_history
node_app -->|"routes to"| node_transaction_history
node_auth_ui -->|"calls"| node_auth_api
node_employee_views -->|"calls"| node_employee_api
node_inventory_views -->|"calls"| node_product_api
node_inventory_views -->|"calls"| node_category_api
node_product_views -->|"calls"| node_employee_api
node_product_views -->|"calls"| node_transaction_api
node_product_views -->|"calls"| node_product_api
node_product_views -->|"calls"| node_category_api
node_delivery_views -->|"calls"| node_product_api
node_delivery_views -->|"calls"| node_delivery_api
node_records_views -->|"calls"| node_employee_api
node_records_views -->|"calls"| node_records_api
node_admin_dashboard -->|"calls"| node_dashboard_api
node_api_server -->|"mounts"| node_auth_routes
node_api_server -->|"mounts"| node_product_routes
node_api_server -->|"mounts"| node_category_routes
node_api_server -->|"mounts"| node_employee_routes
node_api_server -->|"mounts"| node_delivery_routes
node_api_server -->|"mounts"| node_auth_routes
node_api_server -->|"mounts"| node_employee_routes
node_api_server -->|"mounts"| node_auth_routes
node_api_server -->|"mounts"| node_auth_routes
node_api_server -->|"mounts"| node_employee_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_routes -->|"checks"| node_auth_middleware
node_employee_routes -->|"dispatches"| node_employee_controller
node_employee_routes -->|"checks"| node_auth_middleware
node_product_routes -->|"dispatches"| node_product_controller
node_product_routes -->|"checks"| node_auth_middleware
node_delivery_routes -->|"dispatches"| node_delivery_controller
node_delivery_routes -->|"checks"| node_auth_middleware
node_category_routes -->|"dispatches"| node_category_controller
node_category_routes -->|"checks"| node_auth_middleware
node_product_controller -->|"uploads photos"| node_product_controller

click node_app "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/App.jsx"
click node_employee_views "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/RegisterEmployee.jsx"
click node_inventory_views "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/InventoryViewAdmin.jsx"
click node_product_views "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-staff/ProductView.jsx"
click node_delivery_views "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-staff/DeliveryView.jsx"
click node_records_views "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-staff/RecordsView.jsx"
click node_admin_dashboard "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/DashboardOverviewAdmin.jsx"
click node_deduction_views "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/DeductionProcessing.jsx"
click node_delivery_history "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/DeliveryHistory.jsx"
click node_transaction_history "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/TransactionHistory.jsx"
click node_auth_ui "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/Loginform.jsx"
click node_auth_api "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/auth.js"
click node_employee_api "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/employees.js"
click node_product_api "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/products.js"
click node_category_api "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/categories.js"
click node_delivery_api "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/delivery.js"
click node_records_api "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/records.js"
click node_transaction_api "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/transaction.js"
click node_deduction_api "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/deductions.js"
click node_dashboard_api "https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/dashboard.js"
click node_api_server "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/server.js"
click node_auth_routes "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/authRoutes.js"
click node_auth_middleware "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/middleware/authMiddleware.js"
click node_auth_controller "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/authController.js"
click node_employee_routes "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/employeeRoutes.js"
click node_employee_controller "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/employeeController.js"
click node_product_routes "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/productRoutes.js"
click node_product_controller "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/productController.js"
click node_category_routes "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/categoryRoutes.js"
click node_category_controller "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/categoryController.js"
click node_delivery_routes "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/deliveryRoutes.js"
click node_delivery_controller "https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/deliveryController.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_app,node_employee_views,node_inventory_views,node_product_views,node_delivery_views,node_records_views,node_admin_dashboard,node_deduction_views,node_delivery_history,node_transaction_history,node_employee_api,node_product_api,node_category_api,node_delivery_api,node_records_api,node_transaction_api,node_deduction_api,node_dashboard_api,node_staff,node_admin toneBlue
class node_auth_ui,node_auth_api,node_auth_routes,node_auth_middleware,node_auth_controller toneAmber
class node_employee_routes,node_employee_controller,node_product_routes,node_product_controller,node_category_routes,node_category_controller,node_delivery_routes,node_delivery_controller toneMint
class node_api_server toneIndigo
```

## Components

### Web application

- [Role-based app routes](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Employee management](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/RegisterEmployee.jsx): `frontend/src/components/components-admin/RegisterEmployee.jsx`
- [Inventory management](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/InventoryViewAdmin.jsx): `frontend/src/components/components-admin/InventoryViewAdmin.jsx`
- [Staff purchasing](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-staff/ProductView.jsx): `frontend/src/components/components-staff/ProductView.jsx`
- [Delivery intake](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-staff/DeliveryView.jsx): `frontend/src/components/components-staff/DeliveryView.jsx`
- [Employee records](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-staff/RecordsView.jsx): `frontend/src/components/components-staff/RecordsView.jsx`
- [Admin analytics](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/DashboardOverviewAdmin.jsx): `frontend/src/components/components-admin/DashboardOverviewAdmin.jsx`
- [Deduction processing](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/DeductionProcessing.jsx): `frontend/src/components/components-admin/DeductionProcessing.jsx`
- [Delivery history](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/DeliveryHistory.jsx): `frontend/src/components/components-admin/DeliveryHistory.jsx`
- [Transaction history](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/components-admin/TransactionHistory.jsx): `frontend/src/components/components-admin/TransactionHistory.jsx`
- [Employee API client](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/employees.js): `frontend/src/api/employees.js`
- [Product API client](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/products.js): `frontend/src/api/products.js`
- [Category API client](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/categories.js): `frontend/src/api/categories.js`
- [Delivery API client](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/delivery.js): `frontend/src/api/delivery.js`
- [Records API client](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/records.js): `frontend/src/api/records.js`
- [Transaction API client](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/transaction.js): `frontend/src/api/transaction.js`
- [Deductions API client](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/deductions.js): `frontend/src/api/deductions.js`
- [Dashboard API client](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/dashboard.js): `frontend/src/api/dashboard.js`

### Identity and access

- [Sign-in and accounts](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/components/Loginform.jsx): `frontend/src/components/Loginform.jsx`
- [Authentication API client](https://github.com/eth0voidc/eov_system_web_base/blob/main/frontend/src/api/auth.js): `frontend/src/api/auth.js`
- [Authentication routes](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Token and role checks](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/middleware/authMiddleware.js): `backend/middleware/authMiddleware.js`
- [Authentication controller](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`

### Store operations

- [Employee routes](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/employeeRoutes.js): `backend/routes/employeeRoutes.js`
- [Employee management](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/employeeController.js): `backend/controllers/employeeController.js`
- [Product routes](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/productRoutes.js): `backend/routes/productRoutes.js`
- [Product and image management](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/productController.js): `backend/controllers/productController.js`
- [Category routes](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/categoryRoutes.js): `backend/routes/categoryRoutes.js`
- [Category management](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/categoryController.js): `backend/controllers/categoryController.js`
- [Delivery routes](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/routes/deliveryRoutes.js): `backend/routes/deliveryRoutes.js`
- [Delivery management](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/controllers/deliveryController.js): `backend/controllers/deliveryController.js`

### Backend platform

- [Express API server](https://github.com/eth0voidc/eov_system_web_base/blob/main/backend/server.js): `backend/server.js`

### Other components

- **Staff user**
- **Admin user**

## Connections

- Staff user → Role-based app routes: opens (evidence: `frontend/src/App.jsx`)
- Admin user → Role-based app routes: opens (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Sign-in and accounts: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Employee management: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Inventory management: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Staff purchasing: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Delivery intake: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Employee records: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Admin analytics: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Deduction processing: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Delivery history: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app routes → Transaction history: routes to (evidence: `frontend/src/App.jsx`)
- Sign-in and accounts → Authentication API client: calls (evidence: `frontend/src/components/Loginform.jsx`)
- Employee management → Employee API client: calls (evidence: `frontend/src/components/components-admin/RegisterEmployee.jsx`)
- Inventory management → Product API client: calls (evidence: `frontend/src/components/components-admin/InventoryViewAdmin.jsx`)
- Inventory management → Category API client: calls (evidence: `frontend/src/components/components-admin/InventoryViewAdmin.jsx`)
- Staff purchasing → Employee API client: calls (evidence: `frontend/src/components/components-staff/ProductView.jsx`)
- Staff purchasing → Transaction API client: calls (evidence: `frontend/src/components/components-staff/ProductView.jsx`)
- Staff purchasing → Product API client: calls (evidence: `frontend/src/components/components-staff/ProductView.jsx`)
- Staff purchasing → Category API client: calls (evidence: `frontend/src/components/components-staff/ProductView.jsx`)
- Delivery intake → Product API client: calls (evidence: `frontend/src/components/components-staff/DeliveryView.jsx`)
- Delivery intake → Delivery API client: calls (evidence: `frontend/src/components/components-staff/DeliveryView.jsx`)
- Employee records → Employee API client: calls (evidence: `frontend/src/components/components-staff/RecordsView.jsx`)
- Employee records → Records API client: calls (evidence: `frontend/src/components/components-staff/RecordsView.jsx`)
- Admin analytics → Dashboard API client: calls (evidence: `frontend/src/components/components-admin/DashboardOverviewAdmin.jsx`)
- Express API server → Authentication routes: mounts (evidence: `backend/server.js`)
- Express API server → Product routes: mounts (evidence: `backend/server.js`)
- Express API server → Category routes: mounts (evidence: `backend/server.js`)
- Express API server → Employee routes: mounts (evidence: `backend/server.js`)
- Express API server → Delivery routes: mounts (evidence: `backend/server.js`)
- Express API server → Authentication routes: mounts (evidence: `backend/server.js`)
- Express API server → Employee routes: mounts (evidence: `backend/server.js`)
- Express API server → Authentication routes: mounts (evidence: `backend/server.js`)
- Express API server → Authentication routes: mounts (evidence: `backend/server.js`)
- Express API server → Employee routes: mounts (evidence: `backend/server.js`)
- Authentication routes → Authentication controller: dispatches (evidence: `backend/routes/authRoutes.js`)
- Authentication routes → Token and role checks: checks (evidence: `backend/routes/authRoutes.js`)
- Employee routes → Employee management: dispatches (evidence: `backend/routes/employeeRoutes.js`)
- Employee routes → Token and role checks: checks (evidence: `backend/routes/employeeRoutes.js`)
- Product routes → Product and image management: dispatches (evidence: `backend/routes/productRoutes.js`)
- Product routes → Token and role checks: checks (evidence: `backend/routes/productRoutes.js`)
- Delivery routes → Delivery management: dispatches (evidence: `backend/routes/deliveryRoutes.js`)
- Delivery routes → Token and role checks: checks (evidence: `backend/routes/deliveryRoutes.js`)
- Category routes → Category management: dispatches (evidence: `backend/routes/categoryRoutes.js`)
- Category routes → Token and role checks: checks (evidence: `backend/routes/categoryRoutes.js`)
- Product and image management → Product and image management: uploads photos (evidence: `backend/controllers/productController.js`)
