How savagedirane/pos-system works
This is a PHP/MySQL point-of-sale web application. Its documented workflow is staff-facing: users enter through the web router, access POS and management pages or API endpoints, and conduct retail operations backed by application data. The checked-in runtime supports routing, views, product/user models, database access, and shared security, logging, and response helpers. The README describes broader sales, inventory, CRM, purchasing, reporting, returns, and chatbot capabilities, but their implementation files are absent from the supplied tree; those branches are shown as documented subsystems, not asserted call chains.
Main entry points: index.php Request router · database_schema.sql MySQL POS data · LoggerHelper.php Audit logging · main.js Browser utilities
Components 24
Web entry
- Request router
index.php - Page views
app/views - Browser utilities
public/js/main.js - API endpoints
Retail operations
- POS transactions
- Inventory control
- Product catalog
app/models/Product.php - Customer loyalty
- Supplier purchasing
- Returns and refunds
- Reports analytics
Application foundation
- User access
app/models/User.php - Security helpers
utils/helpers/SecurityHelper.php - API responses
utils/helpers/ResponseHelper.php - Audit logging
utils/helpers/LoggerHelper.php - Database connection
config/database.php - Model CRUD
app/models/BaseModel.php - MySQL POS data
database/database_schema.sql
Documented capabilities
- AI chatbot
- CRM loyalty programs
- Business insights
- Compliance tracking
Other components
- Staff user
- AI provider
Connections 16
- Staff user → Request router: sends requests
- Request router → Database connection: opens connection
- Request router → Page views: loads page
- Request router → API endpoints: dispatches API
- Request router → Security helpers: uses security
- Request router → Audit logging: logs errors
- Request router → API responses: sends errors
- Browser utilities → API endpoints: fetches API
- Model CRUD → MySQL POS data: queries data
- Product catalog → MySQL POS data: queries products
- User access → MySQL POS data: queries users
- Audit logging → MySQL POS data: writes audit logs
- POS transactions → Inventory control: updates stock
- POS transactions → MySQL POS data: records sales
- Supplier purchasing → Inventory control: replenishes stock
- AI chatbot → AI provider: requests responses