Crop Identification demo — modular AI system for crop identification using satellite imagery.
- ✅ Registration Component: Complete user signup with validation & password strength indicator
- ✅ Login Component: Email/username authentication with MFA support & SSO buttons
- ✅ MFA Verification Component: 6-digit code input with countdown timer & backup codes
- ✅ Auth API Service: 15+ methods for backend integration (registration, login, MFA, devices, etc.)
- ✅ Responsive Design: Mobile-first approach, all devices supported
- ✅ Internationalization: 4 languages (English, Hindi, Marathi, Gujarati) with RTL support
- ✅ Security Features: Password validation, rate limiting feedback, secure token storage
- ✅ 1,800+ Lines of Code: Production-grade UI components
See frontend/angular/UI_IMPLEMENTATION_GUIDE.md and frontend/angular/UI_IMPLEMENTATION_SUMMARY.md for details.
- ✅ Credential-Based Authentication: Email/username + password login
- ✅ Multi-Factor Authentication: TOTP (Google Authenticator), SMS OTP, Email OTP
- ✅ Device Management: Register, trust, and manage login devices
- ✅ Password Management: Change password, reset via email
- ✅ Login History: Complete audit trail of all login attempts
- ✅ Security Features: Rate limiting, account lockout, brute force protection
- ✅ 18 API Endpoints: Full CRUD operations for login management
- ✅ Production Ready: Comprehensive documentation and security best practices
See LOGIN_QUICK_REFERENCE.md and src/crop_ai/login/LOGIN_GUIDE.md for details.
- ✅ Submenu Navigation: All navigation items now smoothly scroll to relevant page sections
- ✅ Smart Carousel: "I Am" and "Our Offerings" menus automatically navigate to corresponding user role cards
- ✅ Typography: Applied Aptos (Body) font for professional appearance
- ✅ Text Alignment: Justified text for About Us, Vision, and Mission sections
- ✅ Responsive Design: Fully responsive navigation and layout
- ✅ Multilingual Support: 4-language support (English, Hindi, Marathi, Gujarati)
See CHANGELOG.md for complete session details.
cd frontend/angular
npm install
npm start # Runs on http://localhost:4200The dev server binds to all interfaces (0.0.0.0:4200) for external access.
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # or on Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt
pip install -r requirements-dev.txt # for linting/formatting- Run tests:
PYTHONPATH=src python -m pytest -q- Build Docker image locally:
docker build -t crop-ai:latest .The project runs three main services during development/deployment:
- URL:
http://localhost:5000 - Health Check:
http://localhost:5000/health - Key Endpoints:
GET /health— Service health statusGET /ready— Readiness probe (dependencies check)GET /info— Service information (version, status)GET /metrics— Service metricsPOST /predict— Crop identification predictionGET /predictions— List all predictionsGET /stats— Service statistics
- API Docs:
http://localhost:5000/docs(Swagger UI)
- URL:
http://localhost:8000 - Key Endpoints:
GET /api/health/— Gateway health statusGET /api/ready/— Readiness checkGET /api/info/— Gateway informationGET /api/predict/— Prediction endpointPOST /api/login/— User authenticationPOST /api/register/— User registration
- Admin Panel:
http://localhost:8000/admin(Django Admin)
- URL:
http://localhost:4200 - Landing Page:
http://localhost:4200/— Public landing page - Authentication: User login and registration
- Dashboard: Crop identification interface
Run endpoint smoke tests to verify all services:
# Run integration tests (requires all services running)
PYTHONPATH=src python -m pytest tests/test_integration_endpoints.py -v
# Or run standalone test suite
cd tests && python test_integration_endpoints.pyThis tests all three services and generates a health report.
The project uses GitHub Actions for testing, linting, formatting, Docker builds, and deployment to Azure.
- Test job: runs
pytestacross Python 3.10–3.12 with pip caching. - Lint/format checks: runs
ruff(linting) andblack --check(format validation). - Docker build: builds and verifies the container image.
- Deploy job: (optional, gated on
mainbranch) pushes to Azure Container Registry and deploys to Azure Web App.
See .github/workflows/ci.yml for details.
To deploy to Azure, see docs/azure-deploy.md for setup instructions. Key steps:
- Create Azure resources (ACR, Web App, App Service Plan).
- Add GitHub repository secrets for Azure credentials.
- Push to
mainto trigger the CI/CD pipeline.
To safely delete Azure resource groups:
# Dry-run (no changes)
bash scripts/azure_cleanup.sh --prefix crop- --dry-run
# Backup and delete interactively
bash scripts/delete_crop_ai_rg.sh # interactive
bash scripts/delete_crop_ai_rg.sh --yes # non-interactiveSee docs/azure-cleanup.md for details.
crop-ai/
├── src/crop_ai/ # Main package
│ ├── __init__.py
│ └── predict.py # ModelAdapter stub and CLI
├── tests/ # Unit tests
│ └── test_predict.py
├── scripts/ # Utility scripts
│ ├── azure_cleanup.sh
│ ├── delete_crop_ai_rg.sh
│ └── convert_docx.py
├── docs/ # Documentation
│ ├── azure-deploy.md
│ ├── azure-cleanup.md
│ └── context.md
├── .github/workflows/ # GitHub Actions
│ └── ci.yml
├── Dockerfile
├── requirements.txt
├── requirements-dev.txt
└── pyproject.toml
docs/context.md— extracted project context fromDLAI Prompt.docx.docs/azure-deploy.md— setup guide for Azure Container Registry and Web App deployment.docs/azure-cleanup.md— safe deletion of Azure resource groups..github/copilot-instructions.md— guidance for AI coding agents.
- Implement a real
ModelAdaptersubclass for PyTorch or TensorFlow. - Collect and prepare satellite imagery datasets for crop training.
- Build a demo backend (Flask/FastAPI) and frontend (HTML/JS) for predictions.
- Set up Kubernetes deployment if scaling is required.