Multilingual Agricultural Advisory Platform
A full-stack web application that delivers hyper-local, real-time crop recommendations to rural farmers using GPS-based geolocation and live weather data — built to be accessible across multiple languages with instant, zero-page-reload switching.
Rural farmers often lack easy access to localized, real-time agricultural guidance due to language barriers, low digital literacy, and limited access to weather/crop data tailored to their exact location.
This platform bridges that gap by combining GPS geolocation, live weather data, and multilingual support to deliver crop recommendations that are immediately relevant to a farmer's specific location, climate conditions, and language — no manual data entry required.
- 📍 GPS-Based Geolocation — Automatically detects the farmer's location in-browser to personalize advisory content
- 🌦️ Live Weather Integration — Pulls real-time weather data from the OpenWeather API to factor temperature, humidity, and forecast into crop suggestions
- 🌐 Multilingual UI — Full interface translation with instant language switching, no page reload
- 🔢 Localized Number Formatting — Adapts numeric display for regional readability
- 🗄️ Normalized MySQL Schema — Structured relational database for crop, weather, and user advisory data
- 🔌 RESTful API Backend — Clean Express.js REST API separating business logic from the Angular frontend
Angular Frontend ──▶ Express.js REST API ──▶ MySQL Database
│ │
└──────────────▶ OpenWeather API
Built with Express.js, the backend exposes RESTful routes for crop and weather-based advisory data:
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/crops |
Fetch list of available crop recommendations |
GET |
/api/crops/:id |
Get details for a specific crop |
POST |
/api/crops |
Add a new crop recommendation entry |
GET |
/api/weather?lat=&lon= |
Fetch live weather data via OpenWeather API for given coordinates |
Routes are defined in
farmer-backend/routes/cropRoutes.jsand handled infarmer-backend/controllers/cropController.js. Database connection is managed infarmer-backend/models/db.js.
| Category | Tools |
|---|---|
| Frontend | Angular |
| Backend | Node.js, Express.js |
| Database | MySQL |
| External API | OpenWeather API |
| Architecture | RESTful API |
- Node.js 16+
- Angular CLI
- MySQL 8.0+
- A free OpenWeather API key
git clone https://github.com/AjayZordan/LFSS.git
cd LFSS
# Backend setup
cd farmer-backend
npm install
# Configure your MySQL credentials in models/db.js
node server.js
# Frontend setup (in a new terminal)
cd ../farmer-frontend
npm install
ng serve
⚠️ You'll need to add your own OpenWeather API key in:
farmer-frontend/src/environments/environment.tsfarmer-frontend/src/environments/environment.prod.tsReplace
'YOUR_OPENWEATHER_API_KEY'with your actual key before running.
Import the schema using:
mysql -u root -p < farmer-backend/data/sample.sqlLFSS/
├── farmer-backend/
│ ├── controllers/ # Request handlers (cropController.js)
│ ├── models/ # DB connection (db.js)
│ ├── routes/ # API route definitions (cropRoutes.js)
│ ├── data/ # Sample SQL schema
│ └── server.js # Express app entry point
└── farmer-frontend/
├── src/app/ # Angular components
└── src/environments/ # Environment configs (API keys)
R. Ajay Kumar LinkedIn · ajaykumar040702@gmail.com