/brekkie

MERN Web App for searching recipes and tracking calories & macros

Primary LanguageShell

Table of contents

Brekkie

It's a web application to help you find recipes with the ingredients you have and add servings of such recipes to a meal tracker where you can see stats of calories and macronutrients consumption.

Made with

  • Backend: NodeJS + Express and Mongoose
  • DB: MongoDB
  • Frontend: React + Redux

The recipes where extracted from LivelyTable using a Scraper made with puppeteer

The project Deadline was 10 days

Proceed to the next steps to run locally or take a look at the live version demo

  • Use the sample users to see all functionalities underway.
  • TO GET RELEVANT STATS FROM CLIENT USER, SEARCH THE DATES FROM 06-01-2021 TO 06-08-2021

Configuration

By default the react server will run on port 3000 and the Express server will run on port 5000, you can modify the PORTS on the docker-compose.yml file

Folder structure

        brekkie
        ├───brekkie-backend
        │   ├───config
        │   ├───controllers
        │   ├───middleware
        │   ├───models
        │   ├───public
        │   ├───routes
        │   └───util
        └───brekkie-frontend
            ├───public
            │   └───img
            └───src
                ├───components
                │   ├───comments
                │   ├───dropdownMenu
                │   ├───errorMsg
                │   ├───footer
                │   ├───header
                │   ├───inventoryAccordion
                │   ├───inventoryIngredients
                │   ├───login
                │   ├───mainPageCard
                │   ├───myIngredients
                │   ├───navbar
                │   ├───navItem
                │   ├───nutrientsPieChart
                │   ├───nutritionalInfo
                │   ├───pagination
                │   ├───rangeBarChart
                │   ├───recipeCard
                │   ├───recipeDetail
                │   ├───setCaloriesModal
                │   ├───signUp
                │   ├───userCardModal
                │   ├───userComment
                │   └───voteModal.js
                ├───containers
                │   ├───adminView
                │   ├───favorites
                │   ├───inventory
                │   ├───main
                │   ├───mealTracker
                │   ├───recipeView
                │   ├───searchView
                │   └───shoppingList
                ├───fonts
                │   └───SF-Pro
                ├───icons
                ├───services
                ├───store
                │   ├───actions
                │   └───reducers
                └───util

TOP

DB

  • Schema

database_diagram

The recipes where extracted from LivelyTable using a Scraper made with puppeteer

TOP

Backend

API Documentation

The sample user credentials are:

Authentication

New users will have to signup in order to access the app.

Registered users can login and once the user is logged in, each subsequent request must include a JSON Web Token, which allows the user to access routes, services, and resources that are permitted with that token.

Authorization

All new users are created with 'client' role by default, only the 'admin' role user can create, update or delete documents. The 'mod' users can update documents and delete comments.

Endpoints

The supported request body format is JSON

All endpoints but the login and signup require authentication by JWT sent on the request via bearer token

API Documentation

Run in Postman

TOP

Frontend

Features

  • Recipes search

Search recipes by keyword or check the box to search only recipes with the ingredients you have

search

  • Recipe detail view

  • You can add items to your shopping list directly from this view

detail

  • And rate the recipes

image

  • Comments

Users can comment the recipes and Admins and Mods can delete comments

comments

  • Favorites

Users can revisit their favorited recipes from a favorite view

favorites

  • Inventory

  • Users can add items to the inventory from a default list

inventory_list

  • Or add them manually from a textbox and manage their current inventory

inventory_owned

  • Shopping List

Users can manage their shopping list from the shopping list view

shopping_list

  • Meal tracker

Users can track their calories and macronutrients consumption

  • Daily

daily_tracker

  • By range of dates

range_tracker

  • Admin panel

From here, admin cand delete and update and mods can update users

admin

Author

Jarki Melendez

TOP