Date Created: 8/18/22
Date Last Modified: 10/31/2024
The species selector DST is used to help farmers select a cover crop that fits their goals and constraints. The user can either input specifics about their field location and cover cropping goals or explore cover crops without entering those details. The tool is mainly used to explore expert reccomendations and ratings for cover crops in the farmer's USDA Plant Hardiness Zone. This allows farmers to make educated decisions that are best suited for their specific goals and can save time as opposed to calling the extension office.
Support for this project is brought to us by Agricultural Informatics Lab, NE SARE, USDA NRCS, NECCC, and the Precision Sustainable Agriculture.
To access the live tool, visit https://covercrop-selector.org/ To see development progress, visit https://develop.covercrop-selector.org/
- Cover Crop Species Selector Decision Support Tool
- Table of Contents:
- Tech stack
- Local Installation Steps
- Running in docker:
- Documentation
- Runbook
- Unit Testing
- Helpful Links
- Single page application made in React.js
- Ratings and zone info verified via Airtable and then ingested into a PostgreSQL database and served up using a Node.js API
Prerequisites:
- Node and NPM Download Here
- Git Download Here
- A code editor (we recommend vs code) Download Here
Steps:
- Open a new Terminal for Mac/Linux or Command Prompt for Windows
- Move to the desired folder
cd /path/to/folder
- Clone this repository into that folder
git clone https://github.com/precision-sustainable-ag/dst-selector
- From the Terminal/Command Prompt, move into the cloned directory
cd dst-selector
- Run
npm config set '@psa:registry' https://node.bit.cloud
- From the same command window, run
npm install
to install project dependencies. A full list of the dependencies can be found in package.json. If you are running on a windows machine delete package-lock.json prior to running the below command. - Create a file called .env in
root
directory (dst-selector). The file will contain the below keys. This document is in the git ignore, so it (and your API keys) won't be pushed to the repository. Ask @mikahpinegar or Adam Smith for the values of the keys
VITE_API_GOOGLE_API_KEY="<google key>"
VITE_API_OPEN_WEATHER_API_KEY="<open weather key>"
VITE_API_MAPBOX_API_KEY="<mapbox token key>"
VITE_API_AUTH0_DOMAIN="<auth0 domain>"
VITE_API_AUTH0_CLIENT_ID="<auth0 client id>"
VITE_API_AUTH0_AUDIENCE="<auth0 audience>"
VITE_API_USER_HISTORY_API_URL="<user history url>"
VITE_API_USER_HISTORY_SCHEMA="<schema>"
VITE_API_RELEASE_NOTES="<Release Notes URL>"
VITE_API_MAPBOX_TOKEN="<mabox token>"
- After the dependencies have been installed and the .env file has been created, run
npm start
to run the code locally. If you run into any issues take a look in the Runbook for previous issues and solutions. This will compile the JSX code into Javascript and open up a new browser window with the current version of the covercrops project!
Run ./start_script.sh
Run open http://localhost:3000
For in depth documentation see the wiki pages
Symptom:
Node sass not supported on Mac OS Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (88)
Solution:
npm rebuild node-sass
Symptom:
After running npm install
you might run into an Error E404 - Not Found - GET https://registry.npmjs.org/@psa%2fdst.ui.map - Not found
Solution: Follow these steps:
- Install the
react-scripts
package usingnpm install react-scripts --save
- Run
npm start
Line Spacing
Set Line spacing (CRLF -> LF)
git config core.autocrlf false
git rm --cached -r .
git reset --hard
To run the Cypress client
npx cypress open --config-file=dev.config.js
Confluence Links Development Best Practices Design Best Practaces ESLint Release Notes User History