Skip to content

Application that allows users to maximize their garden’s efficiency and carbon sequestration. Users can track the health of their gardens through light, temperature, and moisture sensors connected to RaspberryPis.

Notifications You must be signed in to change notification settings

My-Solar-Garden/front_end_rails

Repository files navigation

My Solar Garden - Frontend

Overview

My Solar Garden is an impact driven app here to support you in helping to keep our planet thriving. By signing up with My Solar Garden, you will be able to track your garden's health and, eventually, how much carbon is it offsetting.

My Solar Garden can give you daily updates as to how much moisture and light it's receiving. It will also provide innovative ideas on how to keep your garden healthy and thriving to continue to make a positive impact on our environment.

We want to live in balance with the diversity of our environment. It all starts with healthy soil, and that's what we will help you learn how to cultivate. It starts with one person. That person, is you.

🥉 3rd place winner at Turing's Demo Competition. Take a look at our presentation.


Repos

For access to all the repos that make up the Service Oriented Architecture of this application please visit our origanization page.

Live app

https://solar-garden-fe.herokuapp.com/

Local Setup

  • Versions

    • Rails 5.2.4.3
    • Ruby 2.5.3
  • Fork and clone the repository and then run the following commands:

    1. bundle (if this fails, try to bundle update and then retry)
    2. rails db:create && rails db:migrate
  • Obtain Google OAuth credentials

    • Visit https://console.developers.google.com/ and create a new project

    • Select the project and on the left click OAuth consent screen, choose external, click create, and proceed with the required fields (if a field is not required you can skip it)

    • Click on Credentials on the left then click '+Create Credentials' at the top. Choose OAuth client ID, choose Web application, and under Authorized redirect URIs if you plan on testing Google OAuth with localhost you will want to include:

    • http://localhost:3000/auth/google_oauth2/callback

    • Click Create and you should receive a Client ID and Client secret. These will go in your application.yml file as:

    • GOOGLE_CLIENT_ID: '< your ID >'

    • GOOGLE_CLIENT_SECRET: '< your ID >'

Run your own development server:

rails s

Database creation

  • My Solar Garden's Front End repository does not have a database that holds any sort of information. Any and all information that is depicted on the My Solar Garden FE repo is gained through API connections to the My Solar Garden BE Repo. With this being said, My Solar Garden FE Repo uses an empty database for testing purposes.

How to run the test suite

  • Clone the My Solar Garden FE repo
  • In the terminal while CD'd into the FE repo, run bundle exec rspec. This will run all of the tests within the FE repository

Learning Goals

  • Consume two or more external APIs
  • Build APIs that return JSON responses
  • Use an external OAuth provider to authenticate users
  • Refactor code for better code organization/readability
  • Utilize a Service-Oriented Architecture with a front-end, a back-end, and at least two microservices
  • Implement a production-quality user interface using Bootstrap or other common CSS styling framework
  • Optimize your application using at least one of the following
    • Database indexing
    • Eager loading
    • Caching
    • Background workers
    • AJAX requests
  • Practice good project management by using project boards, participating in daily stand-ups and team retros
  • Utilize quality workflow practices: small commits, descriptive pull requests, and code reviews
  • Write thorough, understandable documentation

Contributors

About

Application that allows users to maximize their garden’s efficiency and carbon sequestration. Users can track the health of their gardens through light, temperature, and moisture sensors connected to RaspberryPis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published