Coder Social home page Coder Social logo

thirsty_plants's Introduction

Build Status

Waffle.io - Columns and their card count

README

Description

Thirsty Plants is an 11-day, five-person project during Mod 3 of 4, for Turing School's Backend Engineering Program.

Our challenge was to create a web application from idea to inception. Project requirements include: authentication with a third-party service, consuming an api, and solving a real-world problem.

Thus, Thirsty Plants was born. Thirsty Plants is a web application designed to assist users in keep tracking of watering their gardens, in accordance with the precipitation in their local area. The application utilizes the languages of Ruby, Javascript, HTML, CSS, Bootstrap, the web framework of Rails, and authentication via Google OAuth. The Dark Sky weather API is utilized to consume precipitation data.

screen shot 2019-02-20 at 4 55 26 pm

Getting Started

To run Thirsty Plants on your local machine, navigate to the directory in which you would like the project to be located, then execute the following commands:

$ git clone [email protected]:le3ah/thirsty_plants.git
$ cd thirsty_plants
$ bundle
$ rails g rspec:install
$ rails db:create
$ rails db:migrate
$ bundle exec figaro install

Setup your environment variables:

Sign Up on the following API's:

Add the following code snippet to your config/application.yml file. Make sure to insert the key/secret without the alligator clips ( < > ).

GOOGLE_CLIENT_ID: <insert>
GOOGLE_SECRET: <insert>

darksky_api_secret: <insert>
google_maps_api_key: <insert>

TWILLIO_ACCOUNT_SID: <insert>
TWILLIO_AUTH_TOKEN: <insert>

ADMIN_PHONE_NUMBER: '<insert number associated with your Twillio account>'

Running Tests

To run the test suite, execute the following command: redis-server. While that server is running, open a new terminal tab, run rspec.

Deployment

To view Thirsty Plants in development, execute the following command from the project directory: rails s. In a browser, visit localhost:3000, to view the application.

To view the application in production, from the project directory, execute the following commands:

$ createuser -s -r thirsty_plants
$ RAILS_ENV=production rake db:{drop,create,migrate}
$ rake assets:precompile
$ rails s -e production

Tools

  • Travis CI
  • Figaro
  • Faraday
  • Shoulda-Matchers
  • Factory Bot
  • Google OAuth
  • Bootstrap
  • Dark Sky
  • Waffle.io
  • GitHub
  • FactoryBot
  • RSpec
  • Capybara
  • Pry
  • Launchy
  • SimpleCov
  • PostgreSQL
  • Chrome Dev Tools
  • Twillio
  • Sidekiq
  • New Relic
  • Paperclip
  • ImageMagick

Rubric/Project Description

http://backend.turing.io/module3/projects/terrificus

Authors

Teamwork Makes the Dream Work

screen shot 2019-02-20 at 5 39 39 pm

Acknowledgments

thirsty_plants's People

Contributors

bendelonlee avatar le3ah avatar asmolentzov avatar abenetka avatar mackenzie-frey avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

thirsty_plants's Issues

Generate Schedule

On my dashboard, I see a link to generate my watering schedule. When I click this button, I am redirected to the schedule index page. The index page shows the schedules for each of my gardens.

The schedule index page should show the schedule for each of my gardens. The schedule includes then watering schedule for each plant.

(reference wireframes)

User location

as a user
When I create a garden
I am asked if I want to give permission to share my location
Now weather data is specific to my location

styling 404 page

As a visitor to the site who is not logged in
When I visit any path other than '/'
I see some sort of 'error page not found' page with a 404 status.
("Sad plants! Can't find this page!" maybe??)

schedule plant icon instead of checkbox

Instead of a checkbox, I see a plant icon. The plant icon is yellow. I click on the plant name or the icon. In either case, the plant turns green. The plant name is crossed off.

User Registration

As a user, when I visit the root_path, I should see a link to login or register.
If I click on 'sign up' and I will be taken to Google's OAuth information page. If I click on login, I am redirected to a login page, where I can enter my email address, which will start the OAuth process.

Tutorial for TDD of Google OAuth & Rails (made by Jesse - a Turing grad):
http://www.jessespevack.com/blog/2016/10/16/how-to-test-drive-omniauth-google-oauth2-for-your-rails-app


Redirect to my user dashboard.

required by #3
required by #7
required by #11
required by #10
required by #4
required by #8
required by #9
required by #6
required by #5
required by #2

Dream - Plant API Consumption

A user can tag their plant as being a member of a species.
Using a plant API, there is now a default image available for their plant.

Schedule Index Page

The schedule show page should show the schedule for each of my gardens. The schedule includes the weather & watering schedule for each plant.

Add Plant to Garden

From my garden's show page, I can click a link to add a plant to my garden. When I click this link, I am redirected to a create plant page. On this page, I can add a plant name and times per week. After I select 'create plant', I am redirected to my garden show page and I see a flash message that says, "Party in my plants, you've created a new plant!"

Delete garden

On my garden show page there is a button to delete a garden.
When I click, a pop-up box asks to confirm.
I confirm.
And I am taken to my dashboard and I see there that the garden does not appear.

Create Garden

From my dashboard, when I select 'create garden', I am redirected to the create_garden_path. I can fill in a garden name, zip code, and multiple plants. Each plant has a name and watering requirements.
After I select 'create my garden' I am redirected to that garden's show page where I see the appropriate details.

Rainy Day Notice

As a user,
When I have a watering scheduled on Monday,
On the day before the watering is scheduled,
If the forecasted chance for precipitation is high,
I receive a text message notice.
This notice informs me of the precipitation forecast.
I also see a link to cancel the watering.

(Dream/eventually, A message: "Don't worry, if it doesn't actually rain we'll let you know and you can reschedule")
#epic

update garden

On my garden show page there is a link to edit the garden.
When I click I see the old values in each field
I input new values
and click update
And I am taken back to the garden show page
There I see the new values

โ€ข include sad path

Update Plant

From my garden's show page, I can click 'update my plant'. When I select this, I am redirected to my edit page, and I can update the times per week and the name. After I click 'update my plant', I am redirected to my garden's show page, and I see a flash message indicating that my plant has been successfully updated.

Garden Show Page

When I visit the show page for one of my gardens, I should see my garden's name, the names of the plants inside my garden, my garden's location, and the thirstiness level of my plants

Update schedule

On my schedule index page:

  • I am able to add and remove waterings
  • I am able to move a watering from one day to another
  • (stretch: I am able to move multiple waterings at once from one day to another)

checking off plant updates database

I go to the page, I check off a box. I go back and it's still checked. I uncheck it. I leave and return to the page. It remains unchecked.

User Dashboard

When I visit my dashboard, I can see all of my existing gardens or a message indicating that I have no gardens. I can also see a link to create a new garden .
Each garden name is a link to that garden's show page.

Remove Plants

From my garden's show page, I have the ability to delete my plant. When I select the delete button, I am returned to my garden's show page, and I no longer see that plant. I see a flash message saying "goodbye dear plant"

App Optimization

Consider:
Caching (ie nav bar and persistent elements)
CSS

  • Get metrics from suggested websites on current load times
  • check out links mentioned in rubric
    Card 102 is a start on this card.

Dashboard Weather Icons

The DarkSky API has an icon under ["daily"]["icon"] which correlates with the weather for that day. Insert conditionals into the dashboard view so that an image ie rain drop appears if the icon is -rain- for that day.

*Before implementing take a look at the data to insure that the icon correlates with the ["precipProbability"].

** By the time this card is being worked on, the API call for "icon" will be created.

Add Weather to Schedule

As a logged in user of the site
When I visit my schedule
I see the weather forecast (precipitation %) for each day

Schedule: Day background colors change

When all of my plants are watered, the background color of today changes from light yellow to light green.
Previous days are either yellow or green, depending on whether all their waterings have been completed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.