-
Before running the application, ensure you have the installed the following:
Node.js (version 18.16.0)
-
Install dependencies by run the following command in Terminal:
npm installBefore proceeding, please make sure you have correctly installed MongoDB on your system.
After that, you can open your MongoDB Compass dashboard, click on "New Connection +," and copy and paste the following provided MongoDB URI:
mongodb+srv://Healthfuel365:HEALTHFUEL365-team33@cluster0.qlftusn.mongodb.net/After completing the environment configuration and dependency installation, you can run:
npm run buildIf no error occurs, then you can run:
npm run startApp is now running at http://localhost:8081 in development mode
└── src
├── controllers
├── middleware
├── models
├── routes
└── services
└── data_clean
├── all_product_with_price.py
├── merge_all_product.py
├── merge_all_product_detail.py
├── product_detail.py
└── product.pycontrollers comprise the controller functions for resolving, providing, updating, adding and deleting of products, user and order information.
middleware contains the methods to authenticate the user through the token included in the request and to add the id of the user to the request before he passes it on.
models includes interfaces describing the composition of data types like the data structure of a product in the database.
routes determine how a response to a client request at a particular endpoint will respond. It contains the Uniform Resource Identifier (URI) and the specific HTTP request method.
services contains methods regarding getting, adding, updating and deleting product, user, order information from the database.
data_clean is a set of functions designed to process product data obtained from OpenFoodFacts. It performs a series of essential operations, such as format transformation, preprocessing, and other data cleaning tasks. The goal is to convert the raw product data into a format suitable for storage in MongoDB.