The Fertilizer Recommendation System is a web-based application designed to provide tailored fertilizer recommendations for different crops based on various factors like growth stage, soil properties, climate, and more. It consists of a frontend built with React and a backend powered by Flask, using Prolog for inference.
- Real-time Fertilizer Recommendations based on multiple parameters.
- Interactive UI allowing users to input their crop and environmental data.
- Backend Inference Engine using Prolog to calculate optimal fertilizer recommendations.
- Frontend: React, JSX, Vite (with
fetch
for API requests) - Backend: Flask, Python, SWI-Prolog
- Docker: For containerization and deployment
To get started with the project locally, follow the steps below:
git clone --recurse-submodules https://github.com/Programming-Sai/Fertilizer-Recommendation-System-Client-Server.git
cd Fertilizer-Recommendation-System-Client-Server
Note
If you have already cloned the repository without --recurse-submodules, you can initialize the submodules separately with:
git submodule update --init --recursive
- Frontend: Fertilizer Recommendation System Client
- Backend: Fertilizer Recommendation System Server
-
Navigate to the
server
directory.cd server
-
Install the necessary dependencies:
pip install -r requirements.txt
-
Start the backend server:
python scripts/server.py
The backend should now be running at
http://localhost:5000
.
-
Navigate to the
client
directory.cd client
-
Install dependencies:
npm install
-
Start the frontend:
npm run dev
The frontend should now be accessible at
http://localhost:3000
.
-
From the root directory, run:
docker-compose up --build
- To stop it you can run
# Ctrl + C # If running in the foreground docker-compose down # To stop and remove containers
This will build and run the frontend and backend containers.
Once both the frontend and backend are running, you can navigate to http://localhost:3000
in your browser and start using the application.
- Navigate to
Predict
from the Navbar to get to the parameters form - Input the required crop, environmental and soil parameters.
- Click Get Recommendations to receive fertilizer recommendations tailored to your inputs.