How luthfibg/pos_retail works
POS Retail SMK is a multi-store retail point-of-sale system with employee credit sales and combined HR billing. Users sign in, work in the selected store, and use product/inventory workflows; the documented target also covers purchasing, sales, shifts, invoicing, reporting, and stock counts. The README cautions that purchasing, POS, shifts, and invoices are still incomplete. The graph combines documented product areas with sampled inventory-count, authorization, and supplier-return implementation; unsampled feature internals and most frontend-to-API links are not asserted.
Main entry points: OpnameSessionController.php Count session API · database.php MySQL store · PermissionResolver.php Permission resolver · AuditLogger.php Audit trail
Components 24
Storefront
- Retail workspace
frontend/src/features - API client
frontend/src/lib/api/client.ts
Identity and access
- Login and session
frontend/src/features/auth/AuthProvider.tsx - User identity
backend/app/Models/User.php - Store context
backend/app/Services/StoreContext.php - Permission resolver
backend/app/Services/PermissionResolver.php - Approval keys
backend/app/Services/AuthorizationKeyService.php
Inventory operations
- Count workspace
frontend/src/features/inventory/OpnameSessionsPage.tsx - Offline count queue
frontend/src/features/inventory/opnameOfflineStore.ts - Count session API
backend/app/Http/Controllers/OpnameSessionController.php - Session lifecycle
backend/app/Services/OpnameSessionService.php - Count recording
backend/app/Services/OpnameCountService.php - Count progress
backend/app/Services/OpnameProgressService.php - Count history
backend/app/Services/OpnameHistoryService.php - Count approval
backend/app/Services/OpnameWorkflowService.php - Supplier returns
backend/app/Services/SupplierReturnService.php
Retail operations
- Sales and credit
backend/app/Services/SaleService.php - Purchasing
backend/app/Services/PurchaseOrderService.php - Cash shifts
backend/app/Services/ShiftService.php - HR billing
backend/app/Services/BillingService.php - Reports
backend/app/Services/ReportService.php
Platform services
- Audit trail
backend/app/Services/AuditLogger.php - MySQL store
backend/config/database.php
Other components
- Store staff
Connections 23
- Store staff → Retail workspace: uses
README.md - Retail workspace → API client: requests data
- API client → Login and session: supports session
- Login and session → User identity: authenticates
- Count workspace → Offline count queue: queues counts
- Count workspace → Count session API: submits counts
- Count session API → Store context: resolves store
backend/app/Http/Controllers/OpnameSessionController.php - Count session API → Session lifecycle: starts sessions
backend/app/Http/Controllers/OpnameSessionController.php - Count session API → Count recording: records counts
backend/app/Http/Controllers/OpnameSessionController.php - Count session API → Count progress: loads progress
backend/app/Http/Controllers/OpnameSessionController.php - Count session API → Count history: loads history
backend/app/Http/Controllers/OpnameSessionController.php - Count session API → Count approval: runs workflow
backend/app/Http/Controllers/OpnameSessionController.php - Count session API → Permission resolver: checks access
backend/app/Http/Controllers/OpnameSessionController.php - Session lifecycle → Audit trail: records events
backend/app/Services/OpnameSessionService.php - Approval keys → Audit trail: records changes
backend/app/Services/AuthorizationKeyService.php - Permission resolver → Store context: resolves store
backend/app/Services/PermissionResolver.php - Permission resolver → User identity: checks identity
backend/app/Services/PermissionResolver.php - Supplier returns → Audit trail: records changes
- Sales and credit → MySQL store: persists sales
- Purchasing → MySQL store: persists orders
- Cash shifts → MySQL store: persists shifts
- HR billing → MySQL store: stores invoices
- Reports → MySQL store: reads reports