How justin-bonete/pos-system works
This is a PHP/MySQL point-of-sale application. Staff authenticate, enter the dashboard, manage products and stock, and create sales; sales and inventory activity are then available through history and reporting views. The README also documents categories, QR generation and scanning, low-stock alerts, and a REST API. Several API and dashboard routes are listed but unsampled, so links involving them are omitted unless supported by the README or source index.
Main entry points: Product.php Product catalog · Sale.php Sales records · SalesManager.php Sales operations · index.php Dashboard
Components 23
Access and dashboard
- Sign-in
views/auth/login.php - Dashboard
views/dashboard/index.php - Session access
includes/auth.php - Page layout
views/layouts/header.php
Catalog and inventory
- Product management
views/products/add.php - Category management
views/categories/list.php - Product catalog
classes/Product.php - Categories
classes/Category.php - Stock history
classes/ProductHistory.php - QR generation
classes/QRGenerator.php - Barcode lookup
views/school/search_barcode.php
Sales and reporting
- Point of sale
views/sales/new.php - Sales history
views/sales/history.php - Reports
views/reports/index.php - Sales records
classes/Sale.php - Sales operations
classes/SalesManager.php - Order completion API
api/sales/complete-order.php - REST API
api
Shared services
- Validation
classes/Validator.php - Sale discounts
includes/sale_discount.php - Database access
classes/database.php - MySQL connection
config/database.php
Other components
- Staff
Connections 28
- Staff → Sign-in: signs in
- Staff → Dashboard: uses
- Sign-in → Session access: checks session
- Dashboard → Session access: checks access
views/dashboard/index.php - Dashboard → Point of sale: opens sale
views/dashboard/index.php - Dashboard → Sales history: opens history
views/dashboard/index.php - Product management → Product catalog: manages
views/products/add.php - Product management → Categories: loads categories
views/products/add.php - Category management → Categories: manages
views/categories/list.php - Product catalog → Stock history: logs changes
classes/Product.php - Barcode lookup → Product catalog: looks up
views/school/search_barcode.php - Point of sale → Product catalog: uses catalog
views/sales/new.php - Point of sale → Sales records: records sale
views/sales/new.php - Point of sale → Stock history: tracks stock
views/sales/new.php - Sales history → Sales records: reads history
views/sales/history.php - Reports → Sales records: reads sales
views/reports/index.php - Sales operations → Product catalog: checks stock
classes/SalesManager.php - Sales operations → Sales records: records sales
classes/SalesManager.php - Sales operations → Validation: validates reports
classes/SalesManager.php - Order completion API → Product catalog: updates stock
api/sales/complete-order.php - Order completion API → Stock history: logs stock
api/sales/complete-order.php - Order completion API → Sales records: completes order
api/sales/complete-order.php - REST API → Staff: serves operations
- Sales records → Sale discounts: uses rules
classes/Sale.php - Categories → Database access: uses connection
classes/Category.php - Sales operations → Database access: uses connection
classes/SalesManager.php - Database access → MySQL connection: gets PDO
classes/database.php - QR generation → Product catalog: generates codes