# rhems95/pecit-smart-inventory-system architecture

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

- Interactive diagram: https://gitdiagram.com/rhems95/pecit-smart-inventory-system
- Repository: https://github.com/rhems95/pecit-smart-inventory-system

## Overview

PSIS is a Laravel school inventory and requisition system. Faculty requests pass through accounting review and admission/admin approval before supply release; student purchases pass through shop checkout, payment and accounting verification before release. Both workflows reserve stock before release, when on-hand quantities are deducted and movements logged. The map also includes inventory operations, reporting, notifications, and AI-assisted insights documented in the README. Several controllers and services are represented from README-described capabilities; their internal wiring was not fully sampled.

Main entry points: [`app/Services/SupplyRequestService.php`](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/SupplyRequestService.php) (Request Workflow), [`app/Services/InventoryService.php`](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/InventoryService.php) (Stock and Reservations), [`app/Http/Controllers/SupplyOperationsController.php`](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/SupplyOperationsController.php) (Supply Operations), [`app/Http/Controllers/AccountingController.php`](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/AccountingController.php) (Accounting Review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflows["Requests and Purchases"]
  node_faculty_requests["Faculty Requests"]
  node_purchases["Student Purchases"]
  node_shop["Uniform Shop<br/>[ShopController.php]"]
  node_request_service["Request Workflow"]
  node_purchase_service["Purchase Workflow"]
end

subgraph group_stock["Inventory Operations"]
  node_inventory_ui["Inventory Management"]
  node_supply_ops["Supply Operations"]
  node_inventory_service["Stock and Reservations"]
  node_stock_cards["Stock Cards"]
  node_inventory_data[("Inventory and Movements<br/>[Inventory.php]")]
end

subgraph group_oversight["Administration and Reporting"]
  node_accounting_ui["Accounting Review"]
  node_admin_ui["Administration"]
  node_reports["Reports"]
  node_audit["Audit Logging"]
end

subgraph group_insights["Notifications and AI"]
  node_notifications["Notifications"]
  node_ai["AI Insights"]
  node_dashboard["Dashboard"]
  node_ollama{{"Ollama"}}
end

subgraph group_core["Application Core"]
  node_auth["Authentication"]
end

node_faculty(("Faculty"))
node_student(("Student"))
node_accounting(("Accounting"))
node_admission(("Admission / Admin"))
node_supply_staff(("Supply Personnel"))

node_faculty -->|"submits requests"| node_faculty_requests
node_faculty_requests -->|"manages workflow"| node_request_service
node_accounting -->|"reviews requests"| node_accounting_ui
node_accounting_ui -->|"reviews"| node_request_service
node_admission -->|"approves requests"| node_request_service
node_student -->|"browses and carts"| node_shop
node_shop -->|"checks out"| node_purchases
node_student -->|"submits purchase"| node_purchases
node_accounting -->|"verifies payments"| node_accounting_ui
node_accounting_ui -->|"verifies"| node_purchase_service
node_supply_staff -->|"releases items"| node_supply_ops
node_supply_ops -->|"releases requests"| node_request_service
node_supply_ops -->|"releases purchases"| node_purchase_service
node_request_service -->|"reserves and releases"| node_inventory_service
node_purchase_service -->|"reserves and releases"| node_inventory_service
node_inventory_ui -->|"records stock changes"| node_inventory_service
node_supply_ops -->|"records movements"| node_inventory_service
node_inventory_service -->|"updates stock"| node_inventory_data
node_inventory_ui -->|"requests history"| node_stock_cards
node_stock_cards -->|"reads movements"| node_inventory_data
node_accounting -->|"accesses reports"| node_reports
node_admission -->|"manages departments"| node_admin_ui
node_admin_ui -->|"records changes"| node_audit
node_auth -->|"records login events"| node_audit
node_dashboard -->|"shows insights"| node_ai
node_ai -.->|"requests chat wording"| node_ollama
node_notifications -->|"notifies"| node_student
node_notifications -->|"notifies"| node_faculty

click node_faculty_requests "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/FacultyRequestController.php"
click node_purchases "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/PurchaseController.php"
click node_shop "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/ShopController.php"
click node_request_service "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/SupplyRequestService.php"
click node_purchase_service "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/PurchaseRequestService.php"
click node_inventory_ui "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/InventoryController.php"
click node_supply_ops "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/SupplyOperationsController.php"
click node_inventory_service "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/InventoryService.php"
click node_stock_cards "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/StockCardService.php"
click node_inventory_data "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Models/Inventory.php"
click node_accounting_ui "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/AccountingController.php"
click node_admin_ui "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/Admin/DepartmentController.php"
click node_reports "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/ReportController.php"
click node_audit "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/AuditLogService.php"
click node_notifications "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/NotificationService.php"
click node_ai "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/AiInsightService.php"
click node_dashboard "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/DashboardController.php"
click node_auth "https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.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_faculty_requests,node_purchases,node_shop,node_request_service,node_purchase_service toneBlue
class node_inventory_ui,node_supply_ops,node_inventory_service,node_stock_cards,node_inventory_data toneAmber
class node_accounting_ui,node_admin_ui,node_reports,node_audit toneMint
class node_notifications,node_ai,node_dashboard,node_ollama toneRose
class node_auth,node_faculty,node_student,node_accounting,node_admission,node_supply_staff toneIndigo
```

## Components

### Requests and Purchases

- [Faculty Requests](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/FacultyRequestController.php): `app/Http/Controllers/FacultyRequestController.php`
- [Student Purchases](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/PurchaseController.php): `app/Http/Controllers/PurchaseController.php`
- [Uniform Shop](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/ShopController.php): `app/Http/Controllers/ShopController.php`
- [Request Workflow](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/SupplyRequestService.php): `app/Services/SupplyRequestService.php`
- [Purchase Workflow](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/PurchaseRequestService.php): `app/Services/PurchaseRequestService.php`

### Inventory Operations

- [Inventory Management](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/InventoryController.php): `app/Http/Controllers/InventoryController.php`
- [Supply Operations](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/SupplyOperationsController.php): `app/Http/Controllers/SupplyOperationsController.php`
- [Stock and Reservations](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/InventoryService.php): `app/Services/InventoryService.php`
- [Stock Cards](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/StockCardService.php): `app/Services/StockCardService.php`
- [Inventory and Movements](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Models/Inventory.php): `app/Models/Inventory.php`

### Administration and Reporting

- [Accounting Review](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/AccountingController.php): `app/Http/Controllers/AccountingController.php`
- [Administration](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/Admin/DepartmentController.php): `app/Http/Controllers/Admin/DepartmentController.php`
- [Reports](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/ReportController.php): `app/Http/Controllers/ReportController.php`
- [Audit Logging](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/AuditLogService.php): `app/Services/AuditLogService.php`

### Notifications and AI

- [Notifications](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/NotificationService.php): `app/Services/NotificationService.php`
- [AI Insights](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Services/AiInsightService.php): `app/Services/AiInsightService.php`
- [Dashboard](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- **Ollama**

### Application Core

- [Authentication](https://github.com/rhems95/pecit-smart-inventory-system/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`

### Other components

- **Faculty**
- **Student**
- **Accounting**
- **Admission / Admin**
- **Supply Personnel**

## Connections

- Faculty → Faculty Requests: submits requests
- Faculty Requests → Request Workflow: manages workflow
- Accounting → Accounting Review: reviews requests
- Accounting Review → Request Workflow: reviews
- Admission / Admin → Request Workflow: approves requests
- Student → Uniform Shop: browses and carts
- Uniform Shop → Student Purchases: checks out
- Student → Student Purchases: submits purchase
- Accounting → Accounting Review: verifies payments
- Accounting Review → Purchase Workflow: verifies
- Supply Personnel → Supply Operations: releases items
- Supply Operations → Request Workflow: releases requests
- Supply Operations → Purchase Workflow: releases purchases
- Request Workflow → Stock and Reservations: reserves and releases
- Purchase Workflow → Stock and Reservations: reserves and releases
- Inventory Management → Stock and Reservations: records stock changes
- Supply Operations → Stock and Reservations: records movements
- Stock and Reservations → Inventory and Movements: updates stock
- Inventory Management → Stock Cards: requests history
- Stock Cards → Inventory and Movements: reads movements
- Accounting → Reports: accesses reports
- Admission / Admin → Administration: manages departments
- Administration → Audit Logging: records changes
- Authentication → Audit Logging: records login events
- Dashboard → AI Insights: shows insights
- AI Insights → Ollama: requests chat wording
- Notifications → Student: notifies
- Notifications → Faculty: notifies
