How innotech-lab/afro-agri works
AfroAgri is an agriculture-management web application: users access public analysis pages or role-specific dashboards, while the Django backend exposes account and agricultural-data services. The visible analysis service predicts plant disease from images and enriches results with treatment and symptom information; field, crop, journal, soil, and payment capabilities are represented by backend modules in the tree. Several routes and integrations are unsampled, so those connections are omitted or marked unverified rather than inferred.
Main entry points: journal/models.py Journal records · champs/models.py Field records · App.jsx Application routes · views.py User and dashboard API
Components 25
Web experience
- Application routes
frontend/src/App.jsx - Analysis page
frontend/src/pages/AnalysePage.jsx - Terrain analyzer
frontend/src/components/TerrainAnalyzer.jsx - Role dashboards
frontend/src/pages - Resource manager
frontend/src/components/ResourceManager.jsx
Identity and roles
- Authentication state
frontend/src/context/AuthContext.jsx - User and dashboard API
backend/users/views.py - User roles
backend/type_user/models.py - User records
backend/users/models.py
Farm operations
- Field management
backend/champs - Field records
backend/champs/models.py - Crop management
backend/plantes - Crop records
backend/plantes/models.py - Crop journal
backend/journal - Journal records
backend/journal/models.py
Agricultural insights
- Soil study
backend/etude_sol - Plant diagnosis
backend/diagnostic - Disease inference
backend/diagnostic/ia_service.py - Diagnosis records
backend/diagnostic/models.py - Location services
backend/localisation
Payments
- Payment services
backend/paiement - Payment records
backend/paiement/models.py - Subscriptions
backend/subscriptions - Transactions
backend/transactions
Other components
- User
Connections 25
- User → Application routes: opens
frontend/src/App.jsx - Application routes → Analysis page: routes to
frontend/src/App.jsx - Application routes → Role dashboards: routes to
frontend/src/App.jsx - Analysis page → Terrain analyzer: renders
frontend/src/pages/AnalysePage.jsx - User → Authentication state: signs in
- Authentication state → User and dashboard API: posts credentials
frontend/src/context/AuthContext.jsx - User and dashboard API → User records: reads and writes
backend/users/views.py - User and dashboard API → User roles: looks up role
backend/users/views.py - Role dashboards → Resource manager: uses resources
frontend/src/pages/particulier/DashboardParticulier.jsx - Resource manager → Field management: requests endpoint
- Field management → Field records: manages records
- Crop management → Crop records: manages records
- Crop journal → Journal records: manages records
backend/journal/views.py - Crop records → Field records: references field
backend/plantes/models.py - Journal records → Crop records: references crop
backend/journal/models.py - Journal records → User records: references user
backend/journal/models.py - Crop journal → Disease inference: invokes diagnosis
backend/journal/views.py - Plant diagnosis → Disease inference: uses inference
- Diagnosis records → Journal records: references journal
backend/diagnostic/models.py - Soil study → Field records: stores soil data
- Location services → Field records: uses field locations
- Payment services → Payment records: manages records
backend/paiement/views.py - Payment records → User records: references user
backend/paiement/models.py - Subscriptions → Payment services: integrates
- Transactions → Payment services: integrates