# ronknight/inventorysystem architecture

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

- Interactive diagram: https://gitdiagram.com/ronknight/inventorysystem
- Repository: https://github.com/ronknight/inventorysystem

## Overview

Inventory System is a PHP/CodeIgniter web application for managing stock-related records. An administrator signs in, then uses the application’s management screens for users, groups, catalog data, stores, and orders; reports summarize yearly sales. The README documents these capabilities, while the excerpts show login validation and order operations. Most application controllers and models were not sampled, so their internal call relationships are left unverified. The graph includes the framework’s documented request-routing entry points but omits framework internals unrelated to the product workflow.

Main entry points: [`application/config/database.php`](https://github.com/ronknight/inventorysystem/blob/master/application/config/database.php) (MySQL Database), [`application/controllers/Auth.php`](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Auth.php) (Authentication), [`application/controllers/Dashboard.php`](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Dashboard.php) (Dashboard), [`application/models/Model_auth.php`](https://github.com/ronknight/inventorysystem/blob/master/application/models/Model_auth.php) (Credential Model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Dashboard"]
  node_auth["Authentication<br/>[Auth.php]"]
  node_authmodel["Credential Model<br/>[Model_auth.php]"]
  node_loginview["Login Screen<br/>[login.php]"]
  node_dashboard["Dashboard<br/>[Dashboard.php]"]
end

subgraph group_catalog["Inventory Catalog"]
  node_products["Product Management<br/>[Products.php]"]
  node_attributes["Attribute Management<br/>[Attributes.php]"]
  node_brands["Brand Management<br/>[Brands.php]"]
  node_categories["Category Management<br/>[Category.php]"]
  node_stores["Store Management<br/>[Stores.php]"]
end

subgraph group_operations["Operations and Reporting"]
  node_orders["Order Management<br/>[Orders.php]"]
  node_reports["Sales Reports<br/>[Reports.php]"]
end

subgraph group_administration["Administration"]
  node_users["User Management<br/>[Users.php]"]
  node_groups["Group Management<br/>[Groups.php]"]
  node_company["Company Settings<br/>[Company.php]"]
end

node_admin(("Administrator"))
node_database[("MySQL Database<br/>[database.php]")]
node_front["HTTP Entry Point<br/>[index.php]"]
node_framework["CodeIgniter Bootstrap<br/>[CodeIgniter.php]"]
node_router["Request Router<br/>[Router.php]"]

node_admin -->|"submits credentials"| node_auth
node_auth -->|"checks credentials"| node_authmodel
node_auth -->|"renders login"| node_loginview
node_auth -->|"redirects after login"| node_dashboard
node_admin -.->|"views dashboard"| node_dashboard
node_admin -->|"manages products"| node_products
node_admin -->|"manages attributes"| node_attributes
node_admin -->|"manages brands"| node_brands
node_admin -->|"manages categories"| node_categories
node_admin -->|"manages stores"| node_stores
node_admin -->|"manages orders"| node_orders
node_admin -->|"views sales"| node_reports
node_admin -->|"manages users"| node_users
node_admin -->|"manages groups"| node_groups
node_admin -->|"updates company"| node_company
node_front -->|"starts application"| node_framework
node_framework -->|"loads router"| node_router
node_router -.->|"routes requests"| node_dashboard
node_authmodel -.->|"queries credentials"| node_database
node_products -.->|"reads and writes"| node_database
node_attributes -.->|"reads and writes"| node_database
node_brands -.->|"reads and writes"| node_database
node_categories -.->|"reads and writes"| node_database
node_stores -.->|"reads and writes"| node_database
node_orders -.->|"reads and writes"| node_database
node_reports -.->|"reads sales"| node_database
node_users -.->|"reads and writes"| node_database
node_groups -.->|"reads and writes"| node_database
node_company -.->|"reads and writes"| node_database

click node_auth "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Auth.php"
click node_authmodel "https://github.com/ronknight/inventorysystem/blob/master/application/models/Model_auth.php"
click node_loginview "https://github.com/ronknight/inventorysystem/blob/master/application/views/login.php"
click node_dashboard "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Dashboard.php"
click node_products "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Products.php"
click node_attributes "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Attributes.php"
click node_brands "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Brands.php"
click node_categories "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Category.php"
click node_stores "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Stores.php"
click node_orders "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Orders.php"
click node_reports "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Reports.php"
click node_users "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Users.php"
click node_groups "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Groups.php"
click node_company "https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Company.php"
click node_database "https://github.com/ronknight/inventorysystem/blob/master/application/config/database.php"
click node_front "https://github.com/ronknight/inventorysystem/blob/master/index.php"
click node_framework "https://github.com/ronknight/inventorysystem/blob/master/system/core/CodeIgniter.php"
click node_router "https://github.com/ronknight/inventorysystem/blob/master/system/core/Router.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_auth,node_authmodel,node_loginview,node_dashboard toneBlue
class node_products,node_attributes,node_brands,node_categories,node_stores,node_database toneAmber
class node_orders,node_reports,node_router toneMint
class node_users,node_groups,node_company toneRose
class node_admin toneIndigo
class node_front,node_framework toneTeal
```

## Components

### Access and Dashboard

- [Authentication](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Auth.php): `application/controllers/Auth.php`
- [Credential Model](https://github.com/ronknight/inventorysystem/blob/master/application/models/Model_auth.php): `application/models/Model_auth.php`
- [Login Screen](https://github.com/ronknight/inventorysystem/blob/master/application/views/login.php): `application/views/login.php`
- [Dashboard](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Dashboard.php): `application/controllers/Dashboard.php`

### Inventory Catalog

- [Product Management](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Products.php): `application/controllers/Products.php`
- [Attribute Management](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Attributes.php): `application/controllers/Attributes.php`
- [Brand Management](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Brands.php): `application/controllers/Brands.php`
- [Category Management](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Category.php): `application/controllers/Category.php`
- [Store Management](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Stores.php): `application/controllers/Stores.php`

### Operations and Reporting

- [Order Management](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Orders.php): `application/controllers/Orders.php`
- [Sales Reports](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Reports.php): `application/controllers/Reports.php`

### Administration

- [User Management](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Users.php): `application/controllers/Users.php`
- [Group Management](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Groups.php): `application/controllers/Groups.php`
- [Company Settings](https://github.com/ronknight/inventorysystem/blob/master/application/controllers/Company.php): `application/controllers/Company.php`

### Other components

- **Administrator**
- [MySQL Database](https://github.com/ronknight/inventorysystem/blob/master/application/config/database.php): `application/config/database.php`
- [HTTP Entry Point](https://github.com/ronknight/inventorysystem/blob/master/index.php): `index.php`
- [CodeIgniter Bootstrap](https://github.com/ronknight/inventorysystem/blob/master/system/core/CodeIgniter.php): `system/core/CodeIgniter.php`
- [Request Router](https://github.com/ronknight/inventorysystem/blob/master/system/core/Router.php): `system/core/Router.php`

## Connections

- Administrator → Authentication: submits credentials (evidence: `application/controllers/Auth.php`)
- Authentication → Credential Model: checks credentials (evidence: `application/controllers/Auth.php`)
- Authentication → Login Screen: renders login (evidence: `application/controllers/Auth.php`)
- Authentication → Dashboard: redirects after login (evidence: `application/controllers/Auth.php`)
- Administrator → Dashboard: views dashboard (evidence: `README.md`)
- Administrator → Product Management: manages products (evidence: `README.md`)
- Administrator → Attribute Management: manages attributes (evidence: `README.md`)
- Administrator → Brand Management: manages brands (evidence: `README.md`)
- Administrator → Category Management: manages categories (evidence: `README.md`)
- Administrator → Store Management: manages stores (evidence: `README.md`)
- Administrator → Order Management: manages orders (evidence: `README.md`)
- Administrator → Sales Reports: views sales (evidence: `README.md`)
- Administrator → User Management: manages users (evidence: `README.md`)
- Administrator → Group Management: manages groups (evidence: `README.md`)
- Administrator → Company Settings: updates company (evidence: `README.md`)
- HTTP Entry Point → CodeIgniter Bootstrap: starts application (evidence: `index.php`)
- CodeIgniter Bootstrap → Request Router: loads router (evidence: `system/core/CodeIgniter.php`)
- Request Router → Dashboard: routes requests
- Credential Model → MySQL Database: queries credentials
- Product Management → MySQL Database: reads and writes
- Attribute Management → MySQL Database: reads and writes
- Brand Management → MySQL Database: reads and writes
- Category Management → MySQL Database: reads and writes
- Store Management → MySQL Database: reads and writes
- Order Management → MySQL Database: reads and writes
- Sales Reports → MySQL Database: reads sales
- User Management → MySQL Database: reads and writes
- Group Management → MySQL Database: reads and writes
- Company Settings → MySQL Database: reads and writes
