Weather Watering
An app reminds you when to water your plants based on the weather in your area, daily water loss and the amount of water your plant requires to stay healthy.
Install
Clone the repository
$ git clone https://github.com/DanaGS/Weather-Watering
Check your Ruby version
$ ruby -v
This project uses Ruby version 3.1.0 and Rails version 7.0.2.2. If you you are using an older version, you can see instructions on how to install the latest release on: https://www.ruby-lang.org/en/downloads/.
Install dependencies
$ bundle install
Set environment variables
This project uses Figaro to store environment variables: https://github.com/laserlemon/figaro. You will need to replace database name and credentials.
This app uses external apis to obtain geolocation and weather data. You will need to sign up and obtain an api key for each:
Initialize the database
$ rails db:create db:migrate db:seed
Serve
$ rails s
Run on localhost port:3000
Run Sidekiq and background tasks
The app uses Sidekiq with Redis server to run background jobs. These jobs include making scheduled calls to OpenWeatherMap API to update weather data, calculate daily evapotranspiration, update plants soil water deficit, and send email reminders.
To run Redis:
$ redis-server
To run Sidekiq:
$ sidekiq