diff --git a/.dockerignore b/.dockerignore
index 6316f30fa..cc5da2130 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,2 +1,3 @@
*/node_modules
-*/dist
\ No newline at end of file
+*/dist
+##
\ No newline at end of file
diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml
new file mode 100644
index 000000000..3a7a0116e
--- /dev/null
+++ b/.github/workflows/build-docs.yml
@@ -0,0 +1,20 @@
+name: Publish docs via GitHub Pages
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ build:
+ name: Deploy docs
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout main
+ uses: actions/checkout@v1
+
+ - name: Deploy docs
+ uses: mhausenblas/mkdocs-deploy-gh-pages@master
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ CONFIG_FILE: docs/mkdocs.yml
+ EXTRA_PACKAGES: build-base
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 486f3fec7..7230489b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,14 +3,19 @@
__pycache__/
*.py[cod]
*$py.class
-frontend/.env.development
+# frontend/.env.development
docs/site/
+mealie/temp/*
+mealie/temp/api.html
+
mealie/data/backups/*
mealie/data/debug/*
mealie/data/img/*
+!mealie/dist/*
#Exception to keep folders
+!mealie/dist/.gitkeep
!mealie/data/backups/.gitkeep
!mealie/data/backups/dev_sample_data*
!mealie/data/debug/.gitkeep
@@ -18,12 +23,12 @@ mealie/data/img/*
.DS_Store
node_modules
-/dist
+
# local env files
.env.local
.env.*.local
-.env.development
+
# Log files
npm-debug.log*
@@ -48,7 +53,7 @@ pnpm-debug.log*
env/
build/
develop-eggs/
-dist/
+
downloads/
eggs/
.eggs/
@@ -143,5 +148,3 @@ ENV/
# Node Modules
node_modules/
-
-/*.env.development*
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 94282cdd5..9c2025d70 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -8,9 +8,12 @@
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
- "python.testing.pytestEnabled": false,
- "python.testing.promptToConfigure": false,
+ "python.discoverTest": true,
+ "python.testing.pytestEnabled": true,
"cSpell.enableFiletypes": [
"!python"
+ ],
+ "python.testing.pytestArgs": [
+ "mealie"
]
}
diff --git a/Dockerfile b/Dockerfile
index c79a16c3a..4a803d026 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM node:alpine as build-stage
+FROM node:lts-alpine as build-stage
WORKDIR /app
COPY ./frontend/package*.json ./
RUN npm install
@@ -18,7 +18,12 @@ WORKDIR /app
RUN pip install -r requirements.txt
COPY ./mealie /app
-COPY ./mealie/data/templates/recipes.md /app/data/templates/
+COPY ./mealie/data/templates/recipes.md /app/data/templates/recipes.md
COPY --from=build-stage /app/dist /app/dist
+RUN rm -rf /app/test /app/temp
+
+ENV ENV prod
+
+VOLUME [ "/app/data" ]
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "9000"]
\ No newline at end of file
diff --git a/Dockerfile.dev b/Dockerfile.dev
index 7e55d6008..de37b9cc1 100644
--- a/Dockerfile.dev
+++ b/Dockerfile.dev
@@ -3,18 +3,17 @@ FROM python:3
RUN apt-get update -y && \
apt-get install -y python-pip python-dev
-# We copy just the requirements.txt first to leverage Docker cache
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
RUN pip install -r requirements.txt
+RUN pip install pytest
-# COPY ./mealie /app
+COPY ./mealie /app
ENTRYPOINT [ "python" ]
-# TODO Reconfigure Command to start a Gunicorn Server that managed the Uvicorn Server. Also Learn how to do that :-/
-CMD [ "app.py" ]
\ No newline at end of file
+CMD [ "app.py" ]
\ No newline at end of file
diff --git a/README.md b/README.md
index eb4cf0d58..ddf6db3d2 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,6 @@
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
-[![LinkedIn][linkedin-shield]][linkedin-url]
[![Docker Pulls][docker-pull]][docker-pull]
@@ -21,14 +20,21 @@
A Place for All Your Recipes
Explore the docs »
-
+
+ View Demo
·
- Report Bug
+ Report Bug
·
- Request Feature
-
+ API
+ ·
+
+ Request Feature
+
+ ·
+ Docker Hub
+
@@ -39,7 +45,7 @@
[![Product Name Screen Shot][product-screenshot]](https://example.com)
-**Mealie** is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relavent data or add a family recipe with the UI editor.
+**Mealie** is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor.
Mealie also provides a secure API for interactions from 3rd party applications. **Why does my recipe manager need an API?** An API allows integration into applications like [Home Assistant]() that can act as notification engines to provide custom notifications based of Meal Plan data to remind you to defrost the chicken, marinade the steak, or start the CrockPot. See the section on [Meal Plan hooks](#hooks) for more information. Additionally, you can access any available API from the backend server. To explore the API spin up your server and navigate to http://yourserver.com/docs for interactive API documentation.
@@ -56,7 +62,7 @@ Mealie also provides a secure API for interactions from 3rd party applications.
- Add notes to recipes
#### Meal Planner
- Random Meal plan generation based off categories
- - Expose notes in the API to allow external applications to access relavent information for meal plans
+ - Expose notes in the API to allow external applications to access relevant information for meal plans
#### Database Import / Export
- Easily Import / Export your recipes from the UI
- Export recipes in into custom files using Jinja2 templates
@@ -73,7 +79,9 @@ Mealie also provides a secure API for interactions from 3rd party applications.
## Contributing
-Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
+Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. Especially test. Literally any tests. See the [Contributors Guide](https://hay-kot.github.io/mealie/contributors/developers-guide/code-contributions/) for help getting started.
+
+If you are not a coder, you can still contribute financially. financial contributions help me prioritize working on this project over others and helps me know that there is a real demand for project development.
diff --git a/dev/dev-notes.md b/dev/dev-notes.md
index 86d47ce21..a1b0d7108 100644
--- a/dev/dev-notes.md
+++ b/dev/dev-notes.md
@@ -17,13 +17,13 @@ Don't forget to [join the Discord](https://discord.gg/R6QDyJgbD2)!
# Todo's
Frontend
-- [ ] .Vue file reorganized into something that makes sense
+- [x] .Vue file reorganized into something that makes sense
- [ ] Recipe Print Page
- [x] Catch 400 / bad response on create from URL
- [ ] Recipe Editor Data Validation Client Side
- [x] Favicon
- [x] Rename Window
-- [ ] Add version indicator and notification for new version available
+- [x] Add version indicator and notification for new version available
- [ ] Enhanced Search Functionality
- [ ] Organize Home Page my Category, ideally user selectable.
@@ -41,15 +41,21 @@ Backend
# Draft Changelog
## v0.0.2
-General
+Bug Fixes
- Fixed opacity issues with marked steps - [mtoohey31](https://github.com/mtoohey31)
-- Updated Favicon
-- Renamed Frontend Window
-- Added Debug folder to dump scraper data prior to processing.
-- Improved documentation
-- Added version tag / relevant links, and new version notifier
+- Fixed hot-reloading development environment - [grssmnn](https://github.com/grssmnn)
+- Fixed recipe not saving without image
+- Fixed parsing error on image property null
-Recipes
-- Added user feedback on bad URL.
-- Better backend data validation for updating recipes, avoid small syntax errors corrupting database entry. [Issue #8](https://github.com/hay-kot/mealie/issues/8)
-- Fixed spacing issue while editing new recipes in JSON
+General Improvements
+- Added Confirmation component to deleting recipes - [zackbcom](https://github.com/zackbcom)
+- Updated Theme backend - [zackbcom](https://github.com/zackbcom)
+- Added Persistent storage to vuex - [zackbcom](https://github.com/zackbcom)
+- General Color/Theme Improvements
+ - More consistent UI
+ - More minimalist coloring
+- Added API Key Extras to Recipe Data
+ - Users can now add custom json key/value pairs to all recipes via the editor for access in 3rd part applications. For example users can add a "message" field in the extras that can be accessed on API calls to play a message over google home.
+- Improved image rendering (nearly x2 speed)
+- Improved documentation + API Documentation
+- Improved recipe parsing
diff --git a/dev/scripts/docker-compose.dev.sh b/dev/scripts/docker-compose.dev.sh
index 3a4741345..485e52f66 100755
--- a/dev/scripts/docker-compose.dev.sh
+++ b/dev/scripts/docker-compose.dev.sh
@@ -1 +1 @@
-docker-compose -f docker-compose.dev.yml build && docker-compose -f docker-compose.dev.yml -p dev-mealie up -d
\ No newline at end of file
+docker-compose -f docker-compose.dev.yml -p dev-mealie up --build
\ No newline at end of file
diff --git a/dev/scripts/docker-compose.sh b/dev/scripts/docker-compose.sh
index 3336c7bc5..e2fd9edcd 100755
--- a/dev/scripts/docker-compose.sh
+++ b/dev/scripts/docker-compose.sh
@@ -1 +1 @@
-docker-compose build && docker-compose -p mealie up -d
\ No newline at end of file
+docker-compose -p mealie up --build
\ No newline at end of file
diff --git a/dev/scripts/scrape_recipe.py b/dev/scripts/scrape_recipe.py
new file mode 100644
index 000000000..de18e64b2
--- /dev/null
+++ b/dev/scripts/scrape_recipe.py
@@ -0,0 +1,18 @@
+"""
+Helper script to download raw recipe data from a URL and dump it to disk.
+The resulting files can be used as test input data.
+"""
+
+import sys, json
+from scrape_schema_recipe import scrape_url
+
+for url in sys.argv[1:]:
+ try:
+ data = scrape_url(url)[0]
+ slug = list(filter(None, url.split("/")))[-1]
+ filename = f"{slug}.json"
+ with open(filename, "w") as f:
+ json.dump(data, f, indent=4, default=str)
+ print(f"Saved {filename}")
+ except Exception as e:
+ print(f"Error for {url}: {e}")
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index d9b9d4879..72b5f9a84 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -2,23 +2,26 @@
version: "3.1"
services:
# Vue Frontend
- mealie:
+ mealie-frontend:
+ image: mealie-frontend:dev
build:
context: ./frontend
dockerfile: frontend.Dockerfile
- container_name: mealie_frontend
restart: always
ports:
- 9920:8080
+ environment:
+ VUE_APP_API_BASE_URL: "http://mealie-api:9000"
volumes:
- - ./frontend:/app
+ - ./frontend/:/app
+ - /app/node_modules
# Fast API
mealie-api:
+ image: mealie-api:dev
build:
context: ./
dockerfile: Dockerfile.dev
- container_name: mealie-api
restart: always
ports:
- 9921:9000
diff --git a/docker-compose.yml b/docker-compose.yml
index 77a722672..1b044e1dc 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -16,8 +16,7 @@ services:
db_host: mongo
db_port: 27017
volumes:
- - ./mealie/data/img:/app/data/img
- - ./mealie/data/backups:/app/data/backups
+ - ./mealie/data/:/app/data
mongo:
image: mongo
restart: always
diff --git a/docs/docs/1.9 - release-notes.md b/docs/docs/1.9 - release-notes.md
deleted file mode 100644
index 9e19854fb..000000000
--- a/docs/docs/1.9 - release-notes.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Release Notes
-
-## v0.0.1 - Pre-release Patch
-General
-- Updated Favicon
-- Renamed Frontend Window
-- Added Debug folder to dump scraper data prior to processing.
-
-Recipes
-- Added user feedback on bad URL
-- Better backend data validation for updating recipes, avoid small syntax errors corrupting database entry. [Issue #8](https://github.com/hay-kot/mealie/issues/8)
-- Fixed spacing issue while editing new recipes in JSON
-
-## v0.0.0 - Initial Pre-release
-The initial pre-release. It should be semi-functional but does not include a lot of user feedback You may notice errors that have no user feedback and have no idea what went wrong.
-
-### Recipes
- - Automatic web scrapping for common recipe platforms
- - Interactive API Documentation thanks to [FastAPI](https://fastapi.tiangolo.com/) and [Swagger](https://petstore.swagger.io/)
- - UI Recipe Editor
- - JSON Recipe Editor in browser
- - Custom tags and categories
- - Rate recipes
- - Add notes to recipes
- - Migration From Other Platforms
- - Chowdown
-### Meal Planner
- - Random Meal plan generation based off categories
- - Expose notes in the API to allow external applications to access relevant information for meal plans
-
-### Database Import / Export
- - Easily Import / Export your recipes from the UI
- - Export recipes in markdown format for universal access
- - Use the default or a custom jinja2 template
\ No newline at end of file
diff --git a/docs/docs/api/api-usage.md b/docs/docs/api/api-usage.md
new file mode 100644
index 000000000..911e11347
--- /dev/null
+++ b/docs/docs/api/api-usage.md
@@ -0,0 +1,14 @@
+# Usage
+
+## Key Components
+### Recipe Extras
+Recipes extras are a key feature of the Mealie API. They allow you to create custom json key/value pairs within a recipe to reference from 3rd part applications. You can use these keys to contain information to trigger automation or custom messages to relay to your desired device.
+
+For example you could add `{"message": "Remember to thaw the chicken"}` to a recipe and use the webhooks built into mealie to send that message payload to a destination to be processed.
+
+
+
+
+## Examples
+
+Have Ideas? Submit a PR!
\ No newline at end of file
diff --git a/docs/docs/api/docs/index.html b/docs/docs/api/docs/index.html
new file mode 100644
index 000000000..0f19965fb
--- /dev/null
+++ b/docs/docs/api/docs/index.html
@@ -0,0 +1,26 @@
+
+
+
+
+ My Project - ReDoc
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md
new file mode 100644
index 000000000..61e4afb60
--- /dev/null
+++ b/docs/docs/changelog.md
@@ -0,0 +1,57 @@
+# Release Notes
+
+## v0.0.2 - Pre-release Second Patch
+A quality update with major props to [zackbcom](https://github.com/zackbcom) for working hard on making the theming just that much better!
+### Bug Fixes
+ - Fixed empty backup failure without markdown template
+ - Fixed opacity issues with marked steps - [mtoohey31](https://github.com/mtoohey31)
+ - Fixed hot-reloading development environment - [grssmnn](https://github.com/grssmnn)
+ - Fixed recipe not saving without image
+ - Fixed parsing error on image property null
+
+### General Improvements
+ - Added Confirmation component to deleting recipes - [zackbcom](https://github.com/zackbcom)
+ - Updated Theme backend - [zackbcom](https://github.com/zackbcom)
+ - Added Persistent storage to vuex - [zackbcom](https://github.com/zackbcom)
+ - General Color/Theme Improvements
+ - More consistent UI
+ - More minimalist coloring
+ - Added API key extras to Recipe Data - [See Documentation](/api/api-usage/)
+ - Users can now add custom json key/value pairs to all recipes via the editor for access in 3rd part applications. For example users can add a "message" field in the extras that can be accessed on API calls to play a message over google home.
+ - Improved image rendering (nearly x2 speed)
+ - Improved documentation + API Documentation
+ - Improved recipe parsing
+ - User feedback on backup importing
+
+## v0.0.1 - Pre-release Patch
+### General
+ - Updated Favicon
+ - Renamed Frontend Window
+ - Added Debug folder to dump scraper data prior to processing.
+
+### Recipes
+ - Added user feedback on bad URL
+ - Better backend data validation for updating recipes, avoid small syntax errors corrupting database entry. [Issue #8](https://github.com/hay-kot/mealie/issues/8)
+ - Fixed spacing issue while editing new recipes in JSON
+
+## v0.0.0 - Initial Pre-release
+The initial pre-release. It should be semi-functional but does not include a lot of user feedback You may notice errors that have no user feedback and have no idea what went wrong.
+
+### Recipes
+ - Automatic web scrapping for common recipe platforms
+ - Interactive API Documentation thanks to [FastAPI](https://fastapi.tiangolo.com/) and [Swagger](https://petstore.swagger.io/)
+ - UI Recipe Editor
+ - JSON Recipe Editor in browser
+ - Custom tags and categories
+ - Rate recipes
+ - Add notes to recipes
+ - Migration From Other Platforms
+ - Chowdown
+### Meal Planner
+ - Random Meal plan generation based off categories
+ - Expose notes in the API to allow external applications to access relevant information for meal plans
+
+### Database Import / Export
+ - Easily Import / Export your recipes from the UI
+ - Export recipes in markdown format for universal access
+ - Use the default or a custom jinja2 template
\ No newline at end of file
diff --git a/docs/docs/2.1 - Contributions.md b/docs/docs/contributors/developers-guide/code-contributions.md
similarity index 67%
rename from docs/docs/2.1 - Contributions.md
rename to docs/docs/contributors/developers-guide/code-contributions.md
index 98abce87c..6b12973b1 100644
--- a/docs/docs/2.1 - Contributions.md
+++ b/docs/docs/contributors/developers-guide/code-contributions.md
@@ -1,26 +1,22 @@
# Contributing to Mealie
-We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
-- Reporting a bug
-- Discussing the current state of the code
-- Submitting a fix
-- Proposing new features
-- Becoming a maintainer
+!!! Warning
+ It should be known going into this that this is my first open source project, and my first public github repo I'm actively managing. If something does not make sense, or is not best practice. PLEASE feel free to reach out and let me know. I'm all about improving workflow and making it easier for contributors.
-[Remember to join the Discord and stay in touch with other developers working on the project](https://discord.gg/R6QDyJgbD2)!
+[Please Join the Discord](https://discord.gg/R6QDyJgbD2). We are building a community of developers working on the project.
## We Develop with Github
We use github to host code, to track issues and feature requests, as well as accept pull requests.
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
-Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
+Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
-1. Fork the repo and create your branch from `master`.
+1. Fork the repo and create your branch from `dev`.
2. Read the page in in [dev/dev-notes.md](https://github.com/hay-kot/mealie/blob/0.1.0/dev/dev-notes.md) to get an idea on where the project is at.
-3. If you've changed APIs, update the documentation.
-4. Make sure your code lints.
+3. If you're interested on working on major changes please get in touch on discord and coordinate with other developers. No sense in doubling up on work if someones already on it.
+4. If you've changed APIs, update the documentation.
5. Issue that pull request!
-6. If you make changes to the dev/0.1.0 branch reflect those changes in the dev/dev-notes.md to keep track of changes.
+6. If you make changes to the dev branch reflect those changes in the dev/dev-notes.md to keep track of changes. Don't forget to add your name/handle/identifier!
## Any contributions you make will be under the MIT Software License
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
diff --git a/docs/docs/contributors/developers-guide/general-guidelines.md b/docs/docs/contributors/developers-guide/general-guidelines.md
new file mode 100644
index 000000000..c8743852d
--- /dev/null
+++ b/docs/docs/contributors/developers-guide/general-guidelines.md
@@ -0,0 +1,3 @@
+# Guidelines
+
+TODO
\ No newline at end of file
diff --git a/docs/docs/contributors/developers-guide/starting-dev-server.md b/docs/docs/contributors/developers-guide/starting-dev-server.md
new file mode 100644
index 000000000..9a3ee56a2
--- /dev/null
+++ b/docs/docs/contributors/developers-guide/starting-dev-server.md
@@ -0,0 +1,31 @@
+# Development: Getting Started
+
+After reading through the [Code Contributions Guide](https://hay-kot.github.io/mealie/contributors/developers-guide/code-contributions/) and forking the repo you can start working. This project is developed with :whale: docker and as such you will be greatly aided by using docker for development. It's not necessary but it is helpful.
+
+## With Docker
+`cd` into frontend directory and run `npm install` to install the node modules.
+
+There are 2 scripts to help set up the docker containers in dev/scripts/.
+
+`docker-compose.dev.sh` - Will spin up a docker development server
+`docker-compose.sh` - Will spin up a docker production server
+
+There are VSCode tasks created in the .vscode folder. You can use these to quickly execute the scripts above using the command palette.
+
+
+## Without Docker
+?? TODO
+
+## Trouble Shooting
+
+!!! Error "Symptom: Vue Development Server Wont Start"
+ **Error:** `TypeError: Cannot read property 'upgrade' of undefined`
+
+ **Solution:** You may be missing the `/frontend/.env.development.` The contents should be `VUE_APP_API_BASE_URL=http://127.0.0.1:9921`. This is a reference to proxy the the API requests from Vue to 127.0.0.1 at port 9921 where FastAPI should be running.
+
+!!! Error "Symptom: FastAPI Development Server Wont Start"
+ **Error:** `RuntimeError: Directory '/app/dist' does not exist`
+
+ **Solution:** Create an empty /mealie/dist directory. This directory is served as static content by FastAPI. It is provided during the build process and may be missing in development.
+
+Run into another issue? [Ask for help on discord](https://discord.gg/R6QDyJgbD2)
\ No newline at end of file
diff --git a/docs/docs/contributors/non-coders.md b/docs/docs/contributors/non-coders.md
new file mode 100644
index 000000000..cb0480b28
--- /dev/null
+++ b/docs/docs/contributors/non-coders.md
@@ -0,0 +1,15 @@
+# Non-Code Contributions
+
+We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
+
+- Reporting a bug
+- Discussing the current state of the code
+- Submitting a fix
+- Proposing new features
+- Becoming a maintainer
+
+[Remember to join the Discord and stay in touch with other developers working on the project](https://discord.gg/R6QDyJgbD2)!
+
+Additionally, you can buy me a coffee and support the project. When I get financial support it helps me know that there's real interest in the project and that it's worth the time to keep developing.
+
+
\ No newline at end of file
diff --git a/docs/docs/1.3 - admin-panel.md b/docs/docs/getting-started/backups-and-exports.md
similarity index 66%
rename from docs/docs/1.3 - admin-panel.md
rename to docs/docs/getting-started/backups-and-exports.md
index fde088e51..f20e0c32d 100644
--- a/docs/docs/1.3 - admin-panel.md
+++ b/docs/docs/getting-started/backups-and-exports.md
@@ -1,19 +1,5 @@
-# Site Settings Panel
-!!! danger
- As this is still a **BETA** It is recommended that you backup your data often and store in more than one place. Ad-hear to backup best practices with the [3-2-1 Backup Rule](https://en.wikipedia.org/wiki/Backup)
-
-
-## Theme Settings
-Color themes can be created and set from the UI in the settings page. You can select an existing color theme or create a new one. On creation of a new color theme random colors will first be generated, then you can select and save as you'd like. By default the "default" theme will be loaded for all new users visiting the site. All created color themes are available to all users of the site. Separate color themes can be set for both Light and Dark modes.
-
-
-
-!!! note
- Theme data is stored in cookies in the browser. Calling "Save Theme" will refresh the cookie with the selected theme as well save the theme to the database.
-
-
-## Backup and Export
-
+# Backup and Export
+
All recipe data can be imported and exported as necessary from the UI. Under the admin page you'll find the section for using Backups and Exports.
@@ -21,10 +7,10 @@ To create an export simple add the tag and the markdown template and click Backu
To import a backup it must be in your backups folder. If it is in the backup folder it will automatically show up as an source to restore from. Selected the desired backup and import the backup file.
-### Custom Templating
+## Custom Templating
On export you can select a template to use to render files using the jinja2 syntax. This can be done to export recipes in other formats besides regular .json.Look at this example for rendering a markdown recipe using the jinja2 syntax.
-#### Input
+### Input
```jinja2

@@ -52,7 +38,7 @@ Categories: {{ recipe.categories }}
Original URL: {{ recipe.orgURL }}
```
-#### Output
+### Output
```markdown

@@ -90,14 +76,4 @@ Categories: []
Original URL: https://www.bonappetit.com/recipe/five-spice-popcorn-chicken#intcid=_bon-appetit-recipe-bottom-recirc_3cad5ce9-734a-46f8-b503-78c33d2e7279_similar2-3
```
-If you decide you don't like mealie. This is a good way to export into a format that can be imported into another.
-
-
-## Meal Planner Webhooks
-Meal planner webhooks are post requests sent from Mealie to an external endpoint. The body of the message is the Recipe JSON of the scheduled meal. If no meal is schedule, no request is sent. The webhook functionality can be enabled or disabled as well as scheduled. Note that you must "Save Webhooks" prior to any changes taking affect server side.
-
-## Migration
-
-### Chowdown
-
-In the Admin page on the in the Migration section you can provide a URL for a repo hosting a Chowdown site and Mealie will pull the images and recipes from the instance and automatically import them into the database. Due to the nature of the yaml format you may have mixed results but you should get an error report of the recipes that had errors and will need to be manually added. Note that you can only import the repo as a whole. You cannot import individual recipes.
+If you decide you don't like mealie. This is a good way to export into a format that can be imported into another.
\ No newline at end of file
diff --git a/docs/docs/1.0 - getting-started.md b/docs/docs/getting-started/install.md
similarity index 94%
rename from docs/docs/1.0 - getting-started.md
rename to docs/docs/getting-started/install.md
index 0c4346239..b5196d2b3 100644
--- a/docs/docs/1.0 - getting-started.md
+++ b/docs/docs/getting-started/install.md
@@ -1,4 +1,4 @@
-# Getting Started
+# Installation
To deploy docker on your local network it is highly recommended to use docker to deploy the image straight from dockerhub. Using the docker-compose below you should be able to get a stack up and running easily by changing a few default values and deploying. Currently the only supported database is Mongo. Mealie is looking for contributors to support additional databases.
@@ -16,6 +16,7 @@ To deploy docker on your local network it is highly recommended to use docker to
| db_password | example | The Mongodb password you specified in your mongo container |
| db_host | mongo | The host address of MongoDB if you're in docker and using the same network you can use mongo as the host name |
| db_port | 27017 | the port to access MongoDB 27017 is the default for mongo |
+| api_docs | True | Turns on/off access to the API documentation locally. |
| TZ | | You should set your time zone accordingly so the date/time features work correctly |
@@ -38,12 +39,13 @@ services:
db_port: 27017 # The Default port for Mongo DB
TZ: America/Anchorage
volumes:
- - ./data/img:/app/data/img
- - ./data/backups:/app/data/backups
+ - ./mealie/data/:/app/data/
mongo:
image: mongo
restart: always
+ volumes:
+ - ./mongo:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: root # Change!
MONGO_INITDB_ROOT_PASSWORD: example # Change!
@@ -56,6 +58,7 @@ services:
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
+
```
## Ansible Tasks Template
diff --git a/docs/docs/1.2 - meal-planner.md b/docs/docs/getting-started/meal-planner.md
similarity index 96%
rename from docs/docs/1.2 - meal-planner.md
rename to docs/docs/getting-started/meal-planner.md
index fbc388801..3e71a549e 100644
--- a/docs/docs/1.2 - meal-planner.md
+++ b/docs/docs/getting-started/meal-planner.md
@@ -8,4 +8,4 @@ To edit the meal in a meal plan simply select the edit button on the card in the
!!! warning
In coming a future release recipes for meals will be restricted to specific categories.
-
+
diff --git a/docs/docs/getting-started/migration-imports.md b/docs/docs/getting-started/migration-imports.md
new file mode 100644
index 000000000..1326b5d00
--- /dev/null
+++ b/docs/docs/getting-started/migration-imports.md
@@ -0,0 +1,12 @@
+# Migration
+
+### Chowdown
+
+In the Admin page on the in the Migration section you can provide a URL for a repo hosting a [Chowdown](https://github.com/clarklab/chowdown) repository and Mealie will pull the images and recipes from the instance and automatically import them into the database. Due to the nature of the yaml format you may have mixed results but you should get an error report of the recipes that had errors and will need to be manually added. Note that you can only import the repo as a whole. You cannot import individual recipes.
+
+We'd like to support additional migration paths. [See open issues.](https://github.com/hay-kot/mealie/issues)
+
+**Currently Proposed Are:**
+
+- NextCloud Recipes
+- Open Eats
\ No newline at end of file
diff --git a/docs/docs/1.1 - recipes.md b/docs/docs/getting-started/recipes.md
similarity index 98%
rename from docs/docs/1.1 - recipes.md
rename to docs/docs/getting-started/recipes.md
index a4cf6e412..7dab655b9 100644
--- a/docs/docs/1.1 - recipes.md
+++ b/docs/docs/getting-started/recipes.md
@@ -4,7 +4,7 @@
Adding a recipe can be as easy as copying the recipe URL into mealie and letting the web scrapper try to pull down the information. Currently this scraper is implemented with [scrape-schema-recipe package](https://pypi.org/project/scrape-schema-recipe/). You may have mixed results on some websites, especially with blogs or non specific recipe websites. See the bulk import Option below for another a convenient way to add blog style recipes into Mealie.
-
+
## Recipe Editor
@@ -12,12 +12,12 @@ Recipes can be edited and created via the UI. This is done with both a form base
You can also add a custom recipe with the UI editor built into the web view. After logging in as a user you'll have access to the editor to make changes to all the content in the recipe.
-
+
## Bulk Import
Mealie also supports bulk import of recipe instructions and ingredients. Select "Bulk Add" in the editor and paste in your plain text data to be parsed. Each line is treated as one entry and will be appended to the existing ingredients or instructions if they exist. Empty lines will be stripped from the text.
-
+
## Schema
Recipes are stored in the json-like format in mongoDB and then sent and edited in json format on the frontend. Each recipes uses [Recipe Schema](https://schema.org/Recipe) as a general guide with some additional properties specific to Mealie.
diff --git a/docs/docs/getting-started/site-settings.md b/docs/docs/getting-started/site-settings.md
new file mode 100644
index 000000000..7dc6266cd
--- /dev/null
+++ b/docs/docs/getting-started/site-settings.md
@@ -0,0 +1,21 @@
+# Site Settings Panel
+!!! danger
+ As this is still a **BETA** It is recommended that you backup your data often and store in more than one place. Ad-hear to backup best practices with the [3-2-1 Backup Rule](https://en.wikipedia.org/wiki/Backup)
+
+
+## Theme Settings
+Color themes can be created and set from the UI in the settings page. You can select an existing color theme or create a new one. On creation of a new color theme, the default colors will be used, then you can select and save as you'd like. By default the "default" theme will be loaded for all new users visiting the site. All created color themes are available to all users of the site. Theme Colors will be set for both light and dark modes.
+
+
+
+!!! note
+ Theme data is stored in localstorage in the browser. Calling "Save colors and apply theme will refresh the localstorage with the selected theme as well save the theme to the database.
+
+
+
+
+
+## Meal Planner Webhooks
+Meal planner webhooks are post requests sent from Mealie to an external endpoint. The body of the message is the Recipe JSON of the scheduled meal. If no meal is schedule, no request is sent. The webhook functionality can be enabled or disabled as well as scheduled. Note that you must "Save Webhooks" prior to any changes taking affect server side.
+
+
diff --git a/docs/docs/gifs/api-extras.gif b/docs/docs/gifs/api-extras.gif
new file mode 100644
index 000000000..d86f165c3
Binary files /dev/null and b/docs/docs/gifs/api-extras.gif differ
diff --git a/docs/docs/html/api.html b/docs/docs/html/api.html
new file mode 100644
index 000000000..7a1046cc7
--- /dev/null
+++ b/docs/docs/html/api.html
@@ -0,0 +1,26 @@
+
+
+
+
+ My Project - ReDoc
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/docs/index.md b/docs/docs/index.md
index d43b21511..7c5886d46 100644
--- a/docs/docs/index.md
+++ b/docs/docs/index.md
@@ -4,9 +4,20 @@
- Select a theme from the dropdown or create a new theme. Note that the
- default theme will be served to all users who have not set a theme
- preference.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Delete
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Save Theme
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/components/Admin/Users.vue b/frontend/src/components/Admin/Users.vue
deleted file mode 100644
index f8d0653fe..000000000
--- a/frontend/src/components/Admin/Users.vue
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- User Settings
-
-
-
-
-
-
\ No newline at end of file
diff --git a/frontend/src/components/MealPlan/EditPlan.vue b/frontend/src/components/MealPlan/MealPlanEditor.vue
similarity index 88%
rename from frontend/src/components/MealPlan/EditPlan.vue
rename to frontend/src/components/MealPlan/MealPlanEditor.vue
index 61cb58f7e..e1164fce2 100644
--- a/frontend/src/components/MealPlan/EditPlan.vue
+++ b/frontend/src/components/MealPlan/MealPlanEditor.vue
@@ -1,8 +1,7 @@
- Edit Meal Plan
-
-
+ Edit Meal Plan
+
diff --git a/frontend/src/components/MealPlan/NewMeal.vue b/frontend/src/components/MealPlan/MealPlanNew.vue
similarity index 97%
rename from frontend/src/components/MealPlan/NewMeal.vue
rename to frontend/src/components/MealPlan/MealPlanNew.vue
index fe9f574e5..fe1990213 100644
--- a/frontend/src/components/MealPlan/NewMeal.vue
+++ b/frontend/src/components/MealPlan/MealPlanNew.vue
@@ -1,8 +1,7 @@
-
- Create a New Meal Plan
-
+ Create a New Meal Plan
+
@@ -107,7 +106,7 @@ export default {
this.meals = [];
for (let i = 0; i < this.dateDif; i++) {
this.meals.push({
- slug: "",
+ slug: "empty",
date: this.getDate(i),
dateText: this.getDayText(i),
});
diff --git a/frontend/src/components/RecipeEditor/BulkAdd.vue b/frontend/src/components/Recipe/RecipeEditor/BulkAdd.vue
similarity index 100%
rename from frontend/src/components/RecipeEditor/BulkAdd.vue
rename to frontend/src/components/Recipe/RecipeEditor/BulkAdd.vue
diff --git a/frontend/src/components/Recipe/RecipeEditor/ExtrasEditor.vue b/frontend/src/components/Recipe/RecipeEditor/ExtrasEditor.vue
new file mode 100644
index 000000000..51422c474
--- /dev/null
+++ b/frontend/src/components/Recipe/RecipeEditor/ExtrasEditor.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/components/RecipeEditor/ViewRecipe.vue b/frontend/src/components/Recipe/RecipeViewer.vue
similarity index 98%
rename from frontend/src/components/RecipeEditor/ViewRecipe.vue
rename to frontend/src/components/Recipe/RecipeViewer.vue
index 5d525fa84..c995ccac9 100644
--- a/frontend/src/components/RecipeEditor/ViewRecipe.vue
+++ b/frontend/src/components/Recipe/RecipeViewer.vue
@@ -50,7 +50,7 @@
Categories
Tags
-
-
-
-
Ingredients
-
-
-
-
-
-
-
- mdi-plus
-
-
-
Categories
-
-
-
- {{ data.item }}
-
-
-
-
-
Tags
-
-
-
- {{ data.item }}
-
-
-
-
-
-
-
-
-
Instructions
-
-
-
- Step: {{ index + 1 }}
-
-
-
-
-
-
-
- mdi-plus
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/frontend/src/components/Admin/Backup.vue b/frontend/src/components/Settings/Backup/index.vue
similarity index 80%
rename from frontend/src/components/Admin/Backup.vue
rename to frontend/src/components/Settings/Backup/index.vue
index e986a4385..7162ec5b2 100644
--- a/frontend/src/components/Admin/Backup.vue
+++ b/frontend/src/components/Settings/Backup/index.vue
@@ -1,8 +1,7 @@
-
-
- Backup and Exports
-
+
+ Backup and Exports
+
@@ -57,15 +56,28 @@
+
+
+
+
diff --git a/frontend/src/components/Admin/Webhooks/TimePicker.vue b/frontend/src/components/Settings/Webhook/TimePickerDialog.vue
similarity index 100%
rename from frontend/src/components/Admin/Webhooks/TimePicker.vue
rename to frontend/src/components/Settings/Webhook/TimePickerDialog.vue
diff --git a/frontend/src/components/Admin/Webhooks.vue b/frontend/src/components/Settings/Webhook/index.vue
similarity index 93%
rename from frontend/src/components/Admin/Webhooks.vue
rename to frontend/src/components/Settings/Webhook/index.vue
index 5f433e6a8..672780997 100644
--- a/frontend/src/components/Admin/Webhooks.vue
+++ b/frontend/src/components/Settings/Webhook/index.vue
@@ -1,6 +1,6 @@
-
+
Meal Planner Webhooks
@@ -20,7 +20,7 @@
>
-
+ Test Webhooks
@@ -60,11 +60,11 @@
diff --git a/frontend/src/components/UI/Confirmation.vue b/frontend/src/components/UI/Confirmation.vue
new file mode 100644
index 000000000..e7720b50d
--- /dev/null
+++ b/frontend/src/components/UI/Confirmation.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+ {{ icon }}
+
+
+
+
+
+
+
+ Cancel
+ Confirm
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/components/RecentRecipes.vue b/frontend/src/components/UI/RecentRecipes.vue
similarity index 93%
rename from frontend/src/components/RecentRecipes.vue
rename to frontend/src/components/UI/RecentRecipes.vue
index 2804ff779..684d482bd 100644
--- a/frontend/src/components/RecentRecipes.vue
+++ b/frontend/src/components/UI/RecentRecipes.vue
@@ -20,7 +20,7 @@
+
+
\ No newline at end of file
diff --git a/frontend/src/main.js b/frontend/src/main.js
index 3e9f4f4b0..f5a1434d1 100644
--- a/frontend/src/main.js
+++ b/frontend/src/main.js
@@ -4,11 +4,9 @@ import vuetify from "./plugins/vuetify";
import store from "./store/store";
import VueRouter from "vue-router";
import { routes } from "./routes";
-import VueCookies from "vue-cookies";
Vue.config.productionTip = false;
Vue.use(VueRouter);
-Vue.use(VueCookies);
const router = new VueRouter({
routes,
@@ -23,7 +21,7 @@ new Vue({
}).$mount("#app");
// Truncate
-let filter = function(text, length, clamp) {
+let filter = function (text, length, clamp) {
clamp = clamp || "...";
let node = document.createElement("div");
node.innerHTML = text;
diff --git a/frontend/src/components/Page404.vue b/frontend/src/pages/404Page.vue
similarity index 100%
rename from frontend/src/components/Page404.vue
rename to frontend/src/pages/404Page.vue
diff --git a/frontend/src/components/Home.vue b/frontend/src/pages/HomePage.vue
similarity index 72%
rename from frontend/src/components/Home.vue
rename to frontend/src/pages/HomePage.vue
index 10aa93e0a..db14c5ee5 100644
--- a/frontend/src/components/Home.vue
+++ b/frontend/src/pages/HomePage.vue
@@ -5,7 +5,7 @@
+
+