GardenThat is an application meant for any gardener. Search a selection of fruit and vegetable bearing plants. Add your favorite plants to your Garden. Automated calendar notifications tell you when to expect your first harvest.
GardenThat is built on a rails framework and uses two separate Sinatra microservices. Our plant microservice houses a database of basic plant information and is tied to GrowStuff's API (see acknowledgments section below). The plant microservice takes in partial or complete searches and returns a list of plants stored in its database. Users can also search plants through a catalog of over 800 plants. Our second microservice ties into the Google Calendars API. A GardenThatApp Google calendar is created the first time users sign in (through Google OAuth) and our second microservice adds notifications to their calendar based on the plants they've added to their garden(s).
Our Plant MicroService can be found here
Our Notification MicroService can be found here
- Frameworks: Ruby on Rails, Sinatra
- Deployment: Heroku
- Database: PostgreSQL
- Testing: RSpec, RackTest, SimpleCov, Capybara
- Front-End Design: Bootstrap
- Continuous Integration: Travis CI
- Background jobs/workers: Sidekiq
- Project Management: Trello
- ... and a forge of amazing RubyGems!
To get a local copy up and running follow these simple steps.
- Clone the repo
git clone https://github.com/adumortier/gardenthat.git
- Install the Gem File
bundle install
- Create your environment
rails db:create
rails db:migrate
- Install Figaro
bundle exec figaro install
- Register your app with Google to receive your
client_id
andclient_secret
Your client_id
and client_secret
keys must be stored securely in the application.yml
file of your app/config
directory.
GOOGLE_CLIENT_ID: <YOUR CLIENT_ID HERE>
GOOGLE_CLIENT_SECRET: <YOUR CLIENT_SECRET HERE>
- Add your keys to your app on Heroku
figaro heroku:set -e production
- Install RSpec
bundle install rspec
- Run the test suite from the root directory of the repository
bundle exec rspec
Retrieve the events from the GardenThatApp calendar:
GET https://notificationmicroservice.herokuapp.com/events/info?token=<your_google_token_here>&refresh_token=<your_google_refresh_token_here>&calendar_name=GardenThatApp
Create a new calendar:
POST https://notificationmicroservice.herokuapp.com/calendar/new?token=<your_google_token_here>&refresh_token=<your_google_refresh_token_here>&calendar_name=<calendar_name_here>
Create a new event (date format yyyy-mm-dd):
POST https://notificationmicroservice.herokuapp.com/event/new?token=<your_google_token_here>&refresh_token=<your_google_refresh_token_here>&name=<event_name_here>&description=<event_description_here>&date=<date_here>
Delete an event:
DELETE https://notificationmicroservice.herokuapp.com/event/info?token=<your_google_token_here>&refresh_token=<your_google_refresh_token_here>&calendar_id=<calendar_id_here>&event_id=<event_id_here>
Get All Available Plants:
GET https://plantmicroservice.herokuapp.com/allplants
Query One Plant:
GET https://plantmicroservice.herokuapp.com/plant/REQUEST
Get a selection of 10 results that match a partial:
GET https://plantmicroservice.herokuapp.com/api/REQUEST
- GrowStuff.org
- Google Dev
- Gabz Cirbo for designing the GardenThat logo!
Deployed Application on Heroku: GardenThat!