How arnavvtt/smartagri works
Smart Agriculture Portal is a Django application for farmers. The main workflow combines account and crop management with location-aware weather, crop advisories, mandi prices, and farm-planning support. Views coordinate requests and domain logic; models hold crop and profile data, while templates present the results. The README documents the external weather and government market-data integrations. Several product areas are documented but their implementation was not fully sampled, so those relationships are shown only where the README supports them.
Main entry points: views.py Request Views · urls.py App Routes · models.py Farm Records · main.js Insight Refresh UI
Components 19
Web and Accounts
- App Routes
agriapp/urls.py - Request Views
agriapp/views.py - Page Templates
templates - Authentication
agriapp/views.py - Insight Refresh UI
static/js/main.js
Farm Management
- Crop Forms
agriapp/forms.py - Farm Records
agriapp/models.py - SQLite Database
db.sqlite3
Weather Insights
- Weather Fetch
agriapp/views.py - Forecast Analysis
agriapp/weather_forecast.py - Crop Rules
agriapp/crop_weather_rules.py - City State Map
agriapp/city_state_map.py - State Risk Advisories
agriapp/state_risks.py - Farm Summaries
agriapp/utils.py
Market and Planning
- Mandi Prices
agriapp/views.py - Farm Planner
agriapp/views.py
Other components
- Farmer
- OpenWeather API
- Government APMC API
Connections 18
- Farmer → App Routes: requests pages
agriapp/urls.py - App Routes → Request Views: dispatches
agriapp/urls.py - Request Views → Page Templates: renders pages
agriapp/views.py - Request Views → Authentication: handles login
agriapp/views.py - Request Views → Crop Forms: uses forms
agriapp/views.py - Request Views → Farm Records: queries crops
agriapp/views.py - Farm Records → SQLite Database: persists records
README.md - Request Views → Weather Fetch: gets weather
agriapp/views.py - Weather Fetch → OpenWeather API: fetches forecast
README.md - Request Views → Forecast Analysis: analyzes forecast
agriapp/views.py - Request Views → Crop Rules: uses crop rules
agriapp/views.py - Request Views → City State Map: maps location
agriapp/views.py - Request Views → State Risk Advisories: gets risk advisories
agriapp/views.py - Request Views → Farm Summaries: builds summaries
agriapp/views.py - Request Views → Mandi Prices: serves prices
agriapp/views.py - Mandi Prices → Government APMC API: fetches prices
README.md - Request Views → Farm Planner: serves planning
README.md - Insight Refresh UI → App Routes: refreshes insight
static/js/main.js