How thjnn/farm2home works
FARM2HOME AI is a Laravel application coordinating produce demand with small-farm harvests, rather than simply an online vegetable shop. Customers place orders and subscriptions; farmers report available supply; operators use forecasts to review and confirm harvest plans, then receive crops, create traceable batches, and handle feedback. Admin tools also cover loyalty, waste and packaging returns, and pilot KPIs. Edges follow the README’s documented workflow and sampled controller/service calls; several broader capabilities are documented but their implementations were not sampled.
Main entry points: FarmerPortalController.php Farmer portal · HarvestPlanService.php Harvest allocation · OrderService.php Order processing · ForecastService.php Demand forecasting
Components 23
Customer ordering
- Public ordering
app/Http/Controllers/Public/OrderController.php - Order processing
app/Services/OrderService.php - Recurring baskets
app/Services/SubscriptionService.php - Orders
app/Models/Order.php - Shopping chatbot
app/Services/ChatbotService.php
Supply planning
- Farmer portal
app/Http/Controllers/Farmer/FarmerPortalController.php - Supply reporting
app/Services/SupplyReportService.php - Demand forecasting
app/Services/ForecastService.php - Forecast methods
app/Support/ForecastCalculator.php - Harvest planning
app/Http/Controllers/Admin/HarvestPlanController.php - Harvest allocation
app/Services/HarvestPlanService.php - Harvest plans
app/Models/HarvestPlan.php
Fulfillment and traceability
- Batch and QR
app/Services/BatchService.php - Batch feedback
app/Services/FeedbackService.php
Operations
- Loyalty points
app/Services/LoyaltyService.php - Pilot KPIs
app/Services/KpiService.php - Waste and returns
app/Http/Controllers/Admin/WasteController.php
Application access
- PWA entry
app/Http/Controllers/AppEntryController.php - Application records
app/Models/Order.php
Other components
- Customer
- Operator
- Farmer
- Gemini API
Connections 23
- Customer → Public ordering: places order
README.md - Public ordering → Order processing: submits order
app/Http/Controllers/Public/OrderController.php - Order processing → Orders: creates order
app/Services/OrderService.php - Customer → Recurring baskets: sets recurrence
README.md - Farmer → Farmer portal: reports supply
README.md - Farmer portal → Supply reporting: saves report
app/Http/Controllers/Farmer/FarmerPortalController.php - Farmer portal → Demand forecasting: views outlook
app/Http/Controllers/Farmer/FarmerPortalController.php - Demand forecasting → Forecast methods: calculates forecasts
app/Services/ForecastService.php - Operator → Harvest planning: reviews plan
README.md - Harvest planning → Harvest allocation: delegates planning
app/Http/Controllers/Admin/HarvestPlanController.php - Harvest allocation → Demand forecasting: uses forecast
app/Services/HarvestPlanService.php - Harvest allocation → Harvest plans: updates plan
app/Services/HarvestPlanService.php - Farmer portal → Harvest allocation: confirms harvest
app/Http/Controllers/Farmer/FarmerPortalController.php - Operator → Batch and QR: creates QR batches
README.md - Customer → Batch feedback: rates batch
README.md - Customer → Loyalty points: redeems points
README.md - Operator → Pilot KPIs: views metrics
README.md - Operator → Waste and returns: records waste
README.md - Customer → Shopping chatbot: asks questions
README.md - Shopping chatbot → Gemini API: queries optionally
README.md - Customer → PWA entry: opens app
app/Http/Controllers/AppEntryController.php - PWA entry → Farmer portal: redirects farmer
app/Http/Controllers/AppEntryController.php - Order processing → Application records: persists orders
app/Services/OrderService.php