How sxnjai23/agro-guard--ai works
AgroGuard AI is a frontend crop-health assistant. The main user flow is account login or registration, then image submission for disease analysis or a text question answered by the app’s rule-based chat; voice input is also exposed in the chat UI. Routing also provides history, about, and developer screens. Source excerpts show the routing, API calls, and chat behavior, but not the history data source or the backend implementation, so those connections are not inferred.
Main entry points: routes.ts Route table · api.ts API client and chat rules · Chat.tsx Crop chat and analysis · Login.tsx Login and signup
Components 12
App shell and routing
- App entry
src/app/App.tsx - Route table
src/app/routes.ts - Root layout
src/app/components/Root.tsx
Crop assistance
- API client and chat rules
src/api.ts - Crop chat and analysis
src/app/components/Chat.tsx
Account access
- Login and signup
src/app/components/Login.tsx
Information screens
- History screen
src/app/components/History.tsx - About screen
src/app/components/About.tsx - Developer screen
src/app/components/Developer.tsx
Shared UI
- Shared UI components
src/app/components/ui
Other components
- App user
- AgroGuard API
Connections 18
- App user → App entry: opens
- App entry → Route table: provides routes
src/app/App.tsx - Route table → Root layout: routes to
src/app/routes.ts - Route table → Login and signup: routes to
src/app/routes.ts - Route table → Crop chat and analysis: routes to
src/app/routes.ts - Route table → History screen: routes to
src/app/routes.ts - Route table → About screen: routes to
src/app/routes.ts - Route table → Developer screen: routes to
src/app/routes.ts - App user → Login and signup: submits credentials
src/app/components/Login.tsx - Login and signup → API client and chat rules: calls auth
src/app/components/Login.tsx - API client and chat rules → AgroGuard API: sends auth requests
src/api.ts - App user → Crop chat and analysis: asks or uploads
src/app/components/Chat.tsx - Crop chat and analysis → API client and chat rules: requests analysis or reply
src/app/components/Chat.tsx - API client and chat rules → AgroGuard API: posts image
src/api.ts - API client and chat rules → Crop chat and analysis: returns rule-based reply
src/api.ts - API client and chat rules → AgroGuard API: transcribes audio
src/api.ts - Crop chat and analysis → Shared UI components: renders controls
src/app/components/Chat.tsx - Login and signup → Shared UI components: renders controls
src/app/components/Login.tsx