How muhtasim-apon/infinity_ai_buildfest works
CropGuardian is an agriculture-focused web application for detecting crop pests and disease from imagery, with farmer-facing scan flows, authentication, localized UX, and alert/review capabilities. The apparent user journey is to enter through the web app, authenticate, submit or view a scan, then receive advice or alerts; reviewer and admin areas are separate product branches. The tree also includes backend services, ML data preparation, and knowledge-base search. README claims are aspirational and explicitly says the template has no trained model or deployed application; sampled code confirms some runtime pieces, but not the full scan or inference path.
Main entry points: router.tsx Route access · App.tsx App shell · auth.py Auth service · main.py API application
Components 26
Web application
- App shell
cropguardian/frontend/src/app/App.tsx - Route access
cropguardian/frontend/src/app/router.tsx - Farmer scan UX
cropguardian/frontend/src/app/pages/farmer.tsx - Alert review
cropguardian/frontend/src/app/pages/review.tsx - Language UX
cropguardian/frontend/src/i18n/index.ts - HTTP client
cropguardian/frontend/src/lib/api.ts - Scan API client
cropguardian/frontend/src/features/scans/api.ts
Identity and access
- Auth state
cropguardian/frontend/src/app/auth.tsx - Sign-in flows
cropguardian/frontend/src/app/pages/auth.tsx - Auth API client
cropguardian/frontend/src/lib/authApi.ts - Auth routes
cropguardian/backend/app/api/v1/auth.py - Auth service
cropguardian/backend/app/services/auth.py - Session store
cropguardian/backend/app/core/sessions.py
Backend services
- API application
cropguardian/backend/app/main.py - DB session scope
cropguardian/backend/app/db/session.py - Scan routes
cropguardian/backend/app/api/v1/scans.py - Scan service
cropguardian/backend/app/services/scans.py
Knowledge and alerts
- Decision rules
cropguardian/backend/app/domain/decision.py - Outbreak rules
cropguardian/backend/app/domain/outbreak_rules.py - Knowledge search
cropguardian/backend/app/domain/kb_search.py - KB server
cropguardian/mcp/kb_server.py - LLM integration
cropguardian/backend/app/services/llm.py
ML data tooling
- ML data commands
cropguardian/ml/cg_ml/__main__.py - Dataset preparation
cropguardian/ml/cg_ml/data/prepare.py - Dataset manifest
cropguardian/ml/cg_ml/data/manifest.py
Other components
- Farmer
Connections 24
- Farmer → App shell: uses
- App shell → Auth state: provides auth
cropguardian/frontend/src/app/App.tsx - App shell → Route access: renders routes
cropguardian/frontend/src/app/App.tsx - Route access → Sign-in flows: routes to
cropguardian/frontend/src/app/router.tsx - Route access → Farmer scan UX: routes to
cropguardian/frontend/src/app/router.tsx - Route access → Alert review: routes to
cropguardian/frontend/src/app/router.tsx - Farmer scan UX → Scan API client: requests scans
cropguardian/frontend/src/app/pages/farmer.tsx - Alert review → Scan API client: requests alerts
cropguardian/frontend/src/app/pages/review.tsx - Auth state → Auth API client: loads auth state
cropguardian/frontend/src/app/auth.tsx - Sign-in flows → Auth API client: uses
cropguardian/frontend/src/app/pages/auth.tsx - Auth API client → HTTP client: uses transport
cropguardian/frontend/src/lib/authApi.ts - Scan API client → HTTP client: uses transport
cropguardian/frontend/src/features/scans/api.ts - HTTP client → API application: calls API
- API application → Auth routes: mounts routes
cropguardian/backend/app/main.py - Auth routes → Auth service: delegates auth
cropguardian/backend/app/api/v1/auth.py - Auth service → Session store: uses sessions
cropguardian/backend/app/services/auth.py - Auth service → DB session scope: uses DB scope
cropguardian/backend/app/services/auth.py - API application → Scan routes: mounts routes
cropguardian/backend/app/main.py - Scan routes → Scan service: delegates scans
- Scan service → Decision rules: applies decisions
- Scan service → Outbreak rules: checks outbreaks
- KB server → Knowledge search: uses search
cropguardian/mcp/kb_server.py - ML data commands → Dataset preparation: runs preparation
cropguardian/ml/cg_ml/__main__.py - ML data commands → Dataset manifest: runs manifest
cropguardian/ml/cg_ml/__main__.py