Giter VIP home page Giter VIP logo

tcl-16-smart-shopping-list's Introduction

Meat Cheese Bread (MCB) Netlify Status

Meat Cheese Bread is a React/Firestore web application that tcl-16 collaborated on as part of The Collab Lab's Winter 2021 cohort. Over an 8-week period we created a “smart” shopping list app that learns your buying habits and helps you remember what you will likely to need to buy on your next trip to the store.

Multi device mockup of Meat Cheese Bread

How does it work?

As a user, you will enter items (e.g., “Greek yogurt” or “Paper towels”) into your list. Each time you buy the item, you mark it as purchased in the list. Over time, the app comes to understand the intervals at which you buy different items. If an item is likely to be due to be bought soon, it rises to the top of the shopping list.

Want to see more?

Interact with the live site and/or watch the video demo! You can join an existing list with: actor racy artie

Getting Started

Download Node and NPM

Clone project locally

  • On GitHub, click the green "Clone or download" button and copy the web URL. screenshot of how to copy the web URL for a GitHub repo
  • From your terminal, cd into the directory where you want this project to live. screenshot of how to navigate folders in terminal
  • Once you’re in the directory, type git clone followed by the web URL you just copied to your clipboard from GitHub. screenshot of how to git clone
  • Then navigate into the project by typing cd followed by the project directory’s name. screenshot of how to cd into the project directory

Update dependencies

  • Once you have the project locally and you are in the project directory, you’ll want to update all the project’s dependencies. To do so, type the following into your terminal: npm update screenshot of npm update in the terminal
  • Maybe take a sip of coffee or check in on Twitter, this could take a minute -- don’t worry.

Access the project in your browser

  • After you’ve cloned the project locally and updated the dependencies, run the project by typing the following into your terminal: npm start. You should be able to see the project at localhost:3000

Features

User

  • Join an existing list (log in)
  • Create a new list (sign up)
  • Switch lists (sign out)
  • See their token to share and re-access their list
  • Remain logged in if they never logged out

List

  • If there are no items on the list, prompts the user to add an item
  • Add items with the name and how soon they plan on buying them
  • Add items only if they are not present on the list (including different punctuation)
  • See all of the items on their list
  • Items are color-coded and sorted by the estimated number of days until next purchase, with the soonest at top and latest at the bottom except for if its “inactive”. Items with the same number of estimated days until next purchase are sorted alphabetically.
  • When updating the item as "purchased", updates last purchase date and marks as "purchased" for 24 hours
  • Learns overtime when the user should anticipate when to buy items on their list based on how many times the user bought it and the intervals between purchase dates
  • Delete items from the list

Tech Stack

Tools

Contributors


Kevin Davis

Waverley Leung

Jessica Salbert

Maeesha Rahman

Acknowledgements

We would like to thank:

  • Eddie Solar
  • Melina Mejía Bedoya
  • Skyler Shaw
  • Andrew Hedges
  • Stacie Taylor
  • TCL Winter 2021 Cohort
  • everyone at The Collab Lab

tcl-16-smart-shopping-list's People

Contributors

thekidnamedkd avatar maeesha-rahman avatar wlcreate avatar jessicasalbert avatar skylerwshaw avatar itsoliviasparks avatar segdeha avatar stacietaylorcima avatar laurenmbeatty avatar

Watchers

James Cloos avatar

tcl-16-smart-shopping-list's Issues

24. Changing to our own Firestore database

AC:

  • Create our own Firestore database
  • Share access to our own database with the rest of the team
  • Update to the new database in our code
  • Check that the behavior (read/write) remains the same

5. As a user, I want to join an existing shopping list so I can share a shopping list with another person.

Tokens can be shared with other users to allow them to co-manage a given list.

Joining an existing list consists of the following:

  • User enters an existing token
  • Save the token to localStorage
  • Show the user the existing list

AC:

  • When the user does not already have a token in localStorage, on the onboarding/home screen, a simple form is displayed that allows the user to enter a token
  • Entering the token and hitting submit saves the token to localStorage, effectively giving them joint control of the list
  • On submit, show an error if the token does not exist
  • If they get an error message, allow them to try again or create a new list

12. As a user, I want to view a list of my shopping list items in order of how soon I am likely to need to buy each of them again so that it’s clear what I need to buy soon.

Possible item states are as follows:

  • Need to buy soon (fewer than 7 days)
  • Need to buy kind of soon (between 7 & 30 days)
  • Need to buy not soon (more than 30 days)
  • Inactive (when there’s only 1 purchase in the database or the purchase is really out of date [the time that has elapsed since the last purchase is 2x what was estimated])

AC:

  • Items in the list are shown as visually distinct (e.g., with a different background color on the list item) according to how soon the item is expected to be bought again: Soon, Kind of soon, Not soon, Inactive
  • Items should be sorted by the estimated number of days until next purchase
  • Items with the same number of estimated days until next purchase should be sorted alphabetically
  • Items in the different states should be described distinctly when read by a screen reader

3. As a user, I want to set up a new shopping list so I can start tracking purchased items.

A shopping list consists of a set of items associated with a user’s token. Creating a new list consists of the following sequence:

  • Generate a new, unique token
  • Save the token to localStorage
  • Show the user the list view

The following script should be used to generate a suitable token: src/lib/tokens.js

