Giter Site home page Giter Site logo

delete_repo_and_repo_away's Introduction

this is building startup system milestone 3

Local run instruction

  1. how to run the backend

npm install

npm run dev / npm start

  1. how to run frontend

npm install

npm start

Data Model

table 1:

  • users
    • user
      • foodIntake
        • {food}
          • calorieData
          • foodName
          • servingSize
          • totalCalories

table 2:

  • reviews
    • reivew

API

  1. login/logout: firebase auth

  2. POST api/searchFood: call the third party api to get cal for food

    • input: req.body.foodName
    • output: a json object: {name, image, imageType, calories}
  3. POST api/selectAllFood: get all food for the user

    • input: req.body.username
    • output: allFood(json)
  4. POST api/addFood: Add food (only 1, can't take other number)

    • input: req.body.username (username), req.body.foodName, req.body.calories, req.body.number
    • output: 200/error
  5. POST api/deleteFood: delete food fron firestore

    • input: req.body.username, req.body.foodName
    • output: 200/400
  6. PUT api/updateFood: update the number of the food, only add 1

    • input: req.body.username, req.body.foodName
    • output: 201/400
  7. GET api/reviews

  8. POST api/reviews

  9. POST api/checkUser: create user when login

    • input: req.body.username
    • 201/400

Third Party API

https://api.spoonacular.com/recipes/

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.