Skip to content

WendellLiu/Nutrika

Repository files navigation

Nutrika

Description

a restful website visualizing Taiwan FDA food nutrition fact of items you select

What we use

  1. Frontend:
  • React: app architecture
  • Redux: state container
  • Redux-Thunk
  • Redux-Saga
  • d3, recharts: visualize the data
  1. Backend:
  • Django, Django REST framework: backend api
  • Python: crawler

Feature

  1. select(pin) the items and see their nutrition facts
  2. fill the target-form(calories, fat, protein and carbs) and get the comparison between target and select items

Others

We use redux-thunk and redux-saga to implement redux async actions. To avoiding over-frequently request to server, we use redux-saga to set timeout when you type the search keyword.

Setup

  1. Install postgresql

  2. [Optional] Create virtual envirnment

  3. virtualenv --no-site-package venv
  4. Install dependency

    pip install -r requirements.txt
  5. Create user nutrika

    createuser -Psrle nutrika

    If you get the error psql: could not connect to server, read the this post

  6. Create db nutrika

    createdb nutrika
  7. Insert Data into Database

    python manage.py import_nutrition
  8. Run server

    python manage.py runserver

Todos

  1. form to add items
  2. algorithm to filter unreliable information
  3. add items by photo(maybe...)