How yrbre/fs-finish-oil-warehouse-system works
Finish Oil System is a Laravel inventory and warehouse application for tracking oil lots and stock movement. Users submit receiving, consumption, adjustment, disposal, relocation, and inter-warehouse transfer operations through web screens; controllers invoke business services, which use repositories and Eloquent models for persistence. Transfers have distinct request, approval, dispatch, and receipt stages. The README also documents FEFO allocation, stock-ledger reporting, and scheduled minimum-stock and near-expiry alerts. Some module links rely on the README’s documented architecture because their source was not sampled.
Main entry points: Eloquents Eloquent repositories · TransferRequestService.php Transfer service · web.php Web routes · TransferRequestController.php Transfer controller
Components 21
Web interaction
- Web routes
routes/web.php - Inventory screens
resources/views/pages - Transaction controller
app/Http/Controllers/TransactionController.php - Transfer controller
app/Http/Controllers/TransferRequestController.php - Item controller
app/Http/Controllers/ItemController.php
Stock operations
- Transaction service
app/Services/TransactionService.php - Item location service
app/Services/ItemLocationService.php - Package allocator
app/Services/PackageAllocator.php - Disposal service
app/Services/DisposalService.php - Relocation service
app/Services/RelocationService.php
Warehouse transfers
- Transfer service
app/Services/TransferRequestService.php - Receipt PDF view
resources/views/pdf/receipt-of-goods.blade.php
Persistence
- Eloquent repositories
app/Repositories/Eloquents - Inventory models
app/Models - MySQL database
Reporting and alerts
- Reports controller
app/Http/Controllers/ReportController.php - Stock ledger service
app/Services/StockLedgerService.php - Stock alert service
app/Services/StockAlertService.php - Alert scheduler command
app/Console/Commands/CheckStockAlerts.php - User notifications
app/Notifications
Other components
- Warehouse user
Connections 25
- Warehouse user → Web routes: submits requests
- Web routes → Transaction controller: dispatches
- Web routes → Transfer controller: dispatches
- Web routes → Item controller: dispatches
- Transaction controller → Inventory screens: renders
- Transfer controller → Inventory screens: renders
- Item controller → Inventory screens: renders
- Transaction controller → Transaction service: invokes
- Transfer controller → Transfer service: invokes
- Transfer controller → Receipt PDF view: renders
- Transaction service → Item location service: uses lot operations
- Transaction service → Eloquent repositories: accesses data
- Transfer service → Item location service: allocates and receives lots
- Transfer service → Package allocator: allocates packages
- Item location service → Package allocator: uses allocation
- Disposal service → Eloquent repositories: accesses data
- Relocation service → Eloquent repositories: accesses data
- Transfer service → Eloquent repositories: accesses data
- Eloquent repositories → Inventory models: queries and updates
- Inventory models → MySQL database: persists records
- Reports controller → Stock ledger service: uses ledger reporting
- Stock ledger service → Eloquent repositories: accesses data
- Alert scheduler command → Stock alert service: checks stock
- Stock alert service → User notifications: sends alerts
- Transfer service → User notifications: sends status updates