kcal-app / kcal Goto Github PK
View Code? Open in Web Editor NEWthe personal food nutrition journal
License: Mozilla Public License 2.0
the personal food nutrition journal
License: Mozilla Public License 2.0
The Goal edit screen should calculate and recommend calories in real time based on 4-4-9 calculation from macros. It should also show percentage breakdowns for macros.
Hi, I really like your app. However I have trouble getting it to work with a Reverse Proxy like NGINX and HTTPS. From issue I understand that this is because kcal doesn't know about the URL and is just "projecting" its js and css to the ip given in the .env file. I must say I am not a Frontend Dev by any means so please excuse my possible misunderstanding. Is there any workaround? Is it possible to implements such a solution such as offerd in link?
After uploading a recipe image, it does not show up and instead 404s (when accessing my installation via its local IP) or straight up doesn't display without any errors (when accessing my installation via the url defined in .env).
Once a user has an image uploaded and is saved the edit page becomes blank, both refreshing and backing out both result in the same behavior. Attempted on multiple users and the edit page is only blank after uploading an image, works flawlessly without it
When a food is added to the journal it is displayed as 1 unit instead of the unit size specified.
E.g if a serve is 2 slices, it will display 1 slice. If a serve is 250grams, it will display 1 grams.
Would appreciate the feature to copy a meal to another day. For example I always have the same PM snack and I'd like to copy what I usually have to the next day instead of looking for it each day.
I use mariadb database and got such exception.
Illuminate\Database\QueryException:
SQLSTATE[42000]: Syntax error or access violation: 1055 'kcal.tags.name' isn't in GROUP BY (SQL: select `id`, `name`, count(*) as total from `tags` inner join `taggables` on `taggables`.`tag_id` = `id` where `taggables`.`taggable_type` = App\Models\Recipe group by `id` order by json_unquote(json_extract(`name`, '$."en"')) asc)
at /home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
at Illuminate\Database\Connection->runQueryCallback()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Database/Connection.php:720)
at Illuminate\Database\Connection->run()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Database/Connection.php:405)
at Illuminate\Database\Connection->select()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2705)
at Illuminate\Database\Query\Builder->runSelect()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2694)
at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3230)
at Illuminate\Database\Query\Builder->onceWithColumns()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2693)
at Illuminate\Database\Query\Builder->get()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:710)
at Illuminate\Database\Eloquent\Builder->getModels()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:694)
at Illuminate\Database\Eloquent\Builder->get()
(/home/taurus/develop/kcal/app/Models/Traits/Ingredient.php:59)
at App\Models\Recipe::getTagTotals()
(/home/taurus/develop/kcal/app/Http/Controllers/RecipeController.php:29)
at App\Http\Controllers\RecipeController->index()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54)
at Illuminate\Routing\Controller->callAction()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:43)
at Illuminate\Routing\ControllerDispatcher->dispatch()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/Route.php:259)
at Illuminate\Routing\Route->runController()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/Route.php:205)
at Illuminate\Routing\Route->run()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php:798)
at Illuminate\Routing\Router->Illuminate\Routing\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:141)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/app/Http/Middleware/DisableBrowserCache.php:27)
at App\Http\Middleware\DisableBrowserCache->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/spatie/laravel-csp/src/AddCspHeaders.php:13)
at Spatie\Csp\AddCspHeaders->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:50)
at Illuminate\Routing\Middleware\SubstituteBindings->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:44)
at Illuminate\Auth\Middleware\Authenticate->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:78)
at Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49)
at Illuminate\View\Middleware\ShareErrorsFromSession->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121)
at Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64)
at Illuminate\Session\Middleware\StartSession->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37)
at Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:67)
at Illuminate\Cookie\Middleware\EncryptCookies->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:116)
at Illuminate\Pipeline\Pipeline->then()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php:797)
at Illuminate\Routing\Router->runRouteWithinStack()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php:776)
at Illuminate\Routing\Router->runRoute()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php:740)
at Illuminate\Routing\Router->dispatchToRoute()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php:729)
at Illuminate\Routing\Router->dispatch()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:190)
at Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:141)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php:31)
at Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:40)
at Illuminate\Foundation\Http\Middleware\TrimStrings->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27)
at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:86)
at Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/fruitcake/laravel-cors/src/HandleCors.php:38)
at Fruitcake\Cors\HandleCors->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php:39)
at Illuminate\Http\Middleware\TrustProxies->handle()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:116)
at Illuminate\Pipeline\Pipeline->then()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:165)
at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
(/home/taurus/develop/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:134)
at Illuminate\Foundation\Http\Kernel->handle()
(/home/taurus/develop/kcal/public/index.php:51)
For myself I fixed it here
public static function getTagTotals(string $locale = null): DatabaseCollection {
$locale = $locale ?? app()->getLocale();
return Tag::query()->join('taggables', 'taggables.tag_id', '=', 'id')
->select(['id', 'name', DB::raw('count(*) as total')])
->where('taggables.taggable_type', '=', static::class)
->groupBy(['id', 'name'])
->orderBy("name->{$locale}")
->get();
}
Error means when you use GROUP BY
you can select only aggregate columns or columns from GROUP BY.
Adding multiple serves of a food is possible, but has to be done one at a time. Having a quantity dropdown next to the meal selector would allow more effective use of servings
I'm happy to do this, as I figured out the whole install process for Debian recently. I'll make a PR with either a Debian section or re-word the current Ubuntu instructions with descriptions of what functions do and their counterparts on other OSes.
The recipe ingredient list will use the food serving name if the food is entered using servings and the food serving size is less than one. E.g. food with 1/4 cup serving size added to a recipe as 1/2 serving will show up incorrectly as 1/2 cup no instead of 1/8 cup.
Related it #19. Seems a specific recipe summary method should be added to the Food model.
Hi, thanks for making this service. I'm looking forward to using it. Has anyone built this on a raspberry pi? I'm unable to get it to work. The app
container keeps crashes immediately after boot. I'm assuming it has something to do with the binary that's being run not being arm compatible.
I also had other issues getting redis, elasticsearch and mysql running on the raspberry pi, but I've been able to slowly work through them by using various different images. Here is the docker compose file that I'm currently using:
kcal-app:
image: kcalapp/kcal
container_name: kcal-app
restart: unless-stopped
security_opt:
- no-new-privileges:true
tty: true
working_dir: /app
env_file: ./kcal/.env
volumes:
- './kcal/app/public:/app/public/'
- './kcal/etc/php/php.ini:/usr/local/etc/php/conf.d/local.ini'
networks:
- net
depends_on:
- kcal-db
kcal-db:
image: hypriot/rpi-mysql
container_name: kcal-db
restart: unless-stopped
tty: true
privileged: true
security_opt:
- no-new-privileges:true
ports:
- '${DB_PORT:-3306}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD:-kcal}'
MYSQL_DATABASE: '${DB_DATABASE:-kcal}'
MYSQL_USER: '${DB_USERNAME:-kcal}'
MYSQL_PASSWORD: '${DB_PASSWORD:-kcal}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- './kcal/db/data:/var/lib/mysql/'
- './kcal/etc/mysql/my.cnf:/etc/mysql/my.cnf'
networks:
- net
kcal-web:
image: nginx:alpine
container_name: kcal-web
security_opt:
- no-new-privileges:true
restart: unless-stopped
tty: true
working_dir: /app
volumes:
- './kcal/app/public:/app/public/'
- './kcal/etc/nginx/conf.d/:/etc/nginx/conf.d/'
networks:
- net
depends_on:
- kcal-app
labels:
- "traefik.enable=true"
- "traefik.http.routers.kcal-web.rule=Host(`kcal.$DOMAIN`)"
- "traefik.http.routers.kcal-web.entrypoints=https"
kcal-elasticsearch:
image: 'ind3x/rpi-elasticsearch'
container_name: kcal-elasticsearch
security_opt:
- no-new-privileges:true
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- './kcal/elasticsearch/data:/usr/share/elasticsearch/data'
ports:
- '${ELASTIC_PORT:-9200}:9200'
networks:
- net
kcal-redis:
image: 'redis:latest'
container_name: kcal-redis
privileged: true
security_opt:
- no-new-privileges:true
ports:
- '${REDIS_PORT:-6379}:6379'
volumes:
- './kcal/redis/data:/data'
networks:
- net
I also tried cloning the kcal
repo and building an image using the Dockerfile, but changing the php
image, but I had no luck. The Dockerfile uses apk
, so I had to use the alpine image specified in the file, however I ran into various issues with that while building.
Tags that are no longer used remain in the system forever and should instead be purged.
192.168.1.102 - - [28/Sep/2023:18:58:10 +0000] "GET /api/v1/foods?page[number]=1&page[size]=12 HTTP/1.1" 200 11706 "http://192.168.1.238/foods" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0" 192.168.1.102 - - [28/Sep/2023:18:58:13 +0000] "GET /recipes HTTP/1.1" 200 15598 "http://192.168.1.238/foods" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0" 192.168.1.102 - - [28/Sep/2023:18:58:13 +0000] "GET /api/v1/recipes?page[number]=1&page[size]=12 HTTP/1.1" 500 6628 "http://192.168.1.238/recipes" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0"
Navigation seems to be fine; however, the api is returning 500 causing recipes page to spool endlessly. Trying to dig up more details, but I'm just now diggin in.
Restarting host & containers doesn't seem to resolve.
Host details:
Operating System: Ubuntu 20.04.5 LTS
Kernel: Linux 5.4.0-163-generic
Architecture: x86-64
Appreciate any help!
Word capitalisation is inconsistent, some instances always display lowercase, some display capitals depending if another field is not empty (details for food), some are captialised such as the journal.
An option to disable all changes and display as entered would be much appreciated, if not a setting to choose.
Is it possible to have the search results filter by common foods logged for that meal?
For example if I have a shake for breakfast, could the results begin with common foods logged at the meal first so they could be quickly selected, rather than searching 'shake' and then scrolling through options.
Hello, I have deployed your app in a proxmox container and set it up behind a reverse proxy (nginx proxy manager) with SSL connection but when I go on the link, the CSS and the JS doesn't load... if I go directly on the ip adress this works perfectly. There is a screenshot of the chromium error logs in attached files. Can you help me ?
Hello,
I have not been successful installing kcal manual type on an Ubuntu Server 22.04.4 LTS with Apache.
There is an issue on step 12 second line
... php artisan elastic:migrate ...
which yields the following error message:
Migrating: 2021_03_04_193043_create_foods_index
In 2021_03_04_193043_create_foods_index.php line 9:
Interface "ElasticMigrations\MigrationInterface" not found
Any hep would be appreciated.
Implement keyboard navigation and item selection. Clean up styling.
Trying to edit a recipe and adding above 99 grams of something gives error:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'amount' at row 1 (SQL: update ingredient_amounts
set amount
= 100, ingredient_amounts
.updated_at
= 2021-10-31 15:03:27 where id
= 7)
In Australia dietary information is standardised (online and on packaging examples included) so having the option to change the formatting to match would save a lot of time.
Add: Some other units may be applicable on a user by user basis. For example: Saturated and Trans fats (in addition to Total fat), Sugars, Dietary Fibre, Caffeine, Vitamins, etc.
Reorder: For example the order is ALWAYS Energy>Protein>Fat>Carbs>Sugars>Fibre>Sodium so being able to reorganise them in a settings page would allow copying the values straight over.
Convert: Energy in Australia is often showed in kilojoules and only is sometimes converted to calories on the packaging, 1 calorie is 4.184 Kilojoules so having an option that switches the input to the opposite unit and does the math would save a lot of time.
Hide: Cholesterol is not included on these nutritional fact sheets so having the option to hide this section would clean the interface.
The journal UX is clunky. Two key changes that would help a lot —
The current system was designed to be flexible with respect to added data for multiple days at once but that seems like an edge case that isn’t worth building for. Implementing these improvements should be easier if that feature can be sacrificed (or at least deprioritized).
Enable users to add a journal entry for a recipe or food directly from the recipe or food show page.
When I browse to both /recipes
and /food
, I get the 500 SERVER ERROR
page and see an accompanying error and stack trace in the Laravel logs. I've included both that stack trace and my redacted .env
file.
.env
fileAPP_NAME=kcal APP_ENV=production APP_KEY=[REDACTED] APP_DEBUG=false APP_URL=https://[REDACTED] APP_PORT=80 APP_SERVICE=app APP_TIMEZONE=UTC DB_CONNECTION=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=kcal DB_USERNAME=kcal DB_PASSWORD=[REDACTED] REDIS_HOST=localhost REDIS_PORT=6379 SCOUT_DRIVER=algolia ALGOLIA_APP_ID=[REDACTED] ALGOLIA_SECRET=[REDACTED] MEDIA_DISK=media QUEUE_CONVERSIONS_BY_DEFAULT=false
[2023-12-12 00:57:20] production.ERROR: SQLSTATE[42000]: Syntax error or access violation: 1055 'kcal.tags.name' isn't in GROUP BY (SQL: select `id`, `name`, count(*) as total from `tags` inner join `taggables` on `taggables`.`tag_id` = `id` where `taggables`.`taggable_type` = App\Models\Food group by `id` order by json_unquote(json_extract(`name`, '$."en"')) asc) {"userId":12,"exception":"[object] (Illuminate\\Database\\QueryException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1055 'kcal.tags.name' isn't in GROUP BY (SQL: select `id`, `name`, count(*) as total from `tags` inner join `taggables` on `taggables`.`tag_id` = `id` where `taggables`.`taggable_type` = App\\Models\\Food group by `id` order by json_unquote(json_extract(`name`, '$.\"en\"')) asc) at /var/www/kcal/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760) [stacktrace] #0 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\\Database\\Connection->runQueryCallback() #1 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\\Database\\Connection->run() #2 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2705): Illuminate\\Database\\Connection->select() #3 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2694): Illuminate\\Database\\Query\\Builder->runSelect() #4 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3230): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}() #5 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2693): Illuminate\\Database\\Query\\Builder->onceWithColumns() #6 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(710): Illuminate\\Database\\Query\\Builder->get() #7 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(694): Illuminate\\Database\\Eloquent\\Builder->getModels() #8 /var/www/kcal/app/Models/Traits/Ingredient.php(59): Illuminate\\Database\\Eloquent\\Builder->get() #9 /var/www/kcal/app/Http/Controllers/FoodController.php(21): App\\Models\\Food::getTagTotals() #10 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\FoodController->index() #11 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction() #12 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\\Routing\\ControllerDispatcher->dispatch() #13 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController() #14 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\\Routing\\Route->run() #15 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}() #16 /var/www/kcal/app/Http/Middleware/DisableBrowserCache.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #17 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\DisableBrowserCache->handle() #18 /var/www/kcal/vendor/spatie/laravel-csp/src/AddCspHeaders.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #19 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Spatie\\Csp\\AddCspHeaders->handle() #20 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #21 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle() #22 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #23 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Auth\\Middleware\\Authenticate->handle() #24 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #25 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle() #26 /var/www/kcal/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #27 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle() #28 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #29 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest() #30 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Session\\Middleware\\StartSession->handle() #31 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #32 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle() #33 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #34 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle() #35 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #36 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\\Pipeline\\Pipeline->then() #37 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php(776): Illuminate\\Routing\\Router->runRouteWithinStack() #38 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php(740): Illuminate\\Routing\\Router->runRoute() #39 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Routing/Router.php(729): Illuminate\\Routing\\Router->dispatchToRoute() #40 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(190): Illuminate\\Routing\\Router->dispatch() #41 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}() #42 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #43 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #44 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle() #45 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #46 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #47 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle() #48 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #49 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle() #50 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #51 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle() #52 /var/www/kcal/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #53 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Fruitcake\\Cors\\HandleCors->handle() #54 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #55 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\TrustProxies->handle() #56 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #57 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\\Pipeline\\Pipeline->then() #58 /var/www/kcal/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter() #59 /var/www/kcal/public/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle() #60 {main}
I'm happy to help debug further, but I don't know any of the frameworks in use or even PHP.
Recipe amounts for foods with greater than 1 for the serving amount (eg 2 scoops or 26 pretzels) can get messy.
Hi, it's me again with some suggestions:
Sorry if this sounds unstructured/whatever, it's 23:37 for me and my brain is half asleep. If you need clarifications, I'll gladly respond tomorrow.
Hey there!
I belong to an open source security research community, and a member (@0xAmal) has found an issue, but doesn’t know the best way to disclose it.
If not a hassle, might you kindly add a SECURITY.md
file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.
Thank you for your consideration, and I look forward to hearing from you!
(cc @huntr-helper)
The recipe and food listings are annoying to navigate beyond a single filter and the first page. These views should be modified to use URL fragments and update history state for easier back-and-forth navigation and link sharing.
When an ingredient is first added, the ingredient serving unit should be set to whatever the default serving unit is for the ingredient (tsp., tbsp., cup for foods, serving for recipes).
Recipe and food indexing should include nutritional information and allow searching on it with constraints.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.