How asegomed/inventory-and-expiration-manager-stockdate- works
StockDate is a web application for managing food inventory and expiration dates. The implemented workflow runs from a browser batch form through the inventory API, validation and persistence, then returns batch data; dashboard requests calculate and summarize expiration alerts. The README also documents planned dispatch/discard, reporting, and role-based access capabilities, which are not implemented yet. Edges reflect sampled calls or README statements; links for documented but unsampled capabilities are dashed and unverified.
Main entry points: InventoryManager.java Inventory manager · InventoryController.java Inventory API · ExpirationAlertService.java Expiration alerts · InventoryRepository.java Inventory repository
Components 17
Web interface
- Inventory UI
Stockdate/src/main/resources/static/js/app.js
Presentation API
- Inventory API
Stockdate/src/main/java/stockdate/presentation/controller/InventoryController.java - Batch request
Stockdate/src/main/java/stockdate/presentation/dto/request/CreateBatchRequest.java - Batch response
Stockdate/src/main/java/stockdate/presentation/dto/response/BatchDTO.java - Dashboard summary
Stockdate/src/main/java/stockdate/presentation/dto/response/DashboardDTO.java - Role access
Stockdate/src/main/java/stockdate/config/SecurityConfig.java
Inventory services
- Inventory manager
Stockdate/src/main/java/stockdate/service/InventoryManager.java - Expiration alerts
Stockdate/src/main/java/stockdate/service/ExpirationAlertService.java - Batch factory
Stockdate/src/main/java/stockdate/service/factory/Factory.java - Date strategies
Stockdate/src/main/java/stockdate/service/strategy/Strategy.java - Stock observer
Stockdate/src/main/java/stockdate/service/observer/Observer.java - Dispatch and discard
Stockdate/src/main/java/stockdate/presentation/dto/request/DispatchRequest.java - Waste reports
Stockdate/src/main/java/stockdate/service/ReportService.java
Persistence
- Batch records
Stockdate/src/main/java/stockdate/persistence/entity/BatchEntity.java - Inventory repository
Stockdate/src/main/java/stockdate/persistence/repository/InventoryRepository.java - SQLite database
Other components
- Staff user
Connections 20
- Staff user → Inventory UI: uses
README.md - Inventory UI → Inventory API: calls REST API
README.md - Inventory API → Batch request: accepts
Stockdate/src/main/java/stockdate/presentation/controller/InventoryController.java - Inventory API → Inventory manager: delegates to
Stockdate/src/main/java/stockdate/presentation/controller/InventoryController.java - Inventory API → Expiration alerts: requests dashboard
Stockdate/src/main/java/stockdate/presentation/controller/InventoryController.java - Inventory manager → Inventory repository: reads and saves
Stockdate/src/main/java/stockdate/service/InventoryManager.java - Inventory manager → Batch factory: creates and maps
Stockdate/src/main/java/stockdate/service/InventoryManager.java - Inventory manager → Date strategies: validates dates
Stockdate/src/main/java/stockdate/service/InventoryManager.java - Inventory manager → Stock observer: notifies
Stockdate/src/main/java/stockdate/service/InventoryManager.java - Inventory manager → Batch response: returns
Stockdate/src/main/java/stockdate/service/InventoryManager.java - Expiration alerts → Inventory repository: reads sorted batches
Stockdate/src/main/java/stockdate/service/ExpirationAlertService.java - Expiration alerts → Batch factory: maps batches
Stockdate/src/main/java/stockdate/service/ExpirationAlertService.java - Expiration alerts → Dashboard summary: builds
Stockdate/src/main/java/stockdate/service/ExpirationAlertService.java - Stock observer → Expiration alerts: implemented by
Stockdate/src/main/java/stockdate/service/observer/Observer.java - Batch factory → Date strategies: selects
Stockdate/src/main/java/stockdate/service/factory/Factory.java - Inventory repository → Batch records: persists
Stockdate/src/main/java/stockdate/persistence/repository/InventoryRepository.java - Inventory repository → SQLite database: stores through JPA
README.md - Dispatch and discard → Inventory manager: planned workflow
README.md - Waste reports → Inventory repository: planned data access
- Role access → Inventory API: planned authorization
README.md