GithubHelp home page GithubHelp logo

codeforsanjose / sjpl-mealtally Goto Github PK

View Code? Open in Web Editor NEW
9.0 11.0 9.0 19.45 MB

Web app to help San Jose public libraries coordinate free community meals.

License: GNU General Public License v3.0

JavaScript 82.14% HTML 1.03% CSS 8.97% SCSS 7.86%
library meals food youth mongodb react san-jose

sjpl-mealtally's Introduction

Running the web app locally

  1. Read Code of Conduct (https://github.com/codeforsanjose/codeofconduct) and CONTRIBUTING.md!!!

  2. In your terminal, cd into your project folder and clone this repo and navigate to correct branch:

$ git clone https://github.com/codeforsanjose/SJPL-MealTally
  1. cd into SJPL-MealTally and run npm install

  2. Run the command npm run build

  3. Setup MongoDB local db instance node config/setup_local_db.js or talk to project team for instructions to get test data

  4. Copy example.projectInfoData.json to projectInfoData.json and edit it so that localURL points to your local MongoDB (usually mongodb://127.0.0.1:27017)

  5. Start the web app in another tab: node server.js

  6. Open localhost:8080 to enter from the web app's Home page.

Stories in Ready

Background

The San Jose Public Library runs a summer program where they provide three meals a day + snacks to children at seven of their branches. The meals come from the YMCA, and left over meals can be served to adults, but the library must pay the YMCA for any meals that don't go to a child.

Because of the above restriction, the library must keep diligent documentation of each meal, and the coordinator sends a weekly report for each library. For the past two summers, a volunteer was needed just for the task of filling out the paperwork at each library at every meal - keeping track of how many new meals were received, left over, how many went to kids, etc. Not only does this mean that the volunteer can't help with other tasks, but it is also creates over 8,000 pages of paperwork per month. Keeping up on the paperwork is a grueling task.

State of the app

Last October, some friends and I hacked together a software solution during a 30-hour hackathon. We have since delivered the mobile and web app to the library, but since this was a quick hack, there are still some tasks that need to be taken care of before the meal program starts back up in May. I am currently the only developer still working with them on the web portion of the project, and my time is limited, plus this seems like a great project for CfSJ to be involved in as it benefits our public libraries. See open issues for a list of current tasks.

Dashboard

  1. Work in progress The dashboard allows the meal coordinator to keep an eye on meal trends at each library. (NOTE: Not yet connected with the current database schema) dashboard screenshot

Mobile Web App

This is the current UI to add meals, record logs and generate pdf reports.

Meal Tally App
  1. The volunteer selects the library name and the meal type (e.g. Lunch) on the Meal Info card. Date is also customizable; default value is current time in timezone -07:00.
  2. The total received meals is logged on the Inventory card.
  3. As program attendees enter the meal line, increments are made for each person on the Categories card.
  4. After the meal line stops in its entirety, the leftover meals are input on the Inventory card.
  5. A signature such as one's full name is input on the User Info card; the meal tallies can then be pushed to the database by clicking "ADD MEAL".
  6. Click the "RESET COUNTS" button to clear all categories tallies (NOTE: Careful not to accidentally press this instead of "ADD MEAL" #32)
Profile
  1. Editing the volunteer's profile
Report
  1. The start and date range can be selected (NOTE: End range is exclusive, so to get today increase the date end by one day #29).
  2. Click "GET MEAL REPORT" to preview a list of cards each with a unique:
  • library name
  • meal type
  • category totals
  1. A new card appears at the bottom of the Report tab. Type an output PDF file name and click "SAVE PDF" to download the report.

See the live Heroku demo; read this wiki article for development details.

sjpl-mealtally's People

Contributors

3vivekb avatar bmakarand2009 avatar clarle avatar cy19890513 avatar darpham avatar dpindrys avatar gaganmaheshwari avatar jeffersonken19 avatar jjia25 avatar jmstudiosjoe avatar johnny-n avatar jstnhstr avatar karencalpo avatar mplv avatar rootcause87 avatar sarahb831 avatar thedocbwarren avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sjpl-mealtally's Issues

Add login page.

Requirements

  • Add input for user's name
  • Add input for some code all librarians use for simple human verficiation (e.g. b4nanaMuff!nCrumbs)

Consider recording video footage from end of line for backup tally measurements.

I discussed this with Tomkia Price as a backup measurement in case the assigned volunteer should lose focus from the tallying task. However, she hinted there might be conflicts with library policy or ymca event restrictions.

This would be ideal though to possibly collect training data for a neural network that classifies images of people as meal categories (e.g. Adult, Children, Staff, etc.)

Make library name list dynamic

Add a new table to the db with library names, fetch from this table for the front end. Maybe add a way for library person to add and remove libraries from the dashboard.

Make database access go through a .env file

Make database access run through a .env file and supply an example.env file.

We should also set up a dummy database for people to develop on.

This will make it easier for people to deploy locally.

Tally inputs are only one digit wide.

Seen across mobile browsers in portrait mode on a Samsung Galaxy S6. Although the browser iterates through each digit, it's cumbersome to wait when the end user would most likely prefer seeing the full count in one glance. Meanwhile, the full count can still be seen in landscape mode.

Requirements:

  • Extend column width for ion-input directives

Update README and make sure steps work for onboarding devs

Requirements:

  • List dependencies (e.g. Ionic CLI, Typescript, etc.)
  • Add step in "Running the web app locally" to set MONGODB_URI in Node (like in a .env file or in the current case on Heroku); replace confusing $ MONGODB_URI=โˆ† node server.js junk with $ node server.js

User profile logs tab

Need to figure out if this tab is for all Volunteer and admin users.
screen shot 2018-04-03 at 9 47 11 am

tabs css will be different just need component

User Profile reports tab

Need to figure out if this tab is for all Volunteer and admin users.
screen shot 2018-04-03 at 9 47 22 am

Tabs will also be different for now just need the component.

Add a send pdfs button to the dashboard

Add a button to call cronTask from the dashboard. Might want to change the function name to something more fitting since it's not longer using cron. Maybe uninstall the cron module from the server as well.

Invalid Operation on home page

The profile page on startup checks for a user id in the url. When none is available the promise api for getUser fails with a JSON.parse error:

Invalid operation SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

its in api.js
line 69

Use Mailgun rather than Gmail?

Up for discussion, but I usually like using Mailgun rather than Gmail SMTP for sending emails out.

It's a bit easier for folks to set up compared to SMTP, and there's better analytics on the messages that are sent out.

@RoBeau What do you think?

Design home page to avoid accidental presses of "Reset Counts" button.

Tomika recommended the button be moved above the library and meal selections.

@clarle also suggested:

  1. The browser syncs up after every call to the increaseCount() and decreaseCount() methods in HomePage component.
  2. The user is prompted with a confirmation window when selecting "Reset Counts" (i.e. Are you sure you'd like to reset counts (y/n)?

In addition, Ionic's Storage class could locally store current tallies in case the meal tally app is closed before they're recorded in the database.

reformat the Angularjs app.js file

I believe it is necessary to reconstruct the app.js file. it have like 20,000 lines of code. when you try to change something, it is lagging so much. basically can not add more code onto that file. Please reformat so we can add more features and maitenance.

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.