Skip to content

CelanLi/HealthFuel365Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

147 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HealthFuel365

Installition

  1. Before running the application, ensure you have the installed the following:

    Node.js (version 18.16.0)

  2. Install dependencies by run the following command in Terminal:

   npm install

Database Connection

Before 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/

Usage

After completing the environment configuration and dependency installation, you can run:

   npm run build

If no error occurs, then you can run:

   npm run start

App is now running at http://localhost:8081 in development mode

Folder structure

└── 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.py

controllers 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors