-
Install and Setup MySQL workbench Visit the official MySQL website to download the MySQL Workbench installer.
MySQL Workbench Download Page: https://dev.mysql.com/downloads/workbench/ Select the appropriate version based on your operating system (Windows, macOS, Linux) and Install.
*Launch MySQL Workbench. *Click on the "+" icon next to "MySQL Connections" to create a new connection. *Enter a connection name. *Set the connection method (e.g., Standard TCP/IP over SSH). *Enter the necessary connection details, such as hostname, port, username, and password. *Click "Test Connection" to ensure the connection is successful. *Click "OK" to save the connection.
Now you can connect to your MySQL server through MySQL Workbench.
-
Create a new Schema in MySQL connection Write a SQL script in Workbench to create a new schema. For example:
CREATE SCHEMA `your_schema_name`;
-
Using MySQL connection for Database Schema
*open the project in the vscode *navigate to the
djangobackend/djangobackend/settings.py
*add the following credentials to Database section to establish connection with MySQLNAME: your_schema_name USER: your_connection_name PASSWORD: your_connection_password ```
-
Setup & Activate a Python Virtual Environment for Django Backend
*Before you begin, ensure that you have the following installed on your system: Python: Make sure Python is installed on your machine. You can download it from python.org.
*Open a terminal or command prompt and run the following command to install virtualenv:
pip install virtualenv
*Choose or create a directory where you want to store your virtual environments. Navigate to this directory in the terminal or command prompt and run:
python -m venv auth
python3 -m venv authenv ```
-
Install Dependencies
cd fieldSense cd frontend npm install
# On Windows
auth\Scripts\activate
# On macOS
source authenv/bin/activate
-
Replace your apikey for GoogleMapsAPi and Google Earth EngingAPi *Replace Google Earth EngineApikey in Backend
fieldSense/djangoBackend/djangoBackend/settings.py GEE_PRIVATE_KEY == 'your gee apikey'
*Replace Google MapsApikey in FrontendfieldSense/src/pages/Map.jsx apiKey == 'your googlemaps apikey'
fieldSense/src/pages/MyFields.jsx apiKey == 'your googlemaps apikey'
fieldSense/src/component/MapComponent.jsx apiKey == 'your googlemaps apikey'
-
Run Project
cd fieldSense cd djangoBackend
*Activate the virtual environment:
``` auth\Scripts\activate ```
``` source authenv/bin/activate ```
cd .. pip install -r requirements.txt python manage.py makemigrations python manage.py migrate python manage.py runserver
cd fieldSense npm start
Access the application at http://localhost:3000 in your web browser.