How louisecatala/kawing--iot-integrated-post-harvest-coordination-platform works
KAWING is a post-harvest coordination platform connecting farmers, buyers, and agricultural service providers. Its main workflow runs from account access into role-specific dashboards, where users trade harvests, arrange services, or manage production loans; operational data is synchronized through the PHP API to MySQL. Separate capabilities include administration, Grainy AI, PalaySense moisture readings, announcements, and personalization. The graph combines README-documented product behavior with shown source references; several feature-level API links are omitted where excerpts do not establish the exact caller.
Main entry points: App.tsx App shell · FarmerDashboard.tsx Farmer dashboard · index.php PHP API · BuyerDashboard.tsx Buyer dashboard
Components 24
User application
- App shell
src/App.tsx - Authentication
src/pages/auth/Auth.tsx
Trading and services
- Farmer dashboard
src/pages/farmer/FarmerDashboard.tsx - Buyer dashboard
src/pages/buyer/BuyerDashboard.tsx - Provider dashboards
src/pages/buyer - Farmer loan workflow
src/pages/farmer/ProductionLoanFarmer.tsx - Buyer loan workflow
src/pages/buyer/ProductionLoanBuyer.tsx - Harvest marketplace
public/api/harvests.php
Platform capabilities
- Announcements
src/components/AnnouncementsBoard.tsx - Grainy assistant
src/components/GrainyAssistant.tsx - Administration
src/pages/admin - Language and theme
src/context/AppContext.tsx - Moisture readings
src/lib/moisture.ts
API and persistence
- Live data sync
src/lib/useLiveDatabase.ts - Snapshot reconciliation
src/lib/databaseSync.ts - PHP API
public/api/index.php - API configuration
public/api/config.php - Realtime safeguards
public/api/realtime.php - Business writes
public/api/businessWrites.php - PalaySense endpoint
public/api/palaysense.php - MySQL database
Other components
- Farmers
- Buyers and providers
- PalaySense device
Connections 29
- Farmers → App shell: opens platform
README.md - Buyers and providers → App shell: opens platform
README.md - App shell → Authentication: renders
src/App.tsx - App shell → Farmer dashboard: routes to
src/App.tsx - App shell → Buyer dashboard: routes to
src/App.tsx - App shell → Provider dashboards: routes to
src/App.tsx - App shell → Administration: routes to
src/App.tsx - Farmer dashboard → Farmer loan workflow: renders
src/pages/farmer/FarmerDashboard.tsx - Buyer dashboard → Buyer loan workflow: renders
src/pages/buyer/BuyerDashboard.tsx - Farmer dashboard → Harvest marketplace: manages harvests
README.md - Buyer dashboard → Harvest marketplace: trades harvests
README.md - Farmer dashboard → Provider dashboards: requests services
README.md - Farmer dashboard → Farmer loan workflow: applies for loans
src/pages/farmer/FarmerDashboard.tsx - Buyers and providers → PalaySense device: sends readings
README.md - PalaySense device → PalaySense endpoint: posts readings
README.md - Farmer dashboard → Moisture readings: reads paired data
README.md - App shell → Live data sync: starts synchronization
src/App.tsx - Live data sync → Snapshot reconciliation: rebases snapshots
src/lib/useLiveDatabase.ts - Live data sync → PHP API: exchanges updates
README.md - Authentication → PHP API: registers account
README.md - PHP API → API configuration: loads configuration
public/api/index.php - PHP API → Realtime safeguards: loads module
public/api/index.php - PHP API → PalaySense endpoint: loads module
public/api/index.php - Realtime safeguards → Business writes: uses safeguards
public/api/realtime.php - PHP API → MySQL database: reads and writes
README.md - Grainy assistant → PHP API: requests guidance
README.md - Farmer dashboard → Announcements: views announcements
README.md - Buyer dashboard → Announcements: views announcements
README.md - App shell → Language and theme: provides context
src/App.tsx