How venkatchaitanya7/cropstress-compass works
Cropstress Compass is a browser-based crop-stress forecasting and intervention simulator, not a connected farm-sensor or weather-data service. A user selects a crop, scenario inputs, and an intervention; the home route uses a local model to produce a 14-day forecast, recovery estimates, risk metrics, and a comparison against an image-only baseline. The route also displays a simulated backtest. Server-side rendering and error handling support the application. The README describes the research goal, while sampled code shows synthetic in-browser modeling; unsampled advice, weather, and reporting modules are not assumed to participate in this workflow.
Main entry points: index.tsx Forecast dashboard · routeTree.gen.ts Route tree · server.ts SSR server · router.tsx App router
Components 12
Application
- App router
src/router.tsx - Route tree
src/routeTree.gen.ts - Forecast dashboard
src/routes/index.tsx
Forecast model
- Stress forecast
src/lib/stress-model.ts - Intervention recovery
src/lib/stress-model.ts - Model backtest
src/lib/stress-model.ts
Runtime and errors
- SSR server
src/server.ts - Root shell
src/routes/__root.tsx - Error capture
src/lib/error-capture.ts - Error page
src/lib/error-page.ts - Error reporting
src/lib/lovable-error-reporting.ts
Other components
- Farmer
Connections 10
- Farmer → App router: opens app
- App router → Route tree: configures routes
src/router.tsx - Route tree → Root shell: registers root
src/routeTree.gen.ts - Route tree → Forecast dashboard: registers home
src/routeTree.gen.ts - Forecast dashboard → Stress forecast: builds forecast
src/routes/index.tsx - Forecast dashboard → Intervention recovery: simulates recovery
src/routes/index.tsx - Forecast dashboard → Model backtest: runs backtest
src/routes/index.tsx - SSR server → Error capture: captures errors
src/server.ts - SSR server → Error page: renders failures
src/server.ts - Root shell → Error reporting: reports errors
src/routes/__root.tsx