Giter VIP home page Giter VIP logo

open_pantry's Introduction

Build Status

OpenPantry

A management system for pantry programs to help people eat healthy meals with dignity

  • NOTES:

    • We are moving towards a SaaS like model, with one subdomain per facility, and facilities are managed by super-admins or by facility specific admins
    • Masbia has several locations, but we're trying to validate the scope and use-case for other organizations, please get in touch if you work with one
    • Users are created/managed per facility on a user_selections page, and globally in a /manage/users page.
    • Food recipients are managed as users and can be logged in via magic login-links to be clicked on or emailed to them
    • We've been using ZenHub chrome extension for project management but this has caused some confusion, so we may move away from it...
    • Some mockups and UX flow for where we're trying to head are posted here.
    • We initially attempted to make this multi lingual from the start but have largely deferred this work until things are more stable.
      • We have partial translations started for 9 languages
      • We have thousands of foods from USDA nutritional database ready for dynamic translation
      • We are using POEditor.com for static site translation, contribute to translations here: https://poeditor.com/join/project/wBfgEEUCht
      • We probably need to move to a database driven translation system for foods, given the quantity we are trying to manage, but we still need translation help.
      • Our curent best source for food images, facts and translations may be https://us.openfoodfacts.org/ but we started with USDA database and much work is needed to leverage/combine and rework the data model to pull photos and translations from openfoodfacts
  • Getting started with development:

    • Mac homebrew:
      • ensure homebrew is installed (instructions at https://brew.sh/ or paste /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" into terminal)
      • brew bundle
        • This will install elixir, erlang, yarn, and download Postgres.app which has postgis preinstalled
        • It will cd into assets directory and install npm packages via yarn
        • You can use another postgres, but you may have to manually install postgis
      • run from open_pantry dir mix do deps.get, ecto.create, ecto.migrate, run priv/repo/seeds.exs
      • Start Phoenix endpoint with mix phx.server, or iex -S mix phx.server (this gives a server and REPL/console in one window)
    • Docker/docker-compose (fake, factory generated data but no dependencies)
      • Install docker (on most systems this also installs docker-compose)
      • Clone the OpenPantry repo and cd into directory
      • Run docker-compose run setup
      • Run docker-compose up web
    • Local/native development on Mac/Linux manually, without automation from brew bundle via Brewfile above (detailed instructions only for Mac at present, similar for linux)
      • Install Postgres (Mac)
        • Download and install the Postgresapp.com from their site
          • Execute the following command in Terminal to configure your $PATH, and then close & reopen the window: sudo mkdir -p /etc/paths.d && echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp
        • Alternatively install Postgres with Homebrew
          • Execute (brew install postgres) in Terminal
      • if using Postgres.app you must initialize a data directory after installing, and follow instructions for adding CLI tools to your Terminal path... which psql but succeed when done
        • (instructions defaulting to Mac below... for simplicity, linux users extrapolate, Windows, I have no idea, PR's with instructions for either/both welcome)
      • Install Elixir/Erlang (brew install elixir)
      • Install NPM and yarn (brew install node && npm install -g yarn)
      • Clone this repository locally, git clone [email protected]:openpantry/open_pantry.git
      • cd into the directory cd open_pantry
      • Download database from s3 via wget https://s3.amazonaws.com/open-pantry-dev/openpantry_dev.dump
        • Note we had problems with this dump being improperly generated recently. I beleive the problem is fixed, but if you downloaded previously or have problems please contact someone for support, it's probably not your fault!
        • Dumps and restores are based on the method described here: https://devcenter.heroku.com/articles/heroku-postgres-import-export
      • Install Elixir package dependencies with mix deps.get
      • Create the database in Postgres with mix ecto.create, assuming default password etc in config works.
      • Migrate the database to add migrations since dump was created, via mix ecto.migrate
      • Import the dump to the database via pg_restore --verbose --clean --no-acl --no-owner -h localhost -U postgres -d open_pantry_dev openpantry.dump
      • Install Node.js dependencies with yarn install
      • Start Phoenix endpoint with mix phx.server, or iex -S mix phx.server (this gives a server and REPL/console in one window)
    • ALTERNATIVELY (and with much less detail), if you DON'T WANT TO USE the dump file referenced above/want to generate a dump from scratch, the above dump was generated with a complete USDA food/nutrient database approximately as below, along with non-dump steps above:
      • Create and migrate your database with mix ecto.create && mix ecto.migrate
      • Git clone https://github.com/openpantry/nutes locally and run make, modifying if necessary to point at your Postgres DB and the directory path to your local copy in imports.sql (requires golang to build data_cleanup tool)
      • Add seed data with mix run priv/repo/seeds.exs but modify to leave out foods/stocks as these are fakes generated by factories, you have real food from USDA

Now you can visit localhost:4000 from your browser.

Learn more

open_pantry's People

Contributors

bglusman avatar cheerfulstoic avatar davearonson avatar fcapovilla avatar keathley avatar komizutama avatar neilfulwiler avatar net avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open_pantry's Issues

Epic: Language/Accessibility

The interface functions in a language and use flow that is accessible to aid devices, differing literacy levels and languages

Improve donation funnel UX

We have a pretty poor funnel for donations. Something like 76% of people reaching our donate page get lost along the way.

Language Accessibility

A guest will be able to read the tablet in their language

Acceptance Criteria

  • The first screen will be a language selection page.
  • Upon selection, all guest-oriented pages (food lists, and shopping cart, notices, etc) will be in that user's language
  • Staff-facing pages will be in English at least initially.
  • Languages must include
    • Yiddish
    • Spanish
    • Russian
    • Uzbek
    • Mandarin (both Traditional and Simple)
    • Cantonese (both Traditional and Simple)
    • Arabic
    • Urdu
    • Hindi
    • French
    • Creyole

EPIC: Inventory Management

A live updating database of all inventory with stock locations which can have items added or subtracted.

User Permissions

AC:

  • A user has one level of permissions.
  • Permissions allow behavior as described below

Levels:
Each subsequent level includes prior permissions.

  • Guest - mvp
    • Can edit own information
    • Can order a package of food.
  • Volunteer
    • Can clock in/out
    • Activity logged
    • Can add food to inventory.
  • Order Fulfillment
    • Can edit/cancel an order.
  • Local Branch Staff
    • Can checkout large quantities of food.
    • Can rectify inventory.
  • Administrative- mvp
    • Can edit all features of users and database.

Multiple independent instances of the ordering software can operate simultaneously

There will be multiple versions of this software running on different tablets simultaneously. Different users will be making different orders and therefore should not affect each other byond stock totals diminishing upon finalization.

Acceptance Criteria

  • Independent instances on different hardware can be in progress simultaneously
  • Credit deductions in one instance do not affect the credits of another instance.

A guest can view available items

Guests will be able to see a list of items that are available to them, and their available credits (noms) so that they can order

Acceptance Criteria

  • When a guest reaches the ordering pages they will be presented with a list of items that they can choose from in one category (grains, protein, vegetables) with the size, number remaining and the credit value of the item.
  • The noms (credits) available to the guest for that category are shown at the top.

Create a Shopping Cart

There will be a holding space in which a quantity of items that are confirmed in stock by database can be removed from the general resource pool and allocated to a user's account. Credits will be deducted but can be added back if item deleted.

Once checkout button clicked, ticket printed,
someone fulfills order, if an item on ticket is not available when staff attempts to fill an order, administrator can remove.

Ways items added:
User selects a quantity and adds to cart.
Administrator adds an item to all carts.

Ways items removed
User Deletes
User adjusts quantity
Administrator deletes
Administrator adjusts permitted quantity.
Log out
Inactivity for 5+ minutes empties cart.

staff member can remove a missing item from a placed order.

At some point, a guest will place an order for an item that is not actually in stock. The volunteer fulfilling that portion of the order must be able to remove the items from the guests order and re-credit their account.
They should also be able to remove that item from inventory until its quantity can be rectified to prevent further orders.

Acceptance Criteria

  • When a staff member enters a guest number. If there's a placed order for that day, a button will appear that says, "Modify Order"
  • The following screen will be a list of the items in the order and their quantity.
  • The Staff member can reduce the amount of an item, or all of something.
  • If they do so, a question will pop up asking if that item is no longer in stock.
    • On confirmation, it will ask for a passkey (This will be a number that we designate that only the staff member in charge knows to prevent something being removed simply because the staff member couldn't find it).
  • value of noms will be credited back to order number

Food inventory Arrives and scanned into system

  • Barcode of package scanned
  • Check's UPC/USDA db for presence of item.
  • If not present, requests information regarding, item, package size and classification (if known)
  • If present updates database with quantity.
  • Returns positive confirmation.

Guest Can place an anonymous order.

As a Requirement to EFAP, we must be able to give someone a package of food without them creating a user account.
Questions:

  • How do we prevent guests from coming and demanding packages in addition to their registered package? (Ideas: only twice a month for anonymous packages,
  • [ ]

Staff member associates new order with Guest number

A guest will be given a ticket and a form to fill out when they arrive. These tickets will be used to determine order of service and to ensure we give the correct package to the person who ordered.

Acceptance Criteria

  • On Start screen there is a field to enter the guests number.
  • An alert shows the number entered and asks if this is correct.
  • If there is not an order associated with that number, the staff member can select, "begin new order"
    • On confirmation it goes to language screen.

Create Account

Acceptance Criteria:

The system will store specific information about a user.
Ticket is done when you can write to the database, does not include any front-end.

Guest can remove item from the cart.

Guest can delete an item/adjust quantity this quantity is released back into the general inventory

Acceptance Criteria

  • A guest can reduce the amount of an item that is in their order.
  • When they do so that quantity is released back into the available invnetory

Design: Architecture of new site

The new site will have:
XX Pages

  • Main/Landing
  • I'm Hungry and want to Eat
  • Donation
  • Volunteer
  • Campaigns
  • About
  • In the Media
  • Blog

MVP: Permissions

AC:

  • A user has one level of permissions.
  • Permissions allow behavior as described below

Levels:
Each subsequent level includes prior permissions.

  • Guest*
    • Can edit own information
    • Can order a package of food.
  • Administrative-
    • Can edit all features of users and database.
    • Can checkout large quantities of food.
    • Can rectify inventory.
    • Can edit/cancel an order.
    • Can clock in/out
    • Activity logged
    • Can add food to inventory.

Orders

A client can securely place an order, It is fulfilled and delivered to them.

Guest can select a quantity of items and place them in their cart

When an ordering page, a guest can select a quantity of an item and place it in their cart.

Acceptance Criteria

  • A guest can select a quantity of an item to reserve.
  • If the guest has sufficient credits and the item is still in stock, that quantity of the item is removed from inventory. And the credits are deducted from their total for that category.

User Table

Fields: Names, Address, Phone Number, Email, okay to text? prefer contact email/text/mail, language preferences email/password SSO?
Link to other accounts designated to allow pick up

User Accounts

User accounts are created and stored in a database. Information is updatable and relational. ie family members can link their accounts and pool resources. Children under a certain age (What do St john's bread and life and West side coalition use?) are on their parents account.

Items will be arranged by category

We give out food according to the myplate ratios.

Items will be organized by the following categories; Fruits & Vegetables, Grains, Proteins, Miscellaneous, in the future (Complete Meals)
Each will have a distinct set of noms (our term for credits)

Acceptance Criteria

  • There will be multiple tabs
  • Items will be categorized by one or more tabs
  • If an item is available in more than one tab, either type of noms (credits) can be used to procure it.
  • Only items in stock will be shown.

Design: Create a user facing Interface

This will allow a user to edit their personal information.

If they change required information (address, name, contact information, people associated, must reverify)

A guest can place an order

When a guest click's the "finish" button it is considered complete from their end. And a graphic appears indicating they should hand it back to the staff member.

Acceptance Criteria

  • Clicking the button gives a verification dialogue

EPIC: Masbia Site Redesign

The current Masbia Site needs a lot of TLC. New version needs to be designed in order to improve usability and conversion for both donations and volunteer forms

There will be a shopping cart

The user should be able to see what they have reserved and the noms available to them still.

Acceptance Criteria

  • There is a button on the ordering page with a shopping cart icon.
  • When they click it, a pane/slide out or a modal pops up.
  • This modal will list the items they have reserved, each item's value in noms and and the total of each category.
  • There will be a "Finish" button.

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.