How jerowm098/smart-stock works
Smart-Stock is a Laravel inventory and point-of-sale application. Users enter through web routes; admins manage products, receiving, suppliers, users, reports and replenishment suggestions, while cashiers use the POS to record sales and deduct stock. Sales history feeds demand forecasting and reorder suggestions. The graph preserves the major controllers, domain models, forecasting service and central seeders identified by the source index. Source excerpts are partial, so some view, routing and backup relationships are shown only where the index or excerpt supports them.
Main entry points: web.php Web routes · DashboardController.php Admin dashboard · PosCheckoutController.php POS checkout · InventoryController.php Inventory management
Components 22
Access and screens
- Web routes
routes/web.php - Authentication
app/Http/Controllers/Auth/AuthController.php - Admin dashboard
app/Http/Controllers/DashboardController.php - Admin screens
resources/views/admin - Cashier POS screen
resources/views/cashier/cashier-pos.blade.php
Store operations
- Inventory management
app/Http/Controllers/InventoryController.php - POS checkout
app/Http/Controllers/PosCheckoutController.php - Supplier management
app/Http/Controllers/SupplierController.php - User management
app/Http/Controllers/UserController.php - Backup management
app/Http/Controllers/BackupController.php
Demand planning
- Suggestion actions
app/Http/Controllers/TransactionSuggestionController.php - Demand forecasting
app/Services/ForecastingService.php
Domain and persistence
- Product catalog
app/Models/Product.php - Sales records
app/Models/Sale.php - Sale line items
app/Models/SaleItem.php - Receiving records
app/Models/StockIn.php - Stock adjustments
app/Models/StockAdjustment.php - Supplier records
app/Models/Supplier.php - Order suggestions
app/Models/OrderSuggestion.php - User accounts
app/Models/User.php - Catalog and sales seeders
database/seeders
Other components
- Store user
Connections 36
- Store user → Web routes: uses
routes/web.php - Web routes → Authentication: routes to
routes/web.php - Web routes → Admin dashboard: routes to
routes/web.php - Web routes → Inventory management: routes to
routes/web.php - Web routes → POS checkout: routes to
routes/web.php - Web routes → Supplier management: routes to
routes/web.php - Web routes → User management: routes to
routes/web.php - Web routes → Backup management: routes to
routes/web.php - Web routes → Suggestion actions: routes to
routes/web.php - Authentication → User accounts: looks up
app/Http/Controllers/Auth/AuthController.php - Admin dashboard → Product catalog: queries
app/Http/Controllers/DashboardController.php - Admin dashboard → Sales records: queries
app/Http/Controllers/DashboardController.php - Admin dashboard → Receiving records: queries
app/Http/Controllers/DashboardController.php - Admin dashboard → Supplier records: queries
app/Http/Controllers/DashboardController.php - Admin dashboard → Order suggestions: queries
app/Http/Controllers/DashboardController.php - Admin dashboard → Demand forecasting: uses
app/Http/Controllers/DashboardController.php - Inventory management → Product catalog: manages
app/Http/Controllers/InventoryController.php - Inventory management → Receiving records: records
app/Http/Controllers/InventoryController.php - Inventory management → Stock adjustments: records
app/Http/Controllers/InventoryController.php - POS checkout → Product catalog: checks stock
app/Http/Controllers/PosCheckoutController.php - POS checkout → Sales records: creates
app/Http/Controllers/PosCheckoutController.php - POS checkout → Sale line items: creates
app/Http/Controllers/PosCheckoutController.php - POS checkout → User accounts: records cashier
app/Http/Controllers/PosCheckoutController.php - Supplier management → Supplier records: manages
app/Http/Controllers/SupplierController.php - User management → User accounts: manages
app/Http/Controllers/UserController.php - Suggestion actions → Order suggestions: updates
app/Http/Controllers/TransactionSuggestionController.php - Suggestion actions → Demand forecasting: runs
app/Http/Controllers/TransactionSuggestionController.php - Demand forecasting → Product catalog: reads
app/Services/ForecastingService.php - Demand forecasting → Order suggestions: persists
app/Services/ForecastingService.php - Demand forecasting → Sales records: derives demand
app/Services/ForecastingService.php - Catalog and sales seeders → Product catalog: seeds
database/seeders/ProductSeeder.php - Catalog and sales seeders → Sales records: seeds
database/seeders/SaleSeeder.php - Admin dashboard → Admin screens: serves
- Inventory management → Admin screens: serves
- Suggestion actions → Admin screens: serves
- POS checkout → Cashier POS screen: serves