How prakharjain345/smart-crop works
Project type and purpose
• This is a full-stack, mobile-responsive web application called Smart Crop Management System.
• Purpose: provide AI-driven crop advice, pest detection via images, farmer profile management, and advice history tracking.
File structure
• Top-level directories:
• backend/ – FastAPI server (server.py, requirements.txt)
• frontend/ – React + Tailwind CSS UI (src/, public/, package.json, config files)
• tests/ – backend and frontend test stubs
• .emergent/ – AI/LLM agent configuration (emergent.yml)
• Patterns & artifacts:
• Frontend uses CRA (craco.config.js), Tailwind (tailwind.config.js), Radix UI components under src/components/ui, custom hooks under src/hooks, utility libs under src/lib.
• Backend is a single FastAPI app with Pydantic models, Motor async MongoDB driver, CORS middleware, OpenAI/Emergent integration, PIL for image processing.
• No separate microservices—everything is in one FastAPI process, but AI calls and database calls are external integrations.
• Deployment hints: Docker-ready, environment variables (.env), emergent agent config.
README insights
• Confirms tech stack: React 19, Tailwind, Radix UI, Axios on frontend; FastAPI, Pydantic, Motor, dotenv, PIL, CORS on backend; MongoDB async; emergentintegrations and OpenAI GPT-4o mini for AI.
• Lists API endpoints under /api: crop-advice, pest-detection, farmer-profile, farmer-profiles, advice-history.
• Emphasizes mobile-first UI, hackathon origins, AI features, and testing.