# accessallow/ecapp architecture

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

- Interactive diagram: https://gitdiagram.com/accessallow/ecapp
- Repository: https://github.com/accessallow/ecapp

## Overview

ECApp is a PHP/CodeIgniter ERP application. Users enter through the web interface and work with product and seller records, inventory purchases, bills, Form 49 records, shopping lists, stock warnings, and file attachments. In the sampled code, controllers handle requests and delegate to models; the shared controller also checks activation. The graph retains major capabilities evident in the repository tree, but many controller-to-model and persistence details were not excerpted, so uncertain links are omitted or marked unverified.

Main entry points: [`application/models/product_model.php`](https://github.com/accessallow/ecapp/blob/master/application/models/product_model.php) (Product data access), [`application/controllers/Inventory.php`](https://github.com/accessallow/ecapp/blob/master/application/controllers/Inventory.php) (Inventory purchasing), [`application/controllers/ShoppingList.php`](https://github.com/accessallow/ecapp/blob/master/application/controllers/ShoppingList.php) (Shopping lists), [`application/controllers/Product.php`](https://github.com/accessallow/ecapp/blob/master/application/controllers/Product.php) (Product catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalog and Suppliers"]
  node_product["Product catalog<br/>[Product.php]"]
  node_category["Product categories"]
  node_seller["Seller records<br/>[Seller.php]"]
  node_seller_mapping["Seller product mapping"]
  node_product_data["Product data access<br/>[product_model.php]"]
end

subgraph group_operations["ERP Operations"]
  node_inventory["Inventory purchasing<br/>[Inventory.php]"]
  node_bill["Payment bills<br/>[Bill.php]"]
  node_form49["Form 49 records<br/>[Form49.php]"]
  node_shopping["Shopping lists<br/>[ShoppingList.php]"]
  node_stock["Stock warnings<br/>[StockWarning.php]"]
  node_uploads["File attachments<br/>[FileUpload.php]"]
  node_inventory_data["Inventory data access"]
  node_shopping_data["Shopping-list data access"]
end

subgraph group_platform["Application Platform"]
  node_activation["Product activation<br/>[Activation.php]"]
  node_shared["Shared controller checks<br/>[MY_Controller.php]"]
  node_db[("Configured database<br/>[database.php]")]
end

node_user(("ERP user"))
node_web["Web interface"]

node_user -->|"uses"| node_web
node_web -->|"opens default"| node_product
node_web -->|"navigates to"| node_product
node_web -->|"navigates to"| node_inventory
node_web -->|"navigates to"| node_form49
node_web -->|"navigates to"| node_bill
node_web -->|"navigates to"| node_shopping
node_web -->|"navigates to"| node_stock
node_inventory -->|"calls"| node_inventory_data
node_inventory -->|"reads product"| node_product_data
node_product -->|"calls"| node_product_data
node_shopping -->|"calls"| node_shopping_data
node_shopping -->|"reads product"| node_product_data
node_shared -->|"checks activation"| node_activation
node_product_data -.->|"uses"| node_db
node_inventory_data -.->|"uses"| node_db
node_shopping_data -.->|"uses"| node_db

click node_product "https://github.com/accessallow/ecapp/blob/master/application/controllers/Product.php"
click node_category "https://github.com/accessallow/ecapp/blob/master/application/controllers/Product_category.php"
click node_seller "https://github.com/accessallow/ecapp/blob/master/application/controllers/Seller.php"
click node_seller_mapping "https://github.com/accessallow/ecapp/blob/master/application/controllers/Product_seller_mapping.php"
click node_inventory "https://github.com/accessallow/ecapp/blob/master/application/controllers/Inventory.php"
click node_bill "https://github.com/accessallow/ecapp/blob/master/application/controllers/Bill.php"
click node_form49 "https://github.com/accessallow/ecapp/blob/master/application/controllers/Form49.php"
click node_shopping "https://github.com/accessallow/ecapp/blob/master/application/controllers/ShoppingList.php"
click node_stock "https://github.com/accessallow/ecapp/blob/master/application/controllers/StockWarning.php"
click node_uploads "https://github.com/accessallow/ecapp/blob/master/application/controllers/FileUpload.php"
click node_activation "https://github.com/accessallow/ecapp/blob/master/application/controllers/Activation.php"
click node_shared "https://github.com/accessallow/ecapp/blob/master/application/core/MY_Controller.php"
click node_product_data "https://github.com/accessallow/ecapp/blob/master/application/models/product_model.php"
click node_inventory_data "https://github.com/accessallow/ecapp/blob/master/application/models/inventory_model.php"
click node_shopping_data "https://github.com/accessallow/ecapp/blob/master/application/models/shopping_list_model.php"
click node_db "https://github.com/accessallow/ecapp/blob/master/application/config/database.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_product,node_category,node_seller,node_seller_mapping,node_product_data,node_user toneBlue
class node_inventory,node_bill,node_form49,node_shopping,node_stock,node_uploads,node_inventory_data,node_shopping_data toneAmber
class node_activation,node_shared,node_db toneMint
class node_web toneIndigo
```

## Components

### Catalog and Suppliers

- [Product catalog](https://github.com/accessallow/ecapp/blob/master/application/controllers/Product.php): `application/controllers/Product.php`
- [Product categories](https://github.com/accessallow/ecapp/blob/master/application/controllers/Product_category.php): `application/controllers/Product_category.php`
- [Seller records](https://github.com/accessallow/ecapp/blob/master/application/controllers/Seller.php): `application/controllers/Seller.php`
- [Seller product mapping](https://github.com/accessallow/ecapp/blob/master/application/controllers/Product_seller_mapping.php): `application/controllers/Product_seller_mapping.php`
- [Product data access](https://github.com/accessallow/ecapp/blob/master/application/models/product_model.php): `application/models/product_model.php`

### ERP Operations

- [Inventory purchasing](https://github.com/accessallow/ecapp/blob/master/application/controllers/Inventory.php): `application/controllers/Inventory.php`
- [Payment bills](https://github.com/accessallow/ecapp/blob/master/application/controllers/Bill.php): `application/controllers/Bill.php`
- [Form 49 records](https://github.com/accessallow/ecapp/blob/master/application/controllers/Form49.php): `application/controllers/Form49.php`
- [Shopping lists](https://github.com/accessallow/ecapp/blob/master/application/controllers/ShoppingList.php): `application/controllers/ShoppingList.php`
- [Stock warnings](https://github.com/accessallow/ecapp/blob/master/application/controllers/StockWarning.php): `application/controllers/StockWarning.php`
- [File attachments](https://github.com/accessallow/ecapp/blob/master/application/controllers/FileUpload.php): `application/controllers/FileUpload.php`
- [Inventory data access](https://github.com/accessallow/ecapp/blob/master/application/models/inventory_model.php): `application/models/inventory_model.php`
- [Shopping-list data access](https://github.com/accessallow/ecapp/blob/master/application/models/shopping_list_model.php): `application/models/shopping_list_model.php`

### Application Platform

- [Product activation](https://github.com/accessallow/ecapp/blob/master/application/controllers/Activation.php): `application/controllers/Activation.php`
- [Shared controller checks](https://github.com/accessallow/ecapp/blob/master/application/core/MY_Controller.php): `application/core/MY_Controller.php`
- [Configured database](https://github.com/accessallow/ecapp/blob/master/application/config/database.php): `application/config/database.php`

### Other components

- **ERP user**
- **Web interface**

## Connections

- ERP user → Web interface: uses
- Web interface → Product catalog: opens default
- Web interface → Product catalog: navigates to
- Web interface → Inventory purchasing: navigates to
- Web interface → Form 49 records: navigates to
- Web interface → Payment bills: navigates to
- Web interface → Shopping lists: navigates to
- Web interface → Stock warnings: navigates to
- Inventory purchasing → Inventory data access: calls (evidence: `application/controllers/Inventory.php`)
- Inventory purchasing → Product data access: reads product (evidence: `application/controllers/Inventory.php`)
- Product catalog → Product data access: calls (evidence: `application/controllers/Product.php`)
- Shopping lists → Shopping-list data access: calls (evidence: `application/controllers/ShoppingList.php`)
- Shopping lists → Product data access: reads product (evidence: `application/controllers/ShoppingList.php`)
- Shared controller checks → Product activation: checks activation (evidence: `application/core/MY_Controller.php`)
- Product data access → Configured database: uses
- Inventory data access → Configured database: uses
- Shopping-list data access → Configured database: uses
