# ventaverse/ventasync architecture

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

- Interactive diagram: https://gitdiagram.com/ventaverse/ventasync
- Repository: https://github.com/ventaverse/ventasync

## Overview

VentaSync is a self-hosted, multi-marketplace ERP. Sellers manage a shared product catalog and inventory, connect channel extensions to list products and synchronize stock/prices, then consolidate marketplace orders for fulfillment and profitability tracking. Separate product branches include purchasing, reporting, dashboard/search, mobile/API access, and user permissions. Extension registry and contracts form the internal integration layer. README documents several integrations whose implementation details were not sampled, so their internal call wiring is not expanded here.

Main entry points: [`app/Integrations/IntegrationRegistry.php`](https://github.com/ventaverse/ventasync/blob/main/app/Integrations/IntegrationRegistry.php) (Channel Extensions), [`app/Http/Controllers/Sales/OrderController.php`](https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Sales/OrderController.php) (Unified Orders), [`app/Http/Controllers/Catalog/ProductController.php`](https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Catalog/ProductController.php) (Product Catalog), [`app/Services/OrderFetchRunner.php`](https://github.com/ventaverse/ventasync/blob/main/app/Services/OrderFetchRunner.php) (Order Fetch Runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["ERP Core"]
  node_catalog["Product Catalog"]
  node_catalogdata[("Catalog Records<br/>[Product.php]")]
  node_inventory["Inventory and Stock"]
end

subgraph group_channels["Marketplace Channels"]
  node_channels["Channel Extensions"]
  node_lazada["Lazada Integration"]
  node_shopee["Shopee Integration"]
  node_tiktok["TikTok Integration"]
  node_venta["Venta Integration"]
  node_pedallion["Pedallion Integration"]
  node_opencart["OpenCart Integration"]
  node_shopify["Shopify Integration"]
end

subgraph group_operations["Sales Operations"]
  node_orders["Unified Orders"]
  node_orderfetch["Order Fetch Runner"]
  node_fulfilment["Order Fulfilment"]
  node_profit["Order Profitability<br/>[OrderProfit.php]"]
end

subgraph group_insights["Insights and Access"]
  node_dashboard["Dashboard"]
  node_search["Global Search"]
  node_api["REST and Mobile API"]
  node_permissions["Users and Permissions"]
end

subgraph group_addons["Business Add-ons"]
  node_purchasing["Purchasing"]
  node_reports["Reports"]
end

node_seller(("Seller"))
node_marketplaces{{"Marketplace APIs"}}
node_store[("ERP Database")]
node_vendors(("Vendors"))

node_seller -->|"manages"| node_catalog
node_catalog -->|"writes catalog"| node_catalogdata
node_catalog -->|"edits stock"| node_inventory
node_catalogdata -->|"persists"| node_store
node_seller -->|"connects stores"| node_channels
node_channels -->|"registers"| node_lazada
node_channels -->|"registers"| node_shopee
node_channels -->|"registers"| node_tiktok
node_channels -->|"registers"| node_venta
node_channels -->|"registers"| node_pedallion
node_channels -->|"registers"| node_opencart
node_channels -.->|"registers"| node_shopify
node_lazada -->|"syncs listings"| node_marketplaces
node_shopee -->|"syncs listings"| node_marketplaces
node_tiktok -->|"syncs listings"| node_marketplaces
node_pedallion -->|"syncs products"| node_marketplaces
node_opencart -->|"syncs reviews"| node_marketplaces
node_shopify -.->|"syncs stores"| node_marketplaces
node_seller -->|"starts sync"| node_orderfetch
node_orderfetch -->|"fetches orders"| node_orders
node_orderfetch -->|"requests orders"| node_marketplaces
node_orders -->|"reads and writes"| node_store
node_orders -->|"deducts stock"| node_inventory
node_seller -->|"fulfills orders"| node_fulfilment
node_fulfilment -->|"reads orders"| node_orders
node_orders -->|"provides order data"| node_profit
node_seller -->|"manages POs"| node_purchasing
node_purchasing -->|"selects vendors"| node_vendors
node_purchasing -->|"records purchases"| node_store
node_seller -->|"runs reports"| node_reports
node_reports -->|"reads ERP data"| node_store
node_reports -->|"uses profitability"| node_profit
node_seller -->|"views dashboard"| node_dashboard
node_dashboard -->|"reads metrics"| node_store
node_seller -->|"searches records"| node_search
node_search -->|"queries catalog and orders"| node_store
node_seller -->|"uses API"| node_api
node_api -->|"reads and writes"| node_store
node_seller -->|"administers access"| node_permissions
node_permissions -->|"stores access rules"| node_store

click node_catalog "https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Catalog/ProductController.php"
click node_catalogdata "https://github.com/ventaverse/ventasync/blob/main/app/Models/Catalog/Product.php"
click node_inventory "https://github.com/ventaverse/ventasync/blob/main/app/Services/OrderStockService.php"
click node_channels "https://github.com/ventaverse/ventasync/blob/main/app/Integrations/IntegrationRegistry.php"
click node_lazada "https://github.com/ventaverse/ventasync/blob/main/extensions/lazada/Controllers/LazadaProductController.php"
click node_shopee "https://github.com/ventaverse/ventasync/blob/main/extensions/shopee/Controllers/ShopeeProductController.php"
click node_tiktok "https://github.com/ventaverse/ventasync/blob/main/extensions/tiktok/Controllers/TikTokProductController.php"
click node_venta "https://github.com/ventaverse/ventasync/blob/main/extensions/venta/Controllers/VentaReviewController.php"
click node_pedallion "https://github.com/ventaverse/ventasync/blob/main/extensions/pedallion/Controllers/PedallionProductController.php"
click node_opencart "https://github.com/ventaverse/ventasync/blob/main/extensions/opencart/Controllers/ReviewController.php"
click node_shopify "https://github.com/ventaverse/ventasync/tree/main/extensions"
click node_orders "https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Sales/OrderController.php"
click node_orderfetch "https://github.com/ventaverse/ventasync/blob/main/app/Services/OrderFetchRunner.php"
click node_fulfilment "https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Fulfilment/OrderPrintController.php"
click node_profit "https://github.com/ventaverse/ventasync/blob/main/app/Services/Orders/OrderProfit.php"
click node_purchasing "https://github.com/ventaverse/ventasync/blob/main/extensions/purchasing/Controllers/PurchaseOrderController.php"
click node_reports "https://github.com/ventaverse/ventasync/blob/main/extensions/reports/Controllers/ReportController.php"
click node_dashboard "https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/DashboardController.php"
click node_search "https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/SearchController.php"
click node_api "https://github.com/ventaverse/ventasync/tree/main/app/Http/Controllers/Api"
click node_permissions "https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Settings/UserGroupController.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_catalog,node_catalogdata,node_inventory toneBlue
class node_channels,node_lazada,node_shopee,node_tiktok,node_venta,node_pedallion,node_opencart,node_shopify,node_store toneAmber
class node_orders,node_orderfetch,node_fulfilment,node_profit,node_marketplaces toneMint
class node_dashboard,node_search,node_api,node_permissions toneRose
class node_purchasing,node_reports,node_seller,node_vendors toneIndigo
```

## Components

### ERP Core

- [Product Catalog](https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Catalog/ProductController.php): `app/Http/Controllers/Catalog/ProductController.php`
- [Catalog Records](https://github.com/ventaverse/ventasync/blob/main/app/Models/Catalog/Product.php): `app/Models/Catalog/Product.php`
- [Inventory and Stock](https://github.com/ventaverse/ventasync/blob/main/app/Services/OrderStockService.php): `app/Services/OrderStockService.php`

### Marketplace Channels

- [Channel Extensions](https://github.com/ventaverse/ventasync/blob/main/app/Integrations/IntegrationRegistry.php): `app/Integrations/IntegrationRegistry.php`
- [Lazada Integration](https://github.com/ventaverse/ventasync/blob/main/extensions/lazada/Controllers/LazadaProductController.php): `extensions/lazada/Controllers/LazadaProductController.php`
- [Shopee Integration](https://github.com/ventaverse/ventasync/blob/main/extensions/shopee/Controllers/ShopeeProductController.php): `extensions/shopee/Controllers/ShopeeProductController.php`
- [TikTok Integration](https://github.com/ventaverse/ventasync/blob/main/extensions/tiktok/Controllers/TikTokProductController.php): `extensions/tiktok/Controllers/TikTokProductController.php`
- [Venta Integration](https://github.com/ventaverse/ventasync/blob/main/extensions/venta/Controllers/VentaReviewController.php): `extensions/venta/Controllers/VentaReviewController.php`
- [Pedallion Integration](https://github.com/ventaverse/ventasync/blob/main/extensions/pedallion/Controllers/PedallionProductController.php): `extensions/pedallion/Controllers/PedallionProductController.php`
- [OpenCart Integration](https://github.com/ventaverse/ventasync/blob/main/extensions/opencart/Controllers/ReviewController.php): `extensions/opencart/Controllers/ReviewController.php`
- [Shopify Integration](https://github.com/ventaverse/ventasync/tree/main/extensions): `extensions`

### Sales Operations

- [Unified Orders](https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Sales/OrderController.php): `app/Http/Controllers/Sales/OrderController.php`
- [Order Fetch Runner](https://github.com/ventaverse/ventasync/blob/main/app/Services/OrderFetchRunner.php): `app/Services/OrderFetchRunner.php`
- [Order Fulfilment](https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Fulfilment/OrderPrintController.php): `app/Http/Controllers/Fulfilment/OrderPrintController.php`
- [Order Profitability](https://github.com/ventaverse/ventasync/blob/main/app/Services/Orders/OrderProfit.php): `app/Services/Orders/OrderProfit.php`

### Insights and Access

- [Dashboard](https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Global Search](https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/SearchController.php): `app/Http/Controllers/SearchController.php`
- [REST and Mobile API](https://github.com/ventaverse/ventasync/tree/main/app/Http/Controllers/Api): `app/Http/Controllers/Api`
- [Users and Permissions](https://github.com/ventaverse/ventasync/blob/main/app/Http/Controllers/Settings/UserGroupController.php): `app/Http/Controllers/Settings/UserGroupController.php`

### Business Add-ons

- [Purchasing](https://github.com/ventaverse/ventasync/blob/main/extensions/purchasing/Controllers/PurchaseOrderController.php): `extensions/purchasing/Controllers/PurchaseOrderController.php`
- [Reports](https://github.com/ventaverse/ventasync/blob/main/extensions/reports/Controllers/ReportController.php): `extensions/reports/Controllers/ReportController.php`

### Other components

- **Seller**
- **Marketplace APIs**
- **ERP Database**
- **Vendors**

## Connections

- Seller → Product Catalog: manages
- Product Catalog → Catalog Records: writes catalog
- Product Catalog → Inventory and Stock: edits stock
- Catalog Records → ERP Database: persists
- Seller → Channel Extensions: connects stores
- Channel Extensions → Lazada Integration: registers
- Channel Extensions → Shopee Integration: registers
- Channel Extensions → TikTok Integration: registers
- Channel Extensions → Venta Integration: registers
- Channel Extensions → Pedallion Integration: registers
- Channel Extensions → OpenCart Integration: registers
- Channel Extensions → Shopify Integration: registers
- Lazada Integration → Marketplace APIs: syncs listings
- Shopee Integration → Marketplace APIs: syncs listings
- TikTok Integration → Marketplace APIs: syncs listings
- Pedallion Integration → Marketplace APIs: syncs products
- OpenCart Integration → Marketplace APIs: syncs reviews
- Shopify Integration → Marketplace APIs: syncs stores
- Seller → Order Fetch Runner: starts sync
- Order Fetch Runner → Unified Orders: fetches orders
- Order Fetch Runner → Marketplace APIs: requests orders
- Unified Orders → ERP Database: reads and writes
- Unified Orders → Inventory and Stock: deducts stock
- Seller → Order Fulfilment: fulfills orders
- Order Fulfilment → Unified Orders: reads orders
- Unified Orders → Order Profitability: provides order data
- Seller → Purchasing: manages POs
- Purchasing → Vendors: selects vendors
- Purchasing → ERP Database: records purchases
- Seller → Reports: runs reports
- Reports → ERP Database: reads ERP data
- Reports → Order Profitability: uses profitability
- Seller → Dashboard: views dashboard
- Dashboard → ERP Database: reads metrics
- Seller → Global Search: searches records
- Global Search → ERP Database: queries catalog and orders
- Seller → REST and Mobile API: uses API
- REST and Mobile API → ERP Database: reads and writes
- Seller → Users and Permissions: administers access
- Users and Permissions → ERP Database: stores access rules