AC:

  • For users who do not already have a token/list, a button or link exists on the home screen that allows them to create a new list
  • Clicking the button/link generates a new token and saves it to localStorage
  • Once the token has been created and saved, the user is redirected to the "list" view
  • For users who do have a token already saved in localStorage, they should be shown/redirected to the "list" view

9. As a user, I want to filter my shopping list to make it easier to locate an item in the list.

AC:

  • Display a text field above the top of the shopping list
  • As the user types into the field, the list should narrow to display only items that contain the text the user entered in the filter field
  • When the field has text in it, the user should be able to tap a UI element (e.g., with an "X" button next to the field) to clear the field
  • The filter text should match any part of the item name (i.e. it should not only match from the start of the string)

14. As a user, I want to see a nav bar which allows me to navigate to different pages

AC:

  • Nav bar should display the following icons:
  • adding a new list item -> directs user to add item component
  • viewing list -> directs used to list view component
  • "logging out" -> removes token from local storage and brings user back to home page
  • Icons noted above should only be visible for users who are currently logged in (not on home page)
  • Nav bar should be rendered across the entire app
  • Nav bar should match style/colors from wireframe and sass file

2. As a user, I want to be able to navigate between the “list” view and the “add an item” view so that the interface is clearly delinteated between viewing and adding.

This is 1 of 2 stories that should be completed in the first week to enable further development of the app.

AC:

  • react-router-dom has been added as a project dependency
  • Links are present and persistent at the bottom of the app: one for the “list” view, the other for the “add an item” view
  • When one of the links is clicked, the browser URL updates to represent the current view and a matching view component is displayed
  • Whichever view is selected, the corresponding link should display in bold text

11. As a user, I want to be able to delete items from my shopping list so that my list isn’t cluttered with items I don’t want to buy in the future.

It’s possible our users may make an error when entering an item or may decide they won’t be buying a certain item again in the future. Let’s help them keep their lists tidy!

AC:

  • User is able to delete an item from the shopping list
  • Before deleting, prompt the user to confirm that they really want to delete the item to prevent accidental deletions
  • Deletion should cause the associated record(s) in the database to be deleted

6. As a user, I want to be alerted when I’m entering an item that is the same as something already on my list so I can avoid duplicate items.

AC:

  • Show an error message if the user tries to submit a new item that has the exact same name as an existing item
  • Show an error message if the user tries to submit a new item that has the same name as an existing item, where capitalization has been normalized and punctuation has been removed
  • The user’s original input should be what gets saved in the database

4. As a user, I want to add a new item to my shopping list so I can start recording purchases.

A shopping list item consists of the following data points:

  • Name of item
  • How soon are you likely to buy it again?
    • Soon (in the next 7 days)
    • Kind of soon (in the next 14 days)
    • Not soon (in the next 30 days)
  • Last purchased date

AC:

  • User is presented with a form that allows them to enter the name of the item and select how soon they anticipate needing to buy it again (Soon, Kind of Soon, Not Soon)

  • When the user submits the form, the item is saved to the database, associated with the user’s token

  • Along with the item name, an integer corresponding to the estimated number of days until next purchase is saved: 7 for “Soon”, 14 for “Kind of Soon”, and 30 for “Not Soon”

  • The last purchased date should be set to null initially (i.e. you can create an item without purchasing it)

  • Item names should be displayed as a simple, unordered list on the list view after they’re added
    A shopping list item consists of the following data points:

  • Name of item

  • How soon are you likely to buy it again?

    • Soon (in the next 7 days)
    • Kind of soon (in the next 14 days)
    • Not soon (in the next 30 days)
  • Last purchased date

18. As a user, I want to log out and see my token from the navigation bar

The nav bar already has the icons to "log out" and "share token" so this is mainly to add the logic/functionality for them.

AC:

  • "log out" -> removes token from local storage and brings user back to home page once they click on the icon
  • "share token" -> using sweet alerts (which is already added as a dependency), show the user their token with a message once they click on the icon (i.e. “Share this token with friends or use it yourself to access this list again: mark marks swipe

13. As a user, I want the app to look professional and welcoming

The last 2 weeks of the project will function a little differently than the rest. Your team will self-organize around a lightweight design process to come up with a polished look-and-feel for your app.

This will require you to make decisions together as a whole team, then implement your vision. The process outlined here is our best suggestion for how to proceed, but you are free to take whatever approach you see fit!

You’ll notice this is the last issue on the board! That’s because the expectation is for you to write the stories needed to complete the implemenation of your design direction.

As always, lean on your mentors for guidance if you are unsure how to proceed!

Design Process

  1. What is the tone you’re going for? What feeling are you trying to convey? Come up with 3 to 5 words that best capture how you want users to perceive your app.
  2. Create a mood board. A mood board helps everyone get on the same page in terms of the direction in which you want to take your design. Add elements to your mood board that represent the tone you’re trying to achieve.
  3. Decide on fundamental elements of your design, including the following:
    • TypographyGoogle Fonts is a good choice for finding web fonts you can use in your app. They have hundreds of typefaces to choose from, but consider usability in whichever one(s) you choose!
    • Colors ← Make sure these are accessible!
    • Iconography / imagery ← Start here to find free icons you can use in your app!
  4. Decide whether you want to code your CSS from scratch or integrate a CSS framework. There are pros and cons to each!
    • Vanilla CSS gives you more control, but it can be harder and/or take more time to achieve a given effect.
    • Frameworks help you get things done faster, but often at the cost of not giving you full control of the design.
  5. If you choose to use a framework, evaluate your options to make sure you pick one that will suit your needs.

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.