Functionality and Technology
Feature Specifics:
- Login/Sign Up/Logout: The Login is basic with a place for your email and password. The sign up has a space for your username, email, and password. The Logout takes you back to the log in page. These pages were customized to have a simple design that includes our logo.
- My Account: This page will welcome you to the app, show you any plant related notifications you have, and more. If you have a question you can easily access the public forum, edit your own account info, and add a plant to your “garden”. Your garden will be a collection of the plants you own, visually indicated below your user information. These plant cards can be edited, removed, and play a role in the chatbot feature.
- Chatbot: The chatbot uses a multiple choice questionnaire to ascertain information for the user. The chatbot is displayed on a single page that resembles Facebook messenger, where incoming messages from the bot are on the left. After the bot responds to the user it displays optional replies using bootstrap buttons.
- Forum Posts: This page is robust because posts can be filed by a different enum topic, and because a post can have many replies. The URL patterns above demonstrate the many functionalities, but this is our basic forum. Currently we have used data from the Faker gem to populate posts (Faker::Movies::Ghostbusters.quote). Posts and comments you submit are editable.
- application.html.erb (header, footer, scrollbar): This is the code where we implemented the navbar, the footer, and the scroll bar. The scroll bar was implemented using CSS. The footer was implemented using bootstrap and includes links to helpful areas. The bootstrap navbar helps the user with accessibility and has links to all the pages of our app, including the login and logout.
- Reminders: This allows users to put in and store reminders for their plants. There is also a clock on right with a calendar date so that the user knows what time they are putting into their reminder.
- Notifications: This allows the user to check on posts that have been interacted with, with an option to clear them all out at any point
- Maps: This page shows you a local view of the area around you and you can search for local plant stores.
Cool Technology
APIs
- Trefle: Currently used in the chatbot to get information about plants based on plant type, including sunlight, water, temperature, and many more. It has an exhaustive list of plants sourced from USDA, Wikimedia, and more.
- Mapbox: Currently used in the store locator with tilesets that has florists in MA.
- Pixabay: Currently used to fetch plant pictures based on the user selected plant type.
- OpenWeather: Planned to use this for fetching weather at the current user’s location so that we can estimate temperatures and better understand what plants the user can grow at home.
- Ambee Soil: Planned to use this for fetching soil information to better estimate what plants the user can grow at home.
Gems
- Clearance: Currently used for authenticating/authorizing users and things like remembering them and validating their login/signup data. We’re working on finalizing the forgot-password feature using this gem, as well.
- binding_of_caller: Currently used in development to aid in debugging. It allows us to evaluate code to check the state of our objects whenever we hit an error directly in the browser.
- RailsAdmin: Currently used in development, test, QA, and production. To make a new RailsAdmin you have to create it in the console like (below). To use it, sign in with admin user and go to /admin
- rubocop: Currently used for our backend team to check code style. We also have it set up in a GitHub workflow action (check here) to easily see what the linter thinks about the code in the pull request (e.g. see how it is evaluated for this PR).
- Kaminari: Currently used for paginating the posts page every 7 posts. We didn’t like how we had to scroll way down to see all posts because then we would have to scroll all the way back to get to the topics pills; this solved the problem.
- RSpec: Currently used for integration tests, which as you can see in that link we’ve done for Clearance (signing in, signing up, and signing out), and RailsAdmin (visitor is admin, visitor is not admin).
- rails-controller-testing: Currently used in our in progress user plants integration tests to check that the correct template is getting rendered on GET request to edit a user’s plant.
- factory_bot_rails: Currently used in our integration tests to generate users for Clearance and RailsAdmin integration testing (similar to what Rails’ native fixtures do).
- active_record-events: Currently used for adding an edited tag to posts that have been edited. It also allows us to keep track of the exact time a post was edited. We plan to use this for replies as well.
- Wicked: Currently used in the chatbot so that it can ask more types of questions without bloating the code in the form of a wizard.
- Select2: Currently used to integrate jQuery Select2 plugin that allows users to search in a select box. This would be very useful for searching plant types when making or updating a user plant.
- Notifications: Currently used to give users notifications whenever someone replies to their posts.
- Gravtastic: Currently used to fetch users’ gravatars based on their emails.
More
- Heroku Scheduler: Planning to use this to help us with sending reminders to users.
- We used an automatically deployed staging and production Heroku apps to test our developments on heroku.
- We used GitHub actions to constantly test our app with rubocop and run our tests on every pull request.
Next page