Giter VIP home page Giter VIP logo

ketonize's Introduction

ketonize v0.2.X

This project is a simple framework of a diet planning app. It has been created on Laravel Framework.

Description

This framework allows to build an app with a custom set of:

  • diets
  • recipes
  • ingredients

It automatically creates diet plans for users based on their calorie needs and dietary purpose.

User

Based on the user's survey: energy and nutrient requirements are calculated. The user decides about the number of meals per day and defines the type of diet (eg. vegan or keto).

Meal plan

A meal plan is prepared automatically based on the results of the user's needs.

Shopping lists

The user can generate shopping lists for meal preparation for a selected period of time with one click. He can freely change the quantities of ingredients on the list and remove them. Shopping list allows adding own items like ingredients not included in diet plan or any other items. The items are trashed by default which enables restoring them if deleted by mistake. The syncing feature allows concurrent usage of shopping list on multiple devices. When enabled the device has the actual state of the list.

Getting started

Dependencies

  • Laravel 10.0+
  • PHP 8.1+
  • Nginx
  • Composer

Installing

You can download this repository.

Do not forget to set a database.

Set up your .env file.

As for the version 0.2.0 and higher it is required to create a default IngredientCategory with id 1000.

First steps

The app requires content to be run. Its database needs to be populated with ingredients and recipes to create diet plans. These can be added manually using the following links:

  • /recipes
  • /ingredients

License

This source code is licensed according to MIT License.

ketonize's People

Contributors

hubov avatar

Watchers

 avatar

ketonize's Issues

Manual choosing of recipes

Users should be able to change and choose recipes if they don't like the automatically generated diet plan.
Recipe change should adjust the amount (and energy value) in the background according to the user's needs.

Shopping list elements are prone to mistaken deletion

Shopping list elements can be mistakenly deleted and are completely gone. There is no possibility to reverse the action.
To do:
-shopping list item deletion should move it to deleted list
-deleted shopping lists items should be possible to bring back to list

Ingredients limit in search results

The number of ingredients shown in search results in the recipe form is limited to 5. The query has a both-sided wildcard (at the beginning and at the end) which makes the results very bride. If there are many ingredients related to the one searched for - it may happen that the result doesn't show (if it's a 6th result).

Example:

search for keyword "pomidor"
records in database:

  • Sok pomidorowy
  • Koncentrat pomidorowy
  • Passata pomidorowa
  • Pomidory suszone
  • Pomidory w puszce
  • Pomidor
  • Pomidor koktajlowy

Last 2 results won't show up and it's impossible to choose them.

Images for recipes

There is still no possibility to add images to recipes.

The form to add recipes should allow images upload. The images should be displayed in recipe/meal preview.
Image uploading feature should be responsible for automatic scaling for thumbnails and full view. It should also convert the image to the most optimal file format and compression (e.g. webp).

Manual adding ingredients to shopping list

Shopping list can only be generated automatically according to a dates range chosen by a user. It can be adjusted afterwards but only for the ingredients already added to the list. It is not possible to add other ingredients if needed and keep all the items to be bought in one place.

Cooking plan

If a diet plan contains the same recipes in a couple of following days, a cooking plan (allowing to cook more portions of a dish at once) should be created. It should spare time spent on cooking and make it easier to plan the cooking schedule.

Nothing happens if shopping list element is already removed

If a shopping list is used by 2 people at once and a shopping list element was already removed by another person it is visible on the list of another person. It is not possible to remove the element by the latter (without reloading the page).

To do:
-shopping list could automatically refresh (using Ajax) to check if there were any changes
-removing an already non-existing element from shopping list should prompt an alert (that it was already deleted! to prevent doubling purchases if app is used by multiple people doing one shopping :) )

Large food portions for low-calorie recipes

Algorithm adds large food portions if the users calorie intake is high but the recipe is low in calories.

To do:
-algorithm creating diet plans should prevent adding enormous food portions
-user should be alerted about a large portion at recipe change (if needed)

Custom recipes of users

Users should have the ability to create own recipes.
A custom recipe should only be visible to the user who created it.
Macros should not be calculated for these recipes but users could set them manually.
Any ingredient already existing in DB should be automatically mapped.
Any ingredient not found in DB should be stored as CustomIngredient.
It should be possible to add macros and other nutrients to CustomIngredients - manually by user.

Popular custom ingredients should be regularly added to DB as regular ones (with complete macro and nutrient data) and replaced in all corresponding custom recipes.

(?) A mechanism for automatic scans for popular ingredients should be created. Maybe with a use of GPT to group different names of same ingredients.

Enter button in recipe form submits it

Enter button submits the recipe button. It makes a confusion at setting the ingredients up.
It should be blocked (eg. preventDefault) at least while choosing ingredients.

Recipe ideas creation using AI

AI can be used to generate recipe ideas.
A user should be able to pass a keyword related to what he would like to eat.

  1. A recipe idea should be retrieved from database (if already exists) or query OPENAI-GPT for a new idea.
  2. A new idea should be stored in DB.
    If a user asks for a new idea for the same keyword - the process repeats form point 1.
    All keywords should be stored with the count of queries made - to measure what ideas are the most popular.

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.