Commit graph

55 commits

Author SHA1 Message Date
Hayden
8d77f4b31e
feat: Paprika/Mealie Migration support (#873)
* feat:  paprika support - partial

* feat:  add full paprika support

* re-organize data directory

* add data directory auto-gen

* rewrite migration tests

* remove print statements

* remove hard-coded paths

* add auto-tag support

* add mealie migration support

* add looking for migraiton button
2021-12-09 19:52:53 -09:00
Hayden
c32d7d7486
feat: add user recipe export functionality (#845)
* feat(frontend):  add user recipe export functionality

* remove depreciated folders

* change/remove depreciated folders

* add testing variable in config

* add GUID support for group_id

* improve testing feedback on 422 errors

* remove/cleanup files/folders

* initial user export support

* delete unused css

* update backup page UI

* remove depreciated settings

* feat:  export download links

* fix #813

* remove top level statements

* show footer

* add export purger to scheduler

* update purge glob

* fix meal-planner lockout

* feat:  add bulk delete/purge exports

* style(frontend): 💄 update UI for site settings

* feat:  add version checker

* update documentation

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-12-04 14:18:46 -09:00
Hayden
2ce195a0d4
refactor: ♻️ rewrite migrations frontend/backend (#841)
* refactor(frontend): ♻️ rewrite migrations UI

* refactor(backend): ♻️ rewrite recipe migrations

* remove vue-demi

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-11-26 22:37:06 -09:00
hay-kot
1e6adb0aad test(backend): refactor testing to reduce network reliance and speed up suite 2021-11-26 11:59:36 -09:00
Hayden
791aa8c610
feat(backend): refactor/fix group management for admins (#838)
* fix(frontend): 🐛 update dialog implementation to simplify state management

* test(backend):  refactor test fixtures + admin group tests

* chore(backend): 🔨 add launcher.json for python debugging (tests)

* fix typing

* feat(backend):  refactor/fix group management for admins

* feat(frontend):  add/fix admin group management

* add LDAP checker

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-11-25 14:17:02 -09:00
Hayden
0db8a58963
fix(backend): 🐛 Grab PRs from dev branch (#826)
* fix(backend): 🐛 Grab PR #780

* feat(frontend):  Grab PR 797

* docs(docs): spelling

* feat(backend):  Add LDAP Support from #803

* add test deps

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-11-23 20:41:07 -09:00
Hayden
7afdd5b577
Feature/restore-recipe-functionality (#810)
* feat(frontend):  add back support for assets

* feat(backend):  add back support for assets

* feat(frontend):  add support for recipe tools

* feat(backend):  add support for recipe tools

* feat(frontend):  add onHand support for recipe toosl

* feat(backend):  add onHand support for backend

* refactor(frontend): ♻️ move items to recipe folder and break apart types

* feat(frontend):  add support for recipe comments

* feat(backend):  Add support for recipe comments

* fix(backend): 💥 disable comments import

* fix(frontend): 🐛 fix rendering issue with titles when moving steps

* add tools to changelog

* fix type errors

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-11-22 20:10:48 -09:00
Hayden
ec3b53cdc3
Refactor/user database models (#775)
* fix build error

* drop frontend.old

* improve auto_init decorator

* purge depreciated site settings

* formatting

* update init function

* fix(backend): 🐛 Fix password reset bug

Co-authored-by: Hayden <hay-kot@pm.me>
2021-11-04 14:01:37 -08:00
Hayden
2afaf70a03
feat(backend): Minor linting, bulk URL import, and improve BG tasks (#760)
* Fixes #751

* Fixes not showing original URL

* start slice at 0 instead of 1

* remove print statements

* add linter for print statements and remove print

* hide all buttons when edit disabled

* add bulk import API

* update attribute bindings

* unify button styles

* bulk add recipe feature

* thanks linter!

* uncomment code

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-28 19:28:33 -08:00
Hayden
89da1a2654
Feature/Capture Scraper Improvement PRs (#749)
* capture #732 changes

* capture PR #733

* capture PR #736

* capture pr #745

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-19 15:55:45 -08:00
Hayden
3b920babe3
feat: Add brute strategy to ingredient processor (#744)
* fix UI column width

* words

* update parser to support diff strats

* add new model url

* make button more visible

* fix nutrition error

* feat(backend):  add 'brute' strategy for parsing ingredients

* satisfy linter

* update UI for creation page

* feat(backend):  log 422 errors in detail when not in PRODUCTION

* add strategy selector

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-16 16:06:13 -08:00
Hayden
60908e5a88
Feature/CRF++ and server side locales (#731)
* add universal toast plugin

* add server side locales

* integrate CRF++ into CI/CD Pipeline

* docs(docs): 📝 add recipe parser docs

* feat(backend):  Continued work on ingredient parsers

* add new model dest

* feat(frontend):  New ingredient parser page

* formatting

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-09 13:08:23 -08:00
Hayden
2e9026f9ea
feat(frontend): Fix scheduler, forgot password flow, and minor bug fixes (#725)
* feat(frontend): 💄 add recipe title

* fix(frontend): 🐛 fixes #722 side-bar issue

* feat(frontend):  Add page titles to all pages

* minor cleanup

* refactor(backend): ♻️ rewrite scheduler to be more modulare and work

* feat(frontend):  start password reset functionality

* refactor(backend): ♻️ refactor application settings to facilitate dependency injection

* refactor(backend): 🔥 remove RECIPE_SETTINGS env variables in favor of group settings

* formatting

* refactor(backend): ♻️ align naming convention

* feat(backend):  password reset

* test(backend):  password reset

* feat(frontend):  self-service password reset

* purge password schedule

* update user creation for tests

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-07 09:39:47 -08:00
Hayden
5d43fac7c9
feat(frontend): add group permissions (#721)
* style(frontend): 💄 add darktheme custom

* add dummy users in dev mode

* feat(frontend):  add group permissions editor UI

* feat(backend):  add group permissions setters

* test(backend):  tests for basic permission get/set (WIP)

Needs more testing

* remove old test

* chore(backend): copy template.env on setup

* feat(frontend):  enable send invitation via email

* feat(backend):  enable send invitation via email

* feat:  add app config checker for site-settings

* refactor(frontend): ♻️ consolidate bool checks

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-04 20:16:37 -08:00
Hayden
b7b8aa9a08
Feature/email support (#720)
* feat(frontend):  add UI for testing email configuration

* feat(backend):  add email service with common templates (WIP)

* test(backend):  add basic tests for email configuration

* set defaults

* add email variables

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-03 18:38:45 -08:00
Hayden
c0dd07f9e7
Feature/infinite scroll (#719)
* feat(frontend):  lazy-load all recipes page

* feat(frontend):  enable runtime theme through env-variables

* docs(docs): 📝 update v1 changelog

* bump version

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-03 14:07:18 -08:00
Hayden
568215cf70
perf(backend): remove validation on recipe summary response (#718)
* count responses

* perf(backend):  remove validation on recipe summary response

use the construct() method from pydantic to reduce get time as well as optimize the SQL query for recipes

* update UI to support new categories/tags

* fix(backend): 🐛 restrict recipes by group

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-02 22:07:29 -08:00
Hayden
4bdba9f3af
feat(backend): 🚧 stub out new exporter service (WIP) (#715)
* chore(backend): 🎨 add isort path to vscode settings

* style(frontend): 💄 remove fab and add general create button

* feat(backend): 🚧 stub out new exporter service

* comment out stub tests

Co-authored-by: Hayden <hay-kot@pm.me>
2021-10-02 11:37:04 -08:00
Hayden
476aefeeb0
refactor(backend): ♻️ cleanup HTTP service classes and remove database singleton (#687)
* refactor(backend): ♻️ cleanup duplicate code in http services

* refactor(backend): ♻️ refactor database away from singleton design

removed the database single and instead injected the session into a new Database class that is created during each request life-cycle. Now sessions no longer need to be passed into each method on the database

All tests pass, but there are likely some hidden breaking changes that were not discovered.

* fix venv

* disable venv cache

* fix install script

* bump poetry version

* postgres fixes

* revert install

* fix db initialization for postgres

* add postgres to docker

* refactor(backend): ♻️ cleanup unused and duplicate code in http services

* refactor(backend): remove sessions from arguments

* refactor(backend): ♻️ convert units and ingredients to use http service class

* test(backend):  add unit and food tests

* lint

* update tags

* re-enable cache

* fix missing fraction in db

* fix lint

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-09-19 15:31:34 -08:00
Hayden
b542583303
feat(backend): rewrite mealplanner with simple api (#683)
* feat(backend):  new meal-planner feature

* feat(frontend):  new meal plan feature

* refactor(backend): ♻️ refactor base services classes and add mixins for crud

* feat(frontend):  add UI/API for mealplanner

* feat(backend):  add get_today and get_slice options for mealplanner

* test(backend):  add and update group mealplanner tests

* fix(backend): 🐛 Fix recipe_id column type for PG

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-09-12 11:05:09 -08:00
Hayden
bdaf758712
feat(backend): start multi-tenant support (WIP) (#680)
* fix ts types

* feat(code-generation): ♻️ update code-generation formats

* new scope

* add step button

* fix linter error

* update code-generation tags

* feat(backend):  start multi-tenant support

* feat(backend):  group invitation token generation and signup

* refactor(backend): ♻️ move group admin actions to admin router

* set url base to include `/admin`

* feat(frontend):  generate user sign-up links

* test(backend):  refactor test-suite to further decouple tests (WIP)

* feat(backend): 🐛 assign owner on backup import for recipes

* fix(backend): 🐛 assign recipe owner on migration from other service

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-09-09 08:51:29 -08:00
Hayden
3c504e7048
feat(backend): migrate site-settings to groups (#673)
* feat(frontend):  add user registration page (WIP)

* feat(backend):  add user registration (WIP)

* test(backend):  add validator testing for registration schema

* feat(backend):  continued work on user sign-up

* feat(backend):  add signup flow and user/group settings

* test(backend):  user-creation tests and small refactor of existing tests

* fix(backend):  fix failing group tests

* style: 🎨 fix lint issues

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-09-05 22:05:29 -08:00
Hayden
990244e37e
Refactor/group page (#666)
* refactor(backend): ♻️ Refactor base class to be abstract and create a router factory method

* feat(frontend):  add group edit

* refactor(backend):  add group edit support

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-09-01 21:39:40 -08:00
Hayden
9b1bf56a5d
[Feat] Migrate from Pages to Cookbooks (#664)
* feat:  Add Description to Cookbooks

* feat(frontend):  Cookbook view page

* feat(frontend): 💄 Add final UI touches

* fix(backend): 🐛 Add get by slug or id

* fix linting issue

* test(backend):  Update tests from pages -> cookbooks

* refactor(backend): 🔥 Delete old page files

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-08-31 18:51:34 -08:00
hay-kot
165fd8efd6 test(backend): add @skip for crf tests that can only run locally 2021-08-31 14:39:54 -08:00
hay-kot
2e6352cfbd update NLP for ingredients 2021-08-29 17:10:51 -08:00
hay-kot
985ad8017d refactor(backend): ♻️ move router dependencies to mealie.core.dependencies module 2021-08-28 15:36:46 -08:00
hay-kot
7c936c85ae style(backend): 🎨 add isort to lint and CI/CD 2021-08-28 14:27:56 -08:00
hay-kot
161618808e refactor(backend): 🔥 Remove Backend Theme Support 2021-08-27 20:47:24 -08:00
hay-kot
d1a7ec3b95 fix(backend): 🐛 Fix CI/CD Linting Failures 2021-08-23 15:33:39 -08:00
hay-kot
62836e5381 refactor(backend): ♻️ Update tag naming and reorganized some routes. Still WIP 2021-08-21 21:49:14 -08:00
hay-kot
d67240d449 refactor schema folders 2021-08-01 19:24:33 -08:00
Hayden
940663a22d
fixes #625 (#632)
* fixes #625

* update dependencies

* bump version

* fix failing tests

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-07-25 12:55:30 -08:00
sephrat
6320ba7ec5
API security hardening (#571)
* Enhance security and safety around user update API

- Prevent a regular user from promoting themself to admin
- Prevent an admin from demoting themself
- Refactor token fixture to admin + regular user tokens

* Restrict user CRUD API to admins

* Secure admin API routes

* Refactor APIrouter into Admin/UserAPIRouter

* Secure theme routes

* Make 'all recipes' routes public

* Secure favorite routes

* Remove redundant checks

* Fix public routes mistakenly flagged user routes

* Make webhooks changeable only by admin

* Allow users to create categories and tags

* Address lint issues
2021-06-22 10:22:15 -08:00
Hayden
2dc9c8e843
Improve Test Coverage (#511)
* add recipe scaling notes

* test theme rename

* fix coverage call to use poetry

* remove print

* remove async

* consolidate test case data

* fix mealplan tests

* remove redundant else

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-13 13:09:44 -08:00
Hayden
c175c8e9a0
add soft fail user dependency (#479)
* add soft fail user dependency

* filter private recipes on get_recipe_summary

* code clean-up

* restrict single recipe

* cleanup dependencies

* add auto_error oauth2 scheme

* update make file

* update make file

* fix early return

* bump python deps

* restrict category/tags

* format deps

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-10 18:31:14 -08:00
Hayden
a78fbea711
Feature/improve error message on scrape (#476)
* add better feedback on failed scrape

* fix json download link

* add better recipe parser

* dump deps

* fix force open on mobile

* formatting

* rewrite scraper to use new library

* fix failing tests

* bookmarklet support

* bookmarklet instructions

* recipes changelog

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-09 13:04:54 -08:00
Hayden
822663905d
feature/mobile-layout (#431)
* lazy load cards

* shopping list recipe search bug

* admin layout fluid

* site loader

* username support

* mobile tabs

* set username at signup

* update user tests

* patch bug on shopping list

* public mealplan links

* support link (I'm a monster)

* icon only on mobile

* padding

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-25 20:01:22 -08:00
Hayden
ef87f2231d
feature/mealplanner-rewrite (#417)
* multiple recipes per day

* fix update

* meal-planner rewrite

* disable meal-tests

* spacing

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-22 21:04:19 -08:00
Hayden
95ec13161f
feature/profile-cards (#391)
* unify format

* pass variables

* remove namespace

* rename

* group-card init

* shuffle + icons

* remove console.logs

* token CRUD

* update changelog

* add profile link

* consolidate mealplan to profile dashboard

* update docs

* add query parameter to search page

* update test routes

* update python depts

* basic token tests

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-06 21:08:27 -08:00
Hayden
1b0de02b71
feature/new-feature-cleanup (#389)
* add json editor to theme editor

* add toolbars tools to recipe sections

* fix recipe yield

* add updated_date to recipe schema

* update time cards

* fix mobile buttons

* fix asset URL

* fix PG errors CRUD

* remove -d from docker-pro

* fix theme tests

* remvoe old typing

* abstract count function

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-05 14:08:13 -08:00
Hayden
c1370afb16
Refactor/backend routers (#388)
* update router

* update caddy file

* setup depends in docker-fole

* make changes for serving on subpath

* set dev config

* fix router signups

* consolidate links

* backup-functionality to dashboard

* new user card

* consolidate theme into profile

* fix theme tests

* fix pg tests

* fix pg tests

* remove unused import

* mobile margin

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-04 20:45:11 -08:00
Hayden
c196445e61
feature/additional-db (#371)
* add support for setting db_url

* fix tests

* add db_username/password env variables

* init db if super user doesn't exist

* fix tests

* fix tests

* set SQLite default DB_URL

* don't run tests on draft PRs

* add lint/black tests

* add test-all

* spell check settings

* black/flake8

* check format fail

* new badges

* rename workflow

* fix formatting

* remove white-space

* test connection arguments for pg

* format

* add new values to template

* format

* remove old script

* monkeypatch test db

* working docker-compose for postgres

* update docs

* test pg workflow

* format

* add driver

* install w/ poetry

* setup container

* change image

* set database to localhost

* update tests

* set url

* fix url path

* disable cache

* database init

* bust cache

* get by name

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-01 13:35:57 -08:00
sephrat
52e5e9da5d
Remove former profile image upon new upload (#381)
* Remove former profile image upon new upload

* Fix test
2021-05-01 13:35:46 -08:00
Hayden
1dc051f562
Refactor/recipe routes (#370)
* format with black

* black format

* flake8

* remove bar exceptions

* remove test for depreciated route

* recipe settings editr

* add sqlite

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-29 21:46:27 -08:00
sephrat
1e5edc7434
More localization (#358)
* Translate missing items on About page

* Localize import summary dialog

* Make site menu translation reactive

* Localize import options

* Include semi colon in string

* Move API texts to frontend + better status codes

* Provide feedback to user when no meal is planned

* Fix API tests after latest rework

* Add warning for API changes in changelog

* Refactor API texts handling

* Refactor API texts handling #2

* Better API feedback

* Rearrange strings hierarchy

* Add messages upon recipe updated

* Fix 'recipe effected' typo

* Remove snackbar usage in backend

* Translate toolbox

* Provide feedback for tags CRUD

* Fix messed up merge

* Translate sign-up form

* Better feedback for sign-up CRUD

* Refactor log-in API texts handling

* No error message when user is not authenticated

* Remove unimportant console log
2021-04-29 08:22:45 -08:00
Hayden
61e0a52100
refactor/recipe-to-snake-case (#364)
* formatting

* snake case all recipes entries

* set foreign key to int

* run scheduler at startup and not import

* set SQLite file path before imports

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-28 21:17:49 -08:00
Hayden
846d1eda5b
feature/category-tag-crud (#354)
* update tag route

* search.and

* offset for mobile

* relative imports

* get settings

* new page

* category/tag CRUD

* bulk assign frontend

* Bulk assign

* debounce search

* remove dev data

* recipe store refactor

* fix mobile view

* fix failing tests

* commit test data

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-27 11:17:00 -08:00
Hayden
42deb5ad10
Feature/migration-rewrite (#278)
* start

* migration rewrite

* update name

* convert chowdown to new methods

* refactor/remove duplicate code

* refactor to unify logger + log to file

* remove toolbox

* Display report on UI

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-10 15:09:06 -08:00
sephrat
bb52c78c5b
Fix some pytests (#265)
* Fix encoding issue in cleaner unit test

* Add VS Code task to run pytests

* Fix FileExistsError when running Windows
2021-04-07 21:00:05 -08:00