Skip to content

Ghenet/PlantPal

Repository files navigation

PlantPal

PlantPal is an app designed to simplify plant owners' lives and help them keep their plants alive. Users can sign up and add which plants they have from a designated list. Once they add their plants, it will automatically begin calculating when the plants' next water day is. When you have exceed the amount of time between waterings, the tracker will let you know and you can reset the counter after you water your plant.

https://plant-pal.herokuapp.com/

profile

-Plant Page Where the used picks a plant

plant's page

Technologies Used:

  • Python Flask
  • Sqlite DB
  • Peewee
  • JavaScript and Ajax
  • Custom HTML, CSS, Bootstrap

Our Process

The first steps we took with this project was to plan out our database and how our tables would be connected together. We decided to use three tables, Users, Plants, and Users' Plants, which is a join table. The join table is where we stored information of when the plant was added and the date it was last watered so we could track when it needed to be watered. We also sketched out our wireframes and defined our user stories. Users can signup/login and they will be redirected to their profile. From their profile page, they can view their profile information and their existing plants. Once they click to add new plants, they will be redirected to a plant selection page. Users can select multiple plants and optionally add notes to the plants as well. Once they have added all the plants they want, they are redirected back to their profile where they can see all the plants.

Challenges and Wins

Wins :

  • Core understanding of the languages, ORM and libraries we used
  • Creating multiple user’s plants at the same time

Challenges:

  • Deployment. Unfortunately Heroku had an issue closing the database so our seed data did not properly populate the database
  • Updating the user’s plants (notes and watering)

Future Development Ideas

Due to the time constraints and the pace we had to learn new technologies, there were some features we wanted to implement but weren't able to.

  • Email reminders
  • Search bar for plants
  • See other users' plants, make posts, share advice, etc.

Code Snippets

This code in our profile template gives the user a warning once their plant hasn't been watered on time. We substracted the date last watered to the current date and converted the days to an integer. Then we compared it to the plant's preset frequency of watering. If the days had exceeded the recommended frequency, the warning would appear.

When the user hits the button to add new plants, the selected plants are grabbed from the page. Then we parsed through the collection to get the plant id and any notes the user may have added and add them to respective arrays. They we sent the arrays to the backend and opened the arrays to add the data inside to create new users' plants. We ended up learning that we could send arrays to the backend and how to parse through the information with Python.

PlantPal App File Hierarchy:

plantpal Hierarchy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors