diff --git a/dev/dev-notes.md b/dev/dev-notes.md
new file mode 100644
index 000000000000..86d47ce2104a
--- /dev/null
+++ b/dev/dev-notes.md
@@ -0,0 +1,55 @@
+# Getting A Developer Instance Started
+For the best experience developing I recommend using docker. I've used both WSL2 and Ubuntu to develop mealie and have had no issues with cross compatibility with docker. 2 Scripts are available along ith docker-compose files to make development instances easier. After cloning the repo you can set the scripts in /dev/scripts/ as executable and then use VSCode tasks to execute the scripts or execute them from the CLI.
+
+`docker-compose.dev.sh` Will spin up a development stack with hot-reloading enabled.
+`docker-compose.sh` Will spin up a production version of the stack.
+
+After the stack is running navigate to the [admin page localhost:9090/settings/site](http://localhost:9090/settings/site). On the Backups and Exports section import the backup labeled dev_sample_data_{DATE}.zip. This will give you some recipe data to work with.
+
+Once you're up and running you should be able to make changes and see them reflected on the frontend/backend. If you're not sure what to work on you can check:
+
+- The Todo's below.
+- The [Development Road Map](https://hay-kot.github.io/mealie/2.0%20-%20roadmap/)
+- The [Current Open Issues](https://github.com/hay-kot/mealie/issues)
+
+Don't forget to [join the Discord](https://discord.gg/R6QDyJgbD2)!
+
+# Todo's
+
+Frontend
+- [ ] .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
+- [ ] Enhanced Search Functionality
+- [ ] Organize Home Page my Category, ideally user selectable.
+
+Backend
+- [x] Add Debug folder for writing the last pulled recipe data to.
+- [x] Recipe Editor Data Validation Server Side
+- [ ] Normalize Recipe data on scrape
+- [ ] Support how to Sections and how to steps
+- [ ] Export Markdown on Auto backups
+- [ ] Recipe request by category/tags
+- [ ] Add Additional Migrations, See mealie/services/migrations/chowdown.py for examples of how to do this.
+ - [ ] Open Eats [See Issue #4](https://github.com/hay-kot/mealie/issues/4)
+ - [ ] NextCloud [See Issue #14](https://github.com/hay-kot/mealie/issues/14)
+
+# Draft Changelog
+## v0.0.2
+
+General
+- 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
+
+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
diff --git a/dev/build.py b/dev/scratch/build.py
similarity index 100%
rename from dev/build.py
rename to dev/scratch/build.py
diff --git a/dev/scratch/scratch.json b/dev/scratch/scratch.json
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/dev/write_settings.py b/dev/scratch/write_settings.py
similarity index 100%
rename from dev/write_settings.py
rename to dev/scratch/write_settings.py
diff --git a/docs/docs/1.0 - getting-started.md b/docs/docs/1.0 - getting-started.md
index 65254aa34165..0c43462391fd 100644
--- a/docs/docs/1.0 - getting-started.md
+++ b/docs/docs/1.0 - getting-started.md
@@ -1,6 +1,5 @@
# Getting Started
-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.
-
+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.
[Get Docker](https://docs.docker.com/get-docker/)
@@ -9,13 +8,15 @@ To deploy docker on your local network it is highly recommended to use docker to
## Env Variables
-| Variables | default | description |
-| ----------- | ------- | ------------------------------------------------------------------------------------------------------------- |
-| db_username | root | The Mongodb username you specified in your mongo container |
-| 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 |
-| TZ | | You should set your time zone accordingly so the date/time features work correctly |
+| Variables | default | description |
+| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| mealie_db_name | mealie | The name of the database to be created in Mongodb |
+| mealie_port | 9000 | The port exposed by mealie. **do not change this if you're running in docker** If you'd like to use another port, map 9000 to another port of the host. |
+| db_username | root | The Mongodb username you specified in your mongo container |
+| 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 |
+| TZ | | You should set your time zone accordingly so the date/time features work correctly |
## Docker Compose
diff --git a/docs/docs/1.3 - admin-panel.md b/docs/docs/1.3 - admin-panel.md
index 5eb731a40ea4..fde088e512a9 100644
--- a/docs/docs/1.3 - admin-panel.md
+++ b/docs/docs/1.3 - admin-panel.md
@@ -13,13 +13,85 @@ Color themes can be created and set from the UI in the settings page. You can se
## 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.
To create an export simple add the tag and the markdown template and click Backup Recipes and your backup will be created on the server. The backup is a standard zipfile containing all the images, json files, and rendered markdown files for each recipe. Markdown files are rendered from jinja2 templates. Adding your own markdown file into the templates folder will automatically show up as an option to select when creating a backup. To view the availible variables, open a recipe in the json editor.
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
+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
+```jinja2
+
+
+# {{ recipe.name }}
+{{ recipe.description }}
+
+## Ingredients
+{% for ingredient in recipe.recipeIngredient %}
+- [ ] {{ ingredient }}
+{% endfor %}
+
+## Instructions
+{% for step in recipe.recipeInstructions %}
+- [ ] {{ step.text }}
+{% endfor %}
+
+{% for note in recipe.notes %}
+**{{ note.title }}:** {{ note.text }}
+{% endfor %}
+
+---
+
+Tags: {{ recipe.tags }}
+Categories: {{ recipe.categories }}
+Original URL: {{ recipe.orgURL }}
+```
+
+#### Output
+```markdown
+
+
+# Five Spice Popcorn Chicken
+It’s easy to rely on take-out for some of our favorite Chinese dishes. However, with the right pantry staples, dishes like this Five Spice Popcorn Chicken can become part of your go-to arsenal of recipes. This crispy chicken is coated in a creamy, tangy sauce, made zesty with The Spice Hunter Chinese Five Spice, a blend of star anise, cloves, cinnamon, fennel, and black pepper.
+
+## Ingredients
+- [ ] 1 tablespoon soy sauce
+- [ ] 1 tablespoon sugar
+- [ ] 1 teaspoon The Spice Hunter® Chinese Five Spice Blend, plus more for serving
+- [ ] 1 clove garlic, finely grated
+- [ ] 1 1/2 pounds boneless skinless chicken thighs, cut into roughly 1-inch chunks
+- [ ] ⅓ cup cornstarch
+- [ ] 1 large egg, beaten
+- [ ] ¾ cup all-purpose flour
+- [ ] Canola or vegetable oil, for frying
+- [ ] Flaky sea salt
+- [ ] Scallion, thinly sliced, for serving
+- [ ] Sriracha mayonnaise, for serving, optional
+
+
+## Instructions
+- [ ] In a medium bowl, whisk the soy sauce with the sugar, Chinese Five Spice, and garlic. Add the chicken and toss to coat. Let marinate 15 minutes.
+- [ ] Drain any excess marinade off of the chicken and toss the chicken with the cornstarch to coat. Once fully coated, add the beaten egg and toss to coat.
+- [ ] In a large heavy bottomed pot, heat 1-inch of oil to 350.
+- [ ] Place the flour in a large ziploc bag. Working in batches, transfer a few chicken pieces into the bag with the flour and toss to coat, then remove, leaving excess flour in the bag.
+- [ ] Carefully place the breaded chicken in the hot oil and fry, turning occasionally, until golden and cooked through about 3 to 4 minutes.
+- [ ] Using a slotted spoon or spider, transfer the cooked chicken to a paper towel lined plate. Season with salt and additional Chinese Five Spice seasoning. Repeat the flouring and frying with remaining chicken.
+- [ ] Serve with scallions, more Chinese Five Spice Blend, and optional sriracha mayonnaise.
+
+---
+
+Tags: []
+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.
diff --git a/docs/docs/1.9 - release-notes.md b/docs/docs/1.9 - release-notes.md
index 7264f9d8185d..9e19854fb464 100644
--- a/docs/docs/1.9 - release-notes.md
+++ b/docs/docs/1.9 - release-notes.md
@@ -1,5 +1,16 @@
# 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.
diff --git a/docs/docs/2.1 - Contributions.md b/docs/docs/2.1 - Contributions.md
new file mode 100644
index 000000000000..98abce87cf02
--- /dev/null
+++ b/docs/docs/2.1 - Contributions.md
@@ -0,0 +1,49 @@
+# 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
+
+[Remember to join the Discord and stay in touch with other developers working on the project](https://discord.gg/R6QDyJgbD2)!
+
+## 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:
+
+1. Fork the repo and create your branch from `master`.
+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.
+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.
+
+## 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.
+
+## Report bugs using Github's [issues](https://github.com/hay-kot/mealie/issues)
+We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/hay-kot/mealie/issues/new); it's that easy!
+
+## Write bug reports with detail, background, and sample code
+**Great Bug Reports** tend to have:
+
+- A quick summary and/or background
+- Steps to reproduce
+ - Be specific!
+ - Give sample code if you can. [This stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce what I was seeing
+- What you expected would happen
+- What actually happens
+- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
+
+People *love* thorough bug reports. I'm not even kidding.
+
+
+## License
+By contributing, you agree that your contributions will be licensed under its MIT License.
+
+## References
+This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)
diff --git a/docs/docs/img/favicon.png b/docs/docs/img/favicon.png
new file mode 100644
index 000000000000..0ca99249ead5
Binary files /dev/null and b/docs/docs/img/favicon.png differ
diff --git a/docs/docs/index.md b/docs/docs/index.md
index f8aef0f97305..d43b2151180f 100644
--- a/docs/docs/index.md
+++ b/docs/docs/index.md
@@ -18,6 +18,8 @@
Mealie also provides an API for interactions from 3rd party applications. **Why does my recipe manager need an API?** An API allows integration into applications like [Home Assistant](https://www.home-assistant.io/) 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. 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.
+[Remember to join the Discord](https://discord.gg/R6QDyJgbD2)!
+
!!! note
In some of the demo gifs the styling may be different than the finale application. demos were done during development prior to finale styling.
@@ -93,17 +95,4 @@ Project Link: [https://github.com/hay-kot/mealie](https://github.com/hay-kot/mea
-
-[contributors-shield]: https://img.shields.io/github/contributors/hay-kot/mealie.svg?style=flat-square
-[contributors-url]: https://github.com/hay-kot/mealie/graphs/contributors
-[forks-shield]: https://img.shields.io/github/forks/hay-kot/mealie.svg?style=flat-square
-[forks-url]: https://github.com/hay-kot/mealie/network/members
-[stars-shield]: https://img.shields.io/github/stars/hay-kot/mealie.svg?style=flat-square
-[stars-url]: https://github.com/hay-kot/mealie/stargazers
-[issues-shield]: https://img.shields.io/github/issues/hay-kot/mealie.svg?style=flat-square
-[issues-url]: https://github.com/hay-kot/mealie/issues
-[license-shield]: https://img.shields.io/github/license/hay-kot/mealie.svg?style=flat-square
-[license-url]: https://github.com/hay-kot/mealie/blob/master/LICENSE.txt
-[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
-[linkedin-url]: https://linkedin.com/in/hay-kot
[product-screenshot]: img/home_screenshot.png
diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml
index e0c22063985d..99008e637950 100644
--- a/docs/mkdocs.yml
+++ b/docs/mkdocs.yml
@@ -1,5 +1,6 @@
-site_name: Mealie
+site_name: Mealie Docs
theme:
+ favicon: img/favicon.png
name: material
icon:
logo: material/silverware-variant
diff --git a/frontend/public/favicon.ico b/frontend/public/favicon.ico
index df36fcfb7258..0ca99249ead5 100644
Binary files a/frontend/public/favicon.ico and b/frontend/public/favicon.ico differ
diff --git a/frontend/public/index.html b/frontend/public/index.html
index bc5146586471..59b9ff16619e 100644
--- a/frontend/public/index.html
+++ b/frontend/public/index.html
@@ -5,7 +5,7 @@
- <%= htmlWebpackPlugin.options.title %>
+ Mealie
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index c87107faa0df..a5c69bd11082 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -1,13 +1,13 @@
-
-
+
+
mdi-silverware-variant
-
-
- Mealie
+
+
+ Mealie
diff --git a/frontend/src/api/api-utils.js b/frontend/src/api/api-utils.js
index 0222b1d7df0d..d1fcc1dee90c 100644
--- a/frontend/src/api/api-utils.js
+++ b/frontend/src/api/api-utils.js
@@ -19,9 +19,8 @@ const apiReq = {
post: async function(url, data) {
let response = await axios.post(url, data).catch(function(error) {
if (error.response) {
- console.log("Error");
processResponse(error.response);
- return;
+ return error.response;
}
});
processResponse(response);
@@ -32,7 +31,7 @@ const apiReq = {
let response = await axios.get(url, data).catch(function(error) {
if (error.response) {
processResponse(error.response);
- return;
+ return response;
} else return;
});
// processResponse(response);
@@ -43,7 +42,7 @@ const apiReq = {
let response = await axios.delete(url, data).catch(function(error) {
if (error.response) {
processResponse(error.response);
- return;
+ return response;
}
});
processResponse(response);
diff --git a/frontend/src/api/recipe.js b/frontend/src/api/recipe.js
index 049e2e5d8035..6c3fcf7845a9 100644
--- a/frontend/src/api/recipe.js
+++ b/frontend/src/api/recipe.js
@@ -23,10 +23,9 @@ export default {
let response = await apiReq.post(recipeURLs.createByURL, {
url: recipeURL,
});
- console.log(response);
- let recipeSlug = response.data;
+
store.dispatch("requestRecentRecipes");
- router.push(`/recipe/${recipeSlug}`);
+ return response;
},
async create(recipeData) {
diff --git a/frontend/src/assets/logo.png b/frontend/src/assets/logo.png
deleted file mode 100644
index f3d2503fc2a4..000000000000
Binary files a/frontend/src/assets/logo.png and /dev/null differ
diff --git a/frontend/src/assets/logo.svg b/frontend/src/assets/logo.svg
deleted file mode 100644
index 145b6d13089c..000000000000
--- a/frontend/src/assets/logo.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/frontend/src/components/AddRecipe.vue b/frontend/src/components/AddRecipe.vue
index 301ccf9ca9fb..da53c0e0adeb 100644
--- a/frontend/src/components/AddRecipe.vue
+++ b/frontend/src/components/AddRecipe.vue
@@ -8,6 +8,11 @@
+
+
+ Looks like there was an error parsing the URL. Check the log and
+ debug/last_recipe.json to see what went wrong.
+
@@ -37,6 +42,7 @@ import api from "../api";
export default {
data() {
return {
+ error: false,
fab: false,
addRecipe: false,
recipeURL: "",
@@ -47,9 +53,16 @@ export default {
methods: {
async createRecipe() {
this.processing = true;
- await api.recipes.createByURL(this.recipeURL);
+ let response = await api.recipes.createByURL(this.recipeURL);
+ if (response.status !== 201) {
+ this.error = true;
+ this.processing = false;
+ return;
+ }
+
this.addRecipe = false;
this.processing = false;
+ this.$router.push(`/recipe/${response.data}`);
},
navCreate() {
diff --git a/frontend/src/components/Admin/Admin.vue b/frontend/src/components/Admin/Admin.vue
index 14deb022d49a..ed6948c14f19 100644
--- a/frontend/src/components/Admin/Admin.vue
+++ b/frontend/src/components/Admin/Admin.vue
@@ -1,9 +1,28 @@
+
+ A New Version of Mealie is Avaiable,
+
+ Visit the Repo
+
+
+
Backups are exported in standard JSON format along with all the images
diff --git a/frontend/src/components/NewRecipe.vue b/frontend/src/components/NewRecipe.vue
index 370d6a10fed5..76fed90cac6d 100644
--- a/frontend/src/components/NewRecipe.vue
+++ b/frontend/src/components/NewRecipe.vue
@@ -18,12 +18,16 @@
@save="createRecipe"
/>
-
+