Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61f2a87cf6 | ||
|
|
fa6743110f | ||
|
|
b565cf24df | ||
|
|
903a9d8861 | ||
|
|
e2b9f02f55 | ||
|
|
82da1e51db | ||
|
|
0addb3fe6b | ||
|
|
72e614b6e5 | ||
|
|
8abcf0ca4d |
@@ -1,3 +1,27 @@
|
||||
.git
|
||||
.github
|
||||
.dockerignore
|
||||
.gitignore
|
||||
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
htmlcov/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.pytest_cache/
|
||||
.venv
|
||||
venv
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
._*
|
||||
|
||||
*/node_modules
|
||||
*/dist
|
||||
*/data/db
|
||||
|
||||
2
.flake8
@@ -1,6 +1,6 @@
|
||||
[flake8]
|
||||
ignore = [
|
||||
E501 # Line Length - See Black Config in pyproject.toml
|
||||
E722 # Bare Exception | Temporary
|
||||
E402 # Import Not at Top of File
|
||||
]
|
||||
exclude = _all_models.py
|
||||
|
||||
30
.github/workflows/dockerbuild.dev-docs.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Docker Build Dev Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
name: Push Docker image to GitHub Packages
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Log in to GitHub Docker Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build container image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./docs
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}/dev-docs:latest
|
||||
4
.github/workflows/dockerbuild.dev.yml
vendored
@@ -44,6 +44,6 @@ jobs:
|
||||
#
|
||||
- name: build the image
|
||||
run: |
|
||||
docker build --push \
|
||||
docker build --push --no-cache \
|
||||
--tag hkotel/mealie:dev \
|
||||
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
||||
--platform linux/amd64,linux/arm64 .
|
||||
|
||||
2
.github/workflows/dockerbuild.prod.yml
vendored
@@ -45,4 +45,4 @@ jobs:
|
||||
run: |
|
||||
docker build --push \
|
||||
--tag hkotel/mealie:latest \
|
||||
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
||||
--platform linux/amd64,linux/arm64 .
|
||||
|
||||
2
.github/workflows/dockerbuild.release.yml
vendored
@@ -53,4 +53,4 @@ jobs:
|
||||
run: |
|
||||
docker build --push \
|
||||
--tag hkotel/mealie:${{ steps.mealie_version.outputs.tag }} \
|
||||
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
||||
--platform linux/amd64,linux/arm64 .
|
||||
|
||||
@@ -8,12 +8,23 @@ on:
|
||||
branches:
|
||||
- master
|
||||
- dev
|
||||
types: [synchronize, opened, reopened, ready_for_review]
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
env:
|
||||
PRODUCTION: false
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_USER: mealie
|
||||
POSTGRES_PASSWORD: mealie
|
||||
POSTGRES_DB: mealie
|
||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
ports:
|
||||
- 5432:5432
|
||||
steps:
|
||||
#----------------------------------------------
|
||||
# check-out repo and set-up python
|
||||
@@ -32,24 +43,35 @@ jobs:
|
||||
with:
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
# #----------------------------------------------
|
||||
# # load cached venv if cache exists #! This Breaks Stuff
|
||||
# #----------------------------------------------
|
||||
# - name: Load cached venv
|
||||
# id: cached-poetry-dependencies
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: .venv
|
||||
# key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
|
||||
#----------------------------------------------
|
||||
# load cached venv if cache exists
|
||||
#----------------------------------------------
|
||||
- name: Load cached venv
|
||||
id: cached-poetry-dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .venv
|
||||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
|
||||
#----------------------------------------------
|
||||
# install dependencies if cache does not exist
|
||||
#----------------------------------------------
|
||||
- name: Install dependencies
|
||||
run: poetry install
|
||||
run: |
|
||||
poetry install
|
||||
poetry add "psycopg2-binary==2.8.6"
|
||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||
#----------------------------------------------
|
||||
# run test suite
|
||||
#----------------------------------------------
|
||||
- name: Run tests
|
||||
- name: Run Test Suite
|
||||
run: |
|
||||
poetry run pytest
|
||||
make test-all
|
||||
#----------------------------------------------
|
||||
# run test suite
|
||||
#----------------------------------------------
|
||||
- name: Run Test Suite Postgres
|
||||
env:
|
||||
DB_ENGINE: postgres
|
||||
POSTGRES_SERVER: localhost
|
||||
run: |
|
||||
make test-all
|
||||
63
.gitignore
vendored
@@ -3,13 +3,12 @@
|
||||
*__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# frontend/.env.development
|
||||
docs/site/
|
||||
mealie/temp/*
|
||||
mealie/temp/api.html
|
||||
.temp/
|
||||
*temp/*
|
||||
.secret
|
||||
|
||||
frontend/dist/
|
||||
|
||||
dev/data/backups/*
|
||||
dev/data/debug/*
|
||||
@@ -17,14 +16,6 @@ dev/data/img/*
|
||||
dev/data/migration/*
|
||||
dev/data/users/*
|
||||
|
||||
#Exception to keep folders
|
||||
!mealie/dist/.gitkeep
|
||||
!dev/data/backups/.gitkeep
|
||||
!dev/data/backups/dev_sample_data*
|
||||
!dev/data/debug/.gitkeep
|
||||
!dev/data/migration/.gitkeep
|
||||
!dev/data/img/.gitkeep
|
||||
|
||||
.DS_Store
|
||||
node_modules
|
||||
|
||||
@@ -64,6 +55,7 @@ eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
!frontend/src/components/Recipe/Parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
@@ -148,48 +140,13 @@ ENV/
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
|
||||
# IDE settings
|
||||
# .vscode/
|
||||
|
||||
# Node Modules
|
||||
node_modules/
|
||||
mealie/data/debug/last_recipe.json
|
||||
*.db
|
||||
*.sqlite
|
||||
dev/data/db/test.db
|
||||
scratch.py
|
||||
frontend/dist/favicon.ico
|
||||
frontend/dist/index.html
|
||||
frontend/dist/css/app.29fe0155.css
|
||||
frontend/dist/css/chunk-vendors.db944396.css
|
||||
frontend/dist/fonts/materialdesignicons-webfont.7a44ea19.woff2
|
||||
frontend/dist/fonts/materialdesignicons-webfont.64d4cf64.eot
|
||||
frontend/dist/fonts/materialdesignicons-webfont.147e3378.woff
|
||||
frontend/dist/fonts/materialdesignicons-webfont.174c02fc.ttf
|
||||
frontend/dist/fonts/roboto-latin-100.5cb7edfc.woff
|
||||
frontend/dist/fonts/roboto-latin-100.7370c367.woff2
|
||||
frontend/dist/fonts/roboto-latin-100italic.f8b1df51.woff2
|
||||
frontend/dist/fonts/roboto-latin-100italic.f9e8e590.woff
|
||||
frontend/dist/fonts/roboto-latin-300.b00849e0.woff
|
||||
frontend/dist/fonts/roboto-latin-300.ef7c6637.woff2
|
||||
frontend/dist/fonts/roboto-latin-300italic.4df32891.woff
|
||||
frontend/dist/fonts/roboto-latin-300italic.14286f3b.woff2
|
||||
frontend/dist/fonts/roboto-latin-400.60fa3c06.woff
|
||||
frontend/dist/fonts/roboto-latin-400.479970ff.woff2
|
||||
frontend/dist/fonts/roboto-latin-400italic.51521a2a.woff2
|
||||
frontend/dist/fonts/roboto-latin-400italic.fe65b833.woff
|
||||
frontend/dist/fonts/roboto-latin-500.020c97dc.woff2
|
||||
frontend/dist/fonts/roboto-latin-500.87284894.woff
|
||||
frontend/dist/fonts/roboto-latin-500italic.288ad9c6.woff
|
||||
frontend/dist/fonts/roboto-latin-500italic.db4a2a23.woff2
|
||||
frontend/dist/fonts/roboto-latin-700.2735a3a6.woff2
|
||||
frontend/dist/fonts/roboto-latin-700.adcde98f.woff
|
||||
frontend/dist/fonts/roboto-latin-700italic.81f57861.woff
|
||||
frontend/dist/fonts/roboto-latin-700italic.da0e7178.woff2
|
||||
frontend/dist/fonts/roboto-latin-900.9b3766ef.woff2
|
||||
frontend/dist/fonts/roboto-latin-900.bb1e4dc6.woff
|
||||
frontend/dist/fonts/roboto-latin-900italic.28f91510.woff
|
||||
frontend/dist/fonts/roboto-latin-900italic.ebf6d164.woff2
|
||||
frontend/dist/js/app.36f2760c.js
|
||||
frontend/dist/js/app.36f2760c.js.map
|
||||
frontend/dist/js/chunk-vendors.c93761e4.js
|
||||
frontend/dist/js/chunk-vendors.c93761e4.js.map
|
||||
dev/data/backups/dev_sample_data*.zip
|
||||
!dev/data/backups/test*.zip
|
||||
dev/data/recipes/*
|
||||
dev/scripts/output/app_routes.py
|
||||
dev/scripts/output/javascriptAPI/*
|
||||
11
.vscode/settings.json
vendored
@@ -1,18 +1,19 @@
|
||||
{
|
||||
"python.formatting.provider": "black",
|
||||
"python.pythonPath": ".venv/bin/python3.9",
|
||||
"python.linting.pylintEnabled": true,
|
||||
"python.linting.pylintEnabled": false,
|
||||
"python.linting.enabled": true,
|
||||
"python.testing.unittestEnabled": false,
|
||||
"python.testing.nosetestsEnabled": false,
|
||||
"python.testing.pytestEnabled": true,
|
||||
"python.testing.autoTestDiscoverOnSaveEnabled": false,
|
||||
"python.testing.pytestArgs": ["tests"],
|
||||
"cSpell.enableFiletypes": ["!javascript", "!python"],
|
||||
"cSpell.enableFiletypes": ["!javascript", "!python", "!yaml"],
|
||||
"i18n-ally.localesPaths": "frontend/src/locales/messages",
|
||||
"i18n-ally.sourceLanguage": "en",
|
||||
"i18n-ally.sourceLanguage": "en-US",
|
||||
"i18n-ally.enabledFrameworks": ["vue"],
|
||||
"i18n-ally.keystyle": "nested",
|
||||
"cSpell.words": ["performant"],
|
||||
"search.mode": "reuseEditor"
|
||||
"cSpell.words": ["compression", "hkotel", "performant", "postgres", "webp"],
|
||||
"search.mode": "reuseEditor",
|
||||
"python.linting.flake8Enabled": true
|
||||
}
|
||||
|
||||
40
Caddyfile
@@ -1,22 +1,34 @@
|
||||
{
|
||||
auto_https off
|
||||
admin off
|
||||
admin off
|
||||
}
|
||||
|
||||
:80 {
|
||||
@proxied path /api/* /docs /openapi.json
|
||||
@proxied path /api/* /docs /openapi.json
|
||||
|
||||
root * /app/dist
|
||||
encode gzip
|
||||
uri strip_suffix /
|
||||
|
||||
handle @proxied {
|
||||
reverse_proxy http://127.0.0.1:9000
|
||||
}
|
||||
@static {
|
||||
file
|
||||
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
|
||||
}
|
||||
|
||||
handle {
|
||||
try_files {path}.html {path} /
|
||||
file_server
|
||||
}
|
||||
encode gzip zstd
|
||||
|
||||
}
|
||||
# Handles Recipe Images / Assets
|
||||
handle_path /api/media/recipes/* {
|
||||
header @static Cache-Control max-age=31536000
|
||||
root * /app/data/recipes/
|
||||
file_server
|
||||
}
|
||||
|
||||
handle @proxied {
|
||||
uri strip_suffix /
|
||||
reverse_proxy http://127.0.0.1:9000
|
||||
}
|
||||
|
||||
handle {
|
||||
header @static Cache-Control max-age=31536000
|
||||
root * /app/dist
|
||||
try_files {path}.html {path} /
|
||||
file_server
|
||||
}
|
||||
}
|
||||
|
||||
160
Dockerfile
@@ -1,54 +1,140 @@
|
||||
FROM node:lts-alpine as build-stage
|
||||
###############################################
|
||||
# Frontend Builder Image
|
||||
###############################################
|
||||
FROM node:lts-alpine as frontend-build
|
||||
WORKDIR /app
|
||||
COPY ./frontend/package*.json ./
|
||||
RUN npm install
|
||||
COPY ./frontend/ .
|
||||
RUN npm run build
|
||||
|
||||
FROM python:3.9-alpine
|
||||
###############################################
|
||||
# Base Image
|
||||
###############################################
|
||||
FROM python:3.9-slim as python-base
|
||||
|
||||
ENV MEALIE_HOME="/app"
|
||||
|
||||
RUN apk add --no-cache libxml2-dev \
|
||||
libxslt-dev \
|
||||
libxml2 caddy \
|
||||
libffi-dev \
|
||||
python3 \
|
||||
python3-dev \
|
||||
jpeg-dev \
|
||||
lcms2-dev \
|
||||
openjpeg-dev \
|
||||
zlib-dev
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=off \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=on \
|
||||
PIP_DEFAULT_TIMEOUT=100 \
|
||||
POETRY_HOME="/opt/poetry" \
|
||||
POETRY_VIRTUALENVS_IN_PROJECT=true \
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
PYSETUP_PATH="/opt/pysetup" \
|
||||
VENV_PATH="/opt/pysetup/.venv"
|
||||
|
||||
# prepend poetry and venv to path
|
||||
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
|
||||
|
||||
ENV PRODUCTION true
|
||||
EXPOSE 80
|
||||
WORKDIR /app/
|
||||
# create user account
|
||||
RUN useradd -u 911 -U -d $MEALIE_HOME -s /bin/bash abc \
|
||||
&& usermod -G users abc \
|
||||
&& mkdir $MEALIE_HOME
|
||||
|
||||
COPY ./pyproject.toml /app/
|
||||
|
||||
RUN apk add --update --no-cache --virtual .build-deps \
|
||||
###############################################
|
||||
# Builder Image
|
||||
###############################################
|
||||
FROM python-base as builder-base
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
curl \
|
||||
g++ \
|
||||
python3-dev \
|
||||
musl-dev \
|
||||
gcc \
|
||||
build-base && \
|
||||
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
|
||||
cd /usr/local/bin && \
|
||||
ln -s /opt/poetry/bin/poetry && \
|
||||
poetry config virtualenvs.create false && \
|
||||
cd /app/ && poetry install --no-root --no-dev && \
|
||||
apk --purge del .build-deps
|
||||
build-essential \
|
||||
libpq-dev \
|
||||
libwebp-dev \
|
||||
gnupg gnupg2 gnupg1 \
|
||||
debian-keyring \
|
||||
debian-archive-keyring \
|
||||
apt-transport-https \
|
||||
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | apt-key add - \
|
||||
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
caddy \
|
||||
&& pip install -U --no-cache-dir pip
|
||||
|
||||
COPY ./mealie /app/mealie
|
||||
RUN poetry install --no-dev
|
||||
# install poetry - respects $POETRY_VERSION & $POETRY_HOME
|
||||
ENV POETRY_VERSION=1.1.6
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
|
||||
|
||||
COPY ./Caddyfile /app
|
||||
COPY ./dev/data/templates /app/data/templates
|
||||
COPY --from=build-stage /app/dist /app/dist
|
||||
# copy project requirement files here to ensure they will be cached.
|
||||
WORKDIR $PYSETUP_PATH
|
||||
COPY ./poetry.lock ./pyproject.toml ./
|
||||
|
||||
VOLUME [ "/app/data/" ]
|
||||
# install runtime deps - uses $POETRY_VIRTUALENVS_IN_PROJECT internally
|
||||
RUN poetry install -E pgsql --no-dev
|
||||
|
||||
RUN chmod +x /app/mealie/run.sh
|
||||
CMD /app/mealie/run.sh
|
||||
###############################################
|
||||
# Development Image
|
||||
###############################################
|
||||
FROM python-base as development
|
||||
ENV PRODUCTION=false
|
||||
|
||||
# copying poetry and venv into image
|
||||
COPY --from=builder-base $POETRY_HOME $POETRY_HOME
|
||||
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH
|
||||
|
||||
# copy backend
|
||||
COPY ./mealie $MEALIE_HOME/mealie
|
||||
COPY ./poetry.lock ./pyproject.toml $MEALIE_HOME/
|
||||
|
||||
#! Future
|
||||
# COPY ./alembic ./alembic.ini $MEALIE_HOME/
|
||||
|
||||
# venv already has runtime deps installed we get a quicker install
|
||||
WORKDIR $MEALIE_HOME
|
||||
RUN . $VENV_PATH/bin/activate && poetry install
|
||||
WORKDIR /
|
||||
|
||||
RUN chmod +x $MEALIE_HOME/mealie/run.sh
|
||||
ENTRYPOINT $MEALIE_HOME/mealie/run.sh "reload"
|
||||
|
||||
###############################################
|
||||
# Production Image
|
||||
###############################################
|
||||
FROM python-base as production
|
||||
ENV PRODUCTION=true
|
||||
|
||||
# curl for used by healthcheck
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
curl \
|
||||
&& apt-get autoremove \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# copying poetry and venv into image
|
||||
COPY --from=builder-base $POETRY_HOME $POETRY_HOME
|
||||
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH
|
||||
|
||||
# copying caddy into image
|
||||
COPY --from=builder-base /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
# copy backend
|
||||
COPY ./mealie $MEALIE_HOME/mealie
|
||||
COPY ./poetry.lock ./pyproject.toml $MEALIE_HOME/
|
||||
COPY ./gunicorn_conf.py $MEALIE_HOME
|
||||
|
||||
#! Future
|
||||
# COPY ./alembic ./alembic.ini $MEALIE_HOME/
|
||||
|
||||
# venv already has runtime deps installed we get a quicker install
|
||||
WORKDIR $MEALIE_HOME
|
||||
RUN . $VENV_PATH/bin/activate && poetry install -E pgsql --no-dev
|
||||
WORKDIR /
|
||||
|
||||
# copy frontend
|
||||
COPY --from=frontend-build /app/dist $MEALIE_HOME/dist
|
||||
COPY ./dev/data/templates $MEALIE_HOME/data/templates
|
||||
COPY ./Caddyfile $MEALIE_HOME
|
||||
|
||||
VOLUME [ "$MEALIE_HOME/data/" ]
|
||||
ENV APP_PORT=80
|
||||
|
||||
EXPOSE ${APP_PORT}
|
||||
|
||||
HEALTHCHECK CMD curl -f http://localhost:${APP_PORT} || exit 1
|
||||
|
||||
RUN chmod +x $MEALIE_HOME/mealie/run.sh
|
||||
ENTRYPOINT $MEALIE_HOME/mealie/run.sh
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
FROM python:3
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
ENV PRODUCTION false
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y python-pip python-dev
|
||||
|
||||
# Install Poetry
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
|
||||
cd /usr/local/bin && \
|
||||
ln -s /opt/poetry/bin/poetry && \
|
||||
poetry config virtualenvs.create false
|
||||
|
||||
# Copy poetry.lock* in case it doesn't exist in the repo
|
||||
COPY ./pyproject.toml /app/
|
||||
|
||||
COPY ./mealie /app/mealie
|
||||
|
||||
RUN poetry install
|
||||
|
||||
RUN chmod +x /app/mealie/run.sh
|
||||
CMD ["/app/mealie/run.sh", "reload"]
|
||||
17
README.md
@@ -4,6 +4,11 @@
|
||||
[![Issues][issues-shield]][issues-url]
|
||||
[![MIT License][license-shield]][license-url]
|
||||
[![Docker Pulls][docker-pull]][docker-pull]
|
||||
[](https://www.codefactor.io/repository/github/hay-kot/mealie)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/dockerbuild.release.yml)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/test-all.yml)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/dockerbuild.dev.yml)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/test-all.yml)
|
||||
|
||||
<!-- PROJECT LOGO -->
|
||||
<br />
|
||||
@@ -27,7 +32,7 @@
|
||||
·
|
||||
<a href="https://github.com/hay-kot/mealie/issues">Report Bug</a>
|
||||
·
|
||||
<a href="https://hay-kot.github.io/mealie/api/docs/">API</a>
|
||||
<a href="https://hay-kot.github.io/mealie/api/redoc/">API</a>
|
||||
·
|
||||
<a href="https://github.com/hay-kot/mealie/issues">
|
||||
Request Feature
|
||||
@@ -52,14 +57,16 @@ Mealie is a self hosted recipe manager and meal planner with a RestAPI backend a
|
||||
|
||||
## Key Features
|
||||
- 🔍 Fuzzy search
|
||||
- 🏷️ Tag recipes with categories or tags to flexible sorting
|
||||
- 🏷️ Tag recipes with categories or tags for flexible sorting
|
||||
- 🕸 Import recipes from around the web by URL
|
||||
- 💪 Powerful bulk Category/Tag assignment
|
||||
- 📱 Beautiful Mobile Views
|
||||
- 📆 Create Meal Plans
|
||||
- 🛒 Generate shopping lists
|
||||
- 🐳 Easy setup with Docker
|
||||
- 🎨 Customize your interface with color themes layouts
|
||||
- 💾 Export all your data in any format with Jinja2 Templates, with easy data restoration from the user interface.
|
||||
- 🎨 Customize your interface with color themes
|
||||
- 💾 Export all your data in any format with Jinja2 Templates
|
||||
- 🔒 Keep your data safe with automated backup and easy restore options
|
||||
- 🌍 localized in many languages
|
||||
- ➕ Plus tons more!
|
||||
- Flexible API
|
||||
@@ -89,7 +96,7 @@ As to why we need a database?
|
||||
<!-- CONTRIBUTING -->
|
||||
## 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**. Especially test. Literally any tests. See the [Contributors Guide](https://hay-kot.github.io/mealie/contributors/developers-guide/code-contributions/) for help getting started.
|
||||
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/non-coders/) 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.
|
||||
|
||||
|
||||
@@ -1,48 +1,41 @@
|
||||
import json
|
||||
import re
|
||||
from enum import Enum
|
||||
from itertools import groupby
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
import slugify
|
||||
from fastapi import FastAPI
|
||||
from humps import camelize
|
||||
from jinja2 import Template
|
||||
from mealie.app import app
|
||||
from pydantic import BaseModel
|
||||
|
||||
CWD = Path(__file__).parent
|
||||
OUT_FILE = CWD.joinpath("output", "app_routes.py")
|
||||
OUT_DIR = CWD / "output"
|
||||
OUT_FILE = OUT_DIR / "app_routes.py"
|
||||
|
||||
code_template = """
|
||||
class AppRoutes:
|
||||
def __init__(self) -> None:
|
||||
self.prefix = '{{paths.prefix}}'
|
||||
{% for path in paths.static_paths %}
|
||||
self.{{ path.router_slug }} = "{{path.prefix}}{{ path.route }}"{% endfor %}
|
||||
{% for path in paths.function_paths %}
|
||||
def {{path.router_slug}}(self, {{path.var|join(", ")}}):
|
||||
return f"{self.prefix}{{ path.route }}"
|
||||
{% endfor %}
|
||||
"""
|
||||
JS_DIR = OUT_DIR / "javascriptAPI"
|
||||
JS_OUT_FILE = JS_DIR / "apiRoutes.js"
|
||||
TEMPLATES_DIR = CWD / "templates"
|
||||
|
||||
PYTEST_TEMPLATE = TEMPLATES_DIR / "pytest_routes.j2"
|
||||
JS_REQUESTS = TEMPLATES_DIR / "js_requests.j2"
|
||||
JS_ROUTES = TEMPLATES_DIR / "js_routes.j2"
|
||||
JS_INDEX = TEMPLATES_DIR / "js_index.j2"
|
||||
|
||||
def get_variables(path):
|
||||
path = path.replace("/", " ")
|
||||
print(path)
|
||||
var = re.findall(r" \{.*\}", path)
|
||||
print(var)
|
||||
if var:
|
||||
return [v.replace("{", "").replace("}", "") for v in var]
|
||||
else:
|
||||
return None
|
||||
JS_DIR.mkdir(exist_ok=True, parents=True)
|
||||
|
||||
|
||||
class RouteObject:
|
||||
def __init__(self, route_string) -> None:
|
||||
self.prefix = "/" + route_string.split("/")[1]
|
||||
self.route = route_string.replace(self.prefix, "")
|
||||
self.route = "/" + route_string.split("/", 2)[2]
|
||||
self.js_route = self.route.replace("{", "${")
|
||||
self.parts = route_string.split("/")[1:]
|
||||
self.var = re.findall(r"\{(.*?)\}", route_string)
|
||||
self.is_function = "{" in self.route
|
||||
self.router_slug = slugify.slugify("_".join(self.parts[1:]), separator="_")
|
||||
self.router_camel = camelize(self.router_slug)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"""Route: {self.route}
|
||||
@@ -53,31 +46,96 @@ Slug: {self.router_slug}
|
||||
"""
|
||||
|
||||
|
||||
def get_paths(app):
|
||||
class RequestType(str, Enum):
|
||||
get = "get"
|
||||
put = "put"
|
||||
post = "post"
|
||||
patch = "patch"
|
||||
delete = "delete"
|
||||
|
||||
|
||||
class HTTPRequest(BaseModel):
|
||||
request_type: RequestType
|
||||
description: str = ""
|
||||
summary: str
|
||||
tags: list[str]
|
||||
|
||||
@property
|
||||
def summary_camel(self):
|
||||
return camelize(self.summary)
|
||||
|
||||
@property
|
||||
def js_docs(self):
|
||||
return self.description.replace("\n", " \n * ")
|
||||
|
||||
|
||||
class PathObject(BaseModel):
|
||||
route_object: RouteObject
|
||||
http_verbs: list[HTTPRequest]
|
||||
|
||||
class Config:
|
||||
arbitrary_types_allowed = True
|
||||
|
||||
|
||||
def get_path_objects(app: FastAPI):
|
||||
paths = []
|
||||
print(json.dumps(app.openapi()))
|
||||
|
||||
for key, value in app.openapi().items():
|
||||
if key == "paths":
|
||||
for key, value in value.items():
|
||||
paths.append(key)
|
||||
|
||||
paths.append(
|
||||
PathObject(
|
||||
route_object=RouteObject(key),
|
||||
http_verbs=[HTTPRequest(request_type=k, **v) for k, v in value.items()],
|
||||
)
|
||||
)
|
||||
|
||||
return paths
|
||||
|
||||
|
||||
def read_template(file: Path):
|
||||
with open(file, "r") as f:
|
||||
return f.read()
|
||||
|
||||
|
||||
def generate_template(app):
|
||||
paths = get_paths(app)
|
||||
new_paths = [RouteObject(path) for path in paths]
|
||||
paths = get_path_objects(app)
|
||||
|
||||
static_paths = [p for p in new_paths if not p.is_function]
|
||||
function_paths = [p for p in new_paths if p.is_function]
|
||||
static_paths = [x.route_object for x in paths if not x.route_object.is_function]
|
||||
function_paths = [x.route_object for x in paths if x.route_object.is_function]
|
||||
|
||||
template = Template(code_template)
|
||||
static_paths.sort(key=lambda x: x.router_slug)
|
||||
function_paths.sort(key=lambda x: x.router_slug)
|
||||
|
||||
template = Template(read_template(PYTEST_TEMPLATE))
|
||||
content = template.render(paths={"prefix": "/api", "static_paths": static_paths, "function_paths": function_paths})
|
||||
|
||||
with open(OUT_FILE, "w") as f:
|
||||
f.write(content)
|
||||
|
||||
template = Template(read_template(JS_ROUTES))
|
||||
content = template.render(
|
||||
paths={"prefix": "/api", "static_paths": static_paths, "function_paths": function_paths, "all_paths": paths}
|
||||
)
|
||||
with open(JS_OUT_FILE, "w") as f:
|
||||
f.write(content)
|
||||
|
||||
all_tags = []
|
||||
for k, g in groupby(paths, lambda x: x.http_verbs[0].tags[0]):
|
||||
template = Template(read_template(JS_REQUESTS))
|
||||
content = template.render(paths={"all_paths": list(g), "export_name": camelize(k)})
|
||||
|
||||
all_tags.append(camelize(k))
|
||||
|
||||
with open(JS_DIR.joinpath(camelize(k) + ".js"), "w") as f:
|
||||
f.write(content)
|
||||
|
||||
template = Template(read_template(JS_INDEX))
|
||||
content = template.render(files={"files": all_tags})
|
||||
|
||||
with open(JS_DIR.joinpath("index.js"), "w") as f:
|
||||
f.write(content)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate_template(app)
|
||||
|
||||
@@ -1,79 +1,66 @@
|
||||
# This Content is Auto Generated for Pytest
|
||||
|
||||
|
||||
class AppRoutes:
|
||||
def __init__(self) -> None:
|
||||
self.prefix = "/api"
|
||||
self.prefix = '/api'
|
||||
|
||||
self.users_sign_ups = "/api/users/sign-ups"
|
||||
self.about_events = "/api/about/events"
|
||||
self.about_events_notifications = "/api/about/events/notifications"
|
||||
self.about_events_notifications_test = "/api/about/events/notifications/test"
|
||||
self.about_recipes_defaults = "/api/about/recipes/defaults"
|
||||
self.auth_refresh = "/api/auth/refresh"
|
||||
self.auth_token = "/api/auth/token"
|
||||
self.auth_token_long = "/api/auth/token/long"
|
||||
self.auth_refresh = "/api/auth/refresh"
|
||||
self.users = "/api/users"
|
||||
self.users_self = "/api/users/self"
|
||||
self.backups_available = "/api/backups/available"
|
||||
self.backups_export_database = "/api/backups/export/database"
|
||||
self.backups_upload = "/api/backups/upload"
|
||||
self.categories = "/api/categories"
|
||||
self.categories_empty = "/api/categories/empty"
|
||||
self.debug = "/api/debug"
|
||||
self.debug_last_recipe_json = "/api/debug/last-recipe-json"
|
||||
self.debug_log = "/api/debug/log"
|
||||
self.debug_statistics = "/api/debug/statistics"
|
||||
self.debug_version = "/api/debug/version"
|
||||
self.groups = "/api/groups"
|
||||
self.groups_self = "/api/groups/self"
|
||||
self.recipes = "/api/recipes"
|
||||
self.recipes_category = "/api/recipes/category"
|
||||
self.recipes_tag = "/api/recipes/tag"
|
||||
self.categories = "/api/categories"
|
||||
self.recipes_tags = "/api/recipes/tags/"
|
||||
self.recipes_create = "/api/recipes/create"
|
||||
self.recipes_create_url = "/api/recipes/create-url"
|
||||
self.meal_plans_all = "/api/meal-plans/all"
|
||||
self.meal_plans_create = "/api/meal-plans/create"
|
||||
self.meal_plans_this_week = "/api/meal-plans/this-week"
|
||||
self.meal_plans_today = "/api/meal-plans/today"
|
||||
self.site_settings_custom_pages = "/api/site-settings/custom-pages"
|
||||
self.meal_plans_today_image = "/api/meal-plans/today/image"
|
||||
self.migrations = "/api/migrations"
|
||||
self.recipes_category = "/api/recipes/category"
|
||||
self.recipes_create = "/api/recipes/create"
|
||||
self.recipes_create_from_zip = "/api/recipes/create-from-zip"
|
||||
self.recipes_create_url = "/api/recipes/create-url"
|
||||
self.recipes_summary = "/api/recipes/summary"
|
||||
self.recipes_summary_uncategorized = "/api/recipes/summary/uncategorized"
|
||||
self.recipes_summary_untagged = "/api/recipes/summary/untagged"
|
||||
self.recipes_tag = "/api/recipes/tag"
|
||||
self.recipes_test_scrape_url = "/api/recipes/test-scrape-url"
|
||||
self.shopping_lists = "/api/shopping-lists"
|
||||
self.site_settings = "/api/site-settings"
|
||||
self.site_settings_custom_pages = "/api/site-settings/custom-pages"
|
||||
self.site_settings_webhooks_test = "/api/site-settings/webhooks/test"
|
||||
self.tags = "/api/tags"
|
||||
self.tags_empty = "/api/tags/empty"
|
||||
self.themes = "/api/themes"
|
||||
self.themes_create = "/api/themes/create"
|
||||
self.backups_available = "/api/backups/available"
|
||||
self.backups_export_database = "/api/backups/export/database"
|
||||
self.backups_upload = "/api/backups/upload"
|
||||
self.migrations = "/api/migrations"
|
||||
self.debug_version = "/api/debug/version"
|
||||
self.debug_last_recipe_json = "/api/debug/last-recipe-json"
|
||||
self.users = "/api/users"
|
||||
self.users_api_tokens = "/api/users/api-tokens"
|
||||
self.users_self = "/api/users/self"
|
||||
self.users_sign_ups = "/api/users/sign-ups"
|
||||
self.utils_download = "/api/utils/download"
|
||||
|
||||
def users_sign_ups_token(self, token):
|
||||
return f"{self.prefix}/users/sign-ups/{token}"
|
||||
def about_events_id(self, id):
|
||||
return f"{self.prefix}/about/events/{id}"
|
||||
|
||||
def users_id(self, id):
|
||||
return f"{self.prefix}/users/{id}"
|
||||
def about_events_notifications_id(self, id):
|
||||
return f"{self.prefix}/about/events/notifications/{id}"
|
||||
|
||||
def users_id_reset_password(self, id):
|
||||
return f"{self.prefix}/users/{id}/reset-password"
|
||||
|
||||
def users_id_image(self, id):
|
||||
return f"{self.prefix}/users/{id}/image"
|
||||
|
||||
def users_id_password(self, id):
|
||||
return f"{self.prefix}/users/{id}/password"
|
||||
|
||||
def groups_id(self, id):
|
||||
return f"{self.prefix}/groups/{id}"
|
||||
|
||||
def categories_category(self, category):
|
||||
return f"{self.prefix}/categories/{category}"
|
||||
|
||||
def recipes_tags_tag(self, tag):
|
||||
return f"{self.prefix}/recipes/tags/{tag}"
|
||||
|
||||
def recipes_recipe_slug(self, recipe_slug):
|
||||
return f"{self.prefix}/recipes/{recipe_slug}"
|
||||
|
||||
def recipes_recipe_slug_image(self, recipe_slug):
|
||||
return f"{self.prefix}/recipes/{recipe_slug}/image"
|
||||
|
||||
def meal_plans_plan_id(self, plan_id):
|
||||
return f"{self.prefix}/meal-plans/{plan_id}"
|
||||
|
||||
def meal_plans_id_shopping_list(self, id):
|
||||
return f"{self.prefix}/meal-plans/{id}/shopping-list"
|
||||
|
||||
def site_settings_custom_pages_id(self, id):
|
||||
return f"{self.prefix}/site-settings/custom-pages/{id}"
|
||||
|
||||
def themes_theme_name(self, theme_name):
|
||||
return f"{self.prefix}/themes/{theme_name}"
|
||||
def backups_file_name_delete(self, file_name):
|
||||
return f"{self.prefix}/backups/{file_name}/delete"
|
||||
|
||||
def backups_file_name_download(self, file_name):
|
||||
return f"{self.prefix}/backups/{file_name}/download"
|
||||
@@ -81,17 +68,89 @@ class AppRoutes:
|
||||
def backups_file_name_import(self, file_name):
|
||||
return f"{self.prefix}/backups/{file_name}/import"
|
||||
|
||||
def backups_file_name_delete(self, file_name):
|
||||
return f"{self.prefix}/backups/{file_name}/delete"
|
||||
|
||||
def migrations_type_file_name_import(self, type, file_name):
|
||||
return f"{self.prefix}/migrations/{type}/{file_name}/import"
|
||||
|
||||
def migrations_type_file_name_delete(self, type, file_name):
|
||||
return f"{self.prefix}/migrations/{type}/{file_name}/delete"
|
||||
|
||||
def migrations_type_upload(self, type):
|
||||
return f"{self.prefix}/migrations/{type}/upload"
|
||||
def categories_category(self, category):
|
||||
return f"{self.prefix}/categories/{category}"
|
||||
|
||||
def debug_log_num(self, num):
|
||||
return f"{self.prefix}/debug/log/{num}"
|
||||
|
||||
def groups_id(self, id):
|
||||
return f"{self.prefix}/groups/{id}"
|
||||
|
||||
def meal_plans_id(self, id):
|
||||
return f"{self.prefix}/meal-plans/{id}"
|
||||
|
||||
def meal_plans_id_shopping_list(self, id):
|
||||
return f"{self.prefix}/meal-plans/{id}/shopping-list"
|
||||
|
||||
def meal_plans_plan_id(self, plan_id):
|
||||
return f"{self.prefix}/meal-plans/{plan_id}"
|
||||
|
||||
def media_recipes_recipe_slug_assets_file_name(self, recipe_slug, file_name):
|
||||
return f"{self.prefix}/media/recipes/{recipe_slug}/assets/{file_name}"
|
||||
|
||||
def media_recipes_recipe_slug_images_file_name(self, recipe_slug, file_name):
|
||||
return f"{self.prefix}/media/recipes/{recipe_slug}/images/{file_name}"
|
||||
|
||||
def migrations_import_type_file_name_delete(self, import_type, file_name):
|
||||
return f"{self.prefix}/migrations/{import_type}/{file_name}/delete"
|
||||
|
||||
def migrations_import_type_file_name_import(self, import_type, file_name):
|
||||
return f"{self.prefix}/migrations/{import_type}/{file_name}/import"
|
||||
|
||||
def migrations_import_type_upload(self, import_type):
|
||||
return f"{self.prefix}/migrations/{import_type}/upload"
|
||||
|
||||
def recipes_recipe_slug(self, recipe_slug):
|
||||
return f"{self.prefix}/recipes/{recipe_slug}"
|
||||
|
||||
def recipes_recipe_slug_assets(self, recipe_slug):
|
||||
return f"{self.prefix}/recipes/{recipe_slug}/assets"
|
||||
|
||||
def recipes_recipe_slug_image(self, recipe_slug):
|
||||
return f"{self.prefix}/recipes/{recipe_slug}/image"
|
||||
|
||||
def recipes_recipe_slug_zip(self, recipe_slug):
|
||||
return f"{self.prefix}/recipes/{recipe_slug}/zip"
|
||||
|
||||
def recipes_slug_comments(self, slug):
|
||||
return f"{self.prefix}/recipes/{slug}/comments"
|
||||
|
||||
def recipes_slug_comments_id(self, slug, id):
|
||||
return f"{self.prefix}/recipes/{slug}/comments/{id}"
|
||||
|
||||
def shopping_lists_id(self, id):
|
||||
return f"{self.prefix}/shopping-lists/{id}"
|
||||
|
||||
def site_settings_custom_pages_id(self, id):
|
||||
return f"{self.prefix}/site-settings/custom-pages/{id}"
|
||||
|
||||
def tags_tag(self, tag):
|
||||
return f"{self.prefix}/tags/{tag}"
|
||||
|
||||
def themes_id(self, id):
|
||||
return f"{self.prefix}/themes/{id}"
|
||||
|
||||
def users_api_tokens_token_id(self, token_id):
|
||||
return f"{self.prefix}/users/api-tokens/{token_id}"
|
||||
|
||||
def users_id(self, id):
|
||||
return f"{self.prefix}/users/{id}"
|
||||
|
||||
def users_id_favorites(self, id):
|
||||
return f"{self.prefix}/users/{id}/favorites"
|
||||
|
||||
def users_id_favorites_slug(self, id, slug):
|
||||
return f"{self.prefix}/users/{id}/favorites/{slug}"
|
||||
|
||||
def users_id_image(self, id):
|
||||
return f"{self.prefix}/users/{id}/image"
|
||||
|
||||
def users_id_password(self, id):
|
||||
return f"{self.prefix}/users/{id}/password"
|
||||
|
||||
def users_id_reset_password(self, id):
|
||||
return f"{self.prefix}/users/{id}/reset-password"
|
||||
|
||||
def users_sign_ups_token(self, token):
|
||||
return f"{self.prefix}/users/sign-ups/{token}"
|
||||
|
||||
11
dev/scripts/publish-release-branch.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
git checkout dev
|
||||
git merge --strategy=ours master # keep the content of this branch, but record a merge
|
||||
git checkout master
|
||||
git merge dev # fast-forward master up to the merge
|
||||
|
||||
|
||||
## TODOs
|
||||
|
||||
# Create New Branch v0.x.x
|
||||
# Push Branch Version to Github
|
||||
# Create Pull Request
|
||||
@@ -1,27 +0,0 @@
|
||||
"""
|
||||
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, pprint
|
||||
import requests
|
||||
import extruct
|
||||
from scrape_schema_recipe import scrape_url
|
||||
from w3lib.html import get_base_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}")
|
||||
print("Trying extruct instead")
|
||||
pp = pprint.PrettyPrinter(indent=2)
|
||||
r = requests.get(url)
|
||||
base_url = get_base_url(r.text, r.url)
|
||||
data = extruct.extract(r.text, base_url=base_url)
|
||||
pp.pprint(data)
|
||||
7
dev/scripts/templates/js_index.j2
Normal file
@@ -0,0 +1,7 @@
|
||||
{% for api in files.files %}
|
||||
import { {{ api }}API } from "./{{api}}.js" {% endfor %}
|
||||
|
||||
export const api = {
|
||||
{% for api in files.files %}
|
||||
{{api}}: {{api}}API, {% endfor %}
|
||||
}
|
||||
19
dev/scripts/templates/js_requests.j2
Normal file
@@ -0,0 +1,19 @@
|
||||
// This Content is Auto Generated
|
||||
import { API_ROUTES } from "./apiRoutes"
|
||||
|
||||
export const {{paths.export_name}}API = { {% for path in paths.all_paths %} {% for verb in path.http_verbs %} {% if path.route_object.is_function %}
|
||||
/** {{ verb.js_docs }} {% for v in path.route_object.var %}
|
||||
* @param {{ v }} {% endfor %}
|
||||
*/
|
||||
{{ verb.summary_camel }}({{path.route_object.var|join(", ")}}) {
|
||||
const response = await apiReq.{{ verb.request_type.value }}(API_ROUTES.{{ path.route_object.router_camel }}({{path.route_object.var|join(", ")}}))
|
||||
return response.data
|
||||
}, {% else %}
|
||||
/** {{ verb.js_docs }} {% for v in path.route_object.var %}
|
||||
* @param {{ v }} {% endfor %}
|
||||
*/
|
||||
{{ verb.summary_camel }}() {
|
||||
const response = await apiReq.{{ verb.request_type.value }}(API_ROUTES.{{ path.route_object.router_camel }})
|
||||
return response.data
|
||||
},{% endif %} {% endfor %} {% endfor %}
|
||||
}
|
||||
7
dev/scripts/templates/js_routes.j2
Normal file
@@ -0,0 +1,7 @@
|
||||
// This Content is Auto Generated
|
||||
const prefix = '{{paths.prefix}}'
|
||||
export const API_ROUTES = { {% for path in paths.static_paths %}
|
||||
{{ path.router_camel }}: `${prefix}{{ path.route }}`,{% endfor %}
|
||||
{% for path in paths.function_paths %}
|
||||
{{path.router_camel}}: ({{path.var|join(", ")}}) => `${prefix}{{ path.js_route }}`,{% endfor %}
|
||||
}
|
||||
12
dev/scripts/templates/pytest_routes.j2
Normal file
@@ -0,0 +1,12 @@
|
||||
# This Content is Auto Generated for Pytest
|
||||
|
||||
|
||||
class AppRoutes:
|
||||
def __init__(self) -> None:
|
||||
self.prefix = '{{paths.prefix}}'
|
||||
{% for path in paths.static_paths %}
|
||||
self.{{ path.router_slug }} = "{{path.prefix}}{{ path.route }}"{% endfor %}
|
||||
{% for path in paths.function_paths %}
|
||||
def {{path.router_slug}}(self, {{path.var|join(", ")}}):
|
||||
return f"{self.prefix}{{ path.route }}"
|
||||
{% endfor %}
|
||||
@@ -3,6 +3,7 @@ version: "3.1"
|
||||
services:
|
||||
# Vue Frontend
|
||||
mealie-frontend:
|
||||
container_name: mealie-frontend
|
||||
image: mealie-frontend:dev
|
||||
build:
|
||||
context: ./frontend
|
||||
@@ -18,15 +19,16 @@ services:
|
||||
|
||||
# Fast API
|
||||
mealie-api:
|
||||
container_name: mealie-api
|
||||
image: mealie-api:dev
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile.dev
|
||||
target: development
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
ports:
|
||||
- 9921:9000
|
||||
environment:
|
||||
db_type: sqlite
|
||||
TZ: America/Anchorage # Specify Correct Timezone for Date/Time to line up correctly.
|
||||
volumes:
|
||||
- ./dev/data:/app/dev/data
|
||||
@@ -34,6 +36,7 @@ services:
|
||||
|
||||
# Mkdocs
|
||||
mealie-docs:
|
||||
container_name: mealie-docs
|
||||
image: squidfunk/mkdocs-material
|
||||
restart: always
|
||||
ports:
|
||||
|
||||
@@ -3,10 +3,28 @@ services:
|
||||
mealie:
|
||||
build:
|
||||
context: ./
|
||||
target: production
|
||||
dockerfile: Dockerfile
|
||||
container_name: mealie
|
||||
restart: always
|
||||
depends_on:
|
||||
- "postgres"
|
||||
ports:
|
||||
- 9090:80
|
||||
environment:
|
||||
db_type: sqlite
|
||||
DB_ENGINE: postgres # Optional: 'sqlite', 'postgres'
|
||||
POSTGRES_USER: mealie
|
||||
POSTGRES_PASSWORD: mealie
|
||||
POSTGRES_SERVER: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_DB: mealie
|
||||
# WORKERS_PER_CORE: 0.5
|
||||
# MAX_WORKERS: 8
|
||||
WEB_CONCURRENCY: 2
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_PASSWORD: mealie
|
||||
POSTGRES_USER: mealie
|
||||
|
||||
15
docs/Caddyfile
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
auto_https off
|
||||
}
|
||||
|
||||
:80 {
|
||||
root * /srv
|
||||
encode gzip
|
||||
uri strip_suffix /
|
||||
|
||||
handle {
|
||||
try_files {path} {path}/ /index.html
|
||||
file_server
|
||||
}
|
||||
|
||||
}
|
||||
10
docs/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM python:3.8-slim as build-stage
|
||||
WORKDIR /app
|
||||
RUN pip install --no-cache-dir mkdocs mkdocs-material
|
||||
COPY . .
|
||||
RUN mkdocs build
|
||||
|
||||
FROM caddy:alpine
|
||||
WORKDIR /app
|
||||
COPY ./Caddyfile /etc/caddy/Caddyfile
|
||||
COPY --from=build-stage /app/site /srv
|
||||
11
docs/docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: "3"
|
||||
services:
|
||||
wiki:
|
||||
container_name: mealie-docs
|
||||
image: mealie-docs
|
||||
ports:
|
||||
- 8888:80
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
BIN
docs/docs/assets/gifs/URL-import.gif
Normal file
|
After Width: | Height: | Size: 11 MiB |
BIN
docs/docs/assets/gifs/create-custom-page-demo.gif
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 8.4 MiB |
BIN
docs/docs/assets/gifs/meal-planner-demoV3.gif
Normal file
|
After Width: | Height: | Size: 5.4 MiB |
|
Before Width: | Height: | Size: 1.5 MiB |
BIN
docs/docs/assets/gifs/theme-demo-v3.gif
Normal file
|
After Width: | Height: | Size: 4.6 MiB |
|
Before Width: | Height: | Size: 58 KiB |
BIN
docs/docs/assets/img/Toolbox-Categories.webp
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
docs/docs/assets/img/Toolbox-Organize.webp
Normal file
|
After Width: | Height: | Size: 334 KiB |
BIN
docs/docs/assets/img/add-notification.webp
Normal file
|
After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 214 KiB |
BIN
docs/docs/assets/img/add-user.webp
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 46 KiB |
BIN
docs/docs/assets/img/admin-backup.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 34 KiB |
BIN
docs/docs/assets/img/api-key-image-v1.webp
Normal file
|
After Width: | Height: | Size: 43 KiB |
@@ -1,233 +0,0 @@
|
||||
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="672px" height="802px" viewBox="-0.5 -0.5 672 802" content="<mxfile host="23d2e92c-1798-4628-b714-afc635cb8bb4" modified="2021-02-25T18:35:08.654Z" agent="5.0 (Macintosh; Intel Mac OS X 11_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Code-Insiders/1.54.0-insider Chrome/87.0.4280.141 Electron/11.3.0 Safari/537.36" etag="VkjSc3HAwyf7iAB2Toef" version="14.2.4" type="embed"><diagram id="3j9sfWdaUOHFNAte1u_k" name="Page-1">7VvbcuM2Ev0aVW0e7KJ4keRH3zK7VU6tKzOpPKYgEiKxJgkuCVlyvj7duJAgCVnyhJqZeMYPtgg0cenuc7rRkGfBbbH/UJMq+4UnNJ/5XrKfBXcz35/74RL+YMuLbvGuQtWS1izRbV3DR/YnNYK6dcsS2vQEBee5YFW/MeZlSWPRayN1zXd9sQ3P+7NWJKWjho8xycetv7NEZKp1FXld+78pSzMz89zTPWsSP6U135Z6vpkf/Cx/VHdBzFhavslIwndWU3A/C25rzoX6VOxvaY7KNWpT7/18oLddd01LccoLoX7jmeRbapYsFyZejDJwP5UWo7Wge5cJyNqIe+M1zNudgctQXlBRv4DIvm904yzBSj3vOs2HRiaztH6l24g2dtqO3G0YPug9u/cfeMf3X3FWClrfP8N+cKr5LLhp7ebBQ0KajCb6IRNFboREzZ/oLc95DS0lL2HAm5ysaf7IGyYYL6E5pjg4dKBuGbjgw0BgzYXghSVwnbMUOwSvoJXop3YcWFqFKy/2KaLzsmhiQi9hC9uSXm4bWv+hDBrcbFiem9WBo95Hq8CPoH1swNZNhvYfG9Wy2tJhtMUURls6jLbIBWp/3rPd4v9bRNLNhpfiopE0cw0C81W17zrhU4p/fwPdQOcH1E5jBoS14JhKwjRWg1dS/Qqs3OPYYM1MCpa/2JO10sBUFH9LEOU5gAgNDiNs4BcaCmVERkQn2jQ8ZkSAsyEhplRktL6Ez79pafAcXqasTGW/PdeOSRVm5FkOFMe0aYwQjMLq4fAFJXmVk1IutEyG3UiBDU79KWMoIn/F2xp9BveLg+JeSvmwoURs5Rbk5tSq4O0FKdARy3VTWeoFnVedygdoBP8TJ8DM9m3d1FQkRtUEd1H39AlBdHfhI3R3GRP0I7TjVDsAD7RxcPlNLqGesSShALUbye8t4A8y4xhABynQIMUCTxCeifJC/9uj/PH2nYw/9yfYv+9ij/NQPpBqsrxae94ZeJ9vRc5KmMpkQN4pwYBvNixWYaC5JEnBSgZLJgKX+5Z44B9wjq8TDxZniQfXqJ4TA8EvwJZMMqt+STN2s61khBjQuZOGidzUVoWUhAgMDP+i+zjfJorRK2DgHa+T5ick3kcgJl4XZk5lRybHFaR5wmFz9qTWpAfQq8AwVdOGCtE128MrCUxldX/V8jkua00aqkQKluKcUkgt+LaNFgUpiY5E4NJSF2pCGTWubdeToYOUUgUNt/UCqxQ1i1XIqWnMKjoKigWpn2S/5mcdgiHbSZjiKNhLF5Fws99V5PEniTyTUG8YfP3Q4/dDjx86Yo93rtPGCaetb/u0MUHUkWxzLNgcc+rgaLBZnCvYXJ3t8NG8QkuvxJ5rSbFlmht6Q5zUVCfqkvokuUrOtWOQPDGQhsWo3Zo955jTm2iE7DnrzgZVzcFimvfV6C3Va1GbnynOynclcv39uNui75ILm7v1UaPP7IbJXbz93fD4AZff9137i5wgouM0ZiggfgG+SGgdHNCOZYW1UsrDum1oi2n/VbRjzKXqhfPo79LImyJF4FCxi2RWU2j4PBntXZu9eb/SnCDlNxmrPpN3Psl8yhBIbQ3Y4hgYAGhNtcgKQcIIhIRCMRMFVCBB/AeB32S8Fl2OqilADTDTdYOOQtTwg0qKLjn0XsEyxoWsY+BMN2jehG7INpcM1GbcVolkrVNmXWRpx+3U2Q4wLOrIzeCspF2s2Xg7YAaCaaZldALN26y1340AkMn3LqOaLDuKp3vIn5uBku09QL7d30G3cRkKLt8xW76O7FV0FNnuJDiYANvmEsHC9q/aVYYcumMFeC7qMs5YnjyQF8i/oK8R4Bjm6QaAw/4E+JPOQKQW+lIl8HoSH/FNrchOrXNNIPqd+co867V0Vje3IT6+T5FvHo3WvbbpgTTiaOY6ShodHjSBqeeLPosvVmNbz100PsmBJxon/BcdRUmmzgHFs0jnfxEyOoSxOWrowsp8lOya85xiLteTMTjpSQxcyWg7pxvxdgg/yLfuwoGbLA4eE6Qf6EOacjVBhPUM9jMecpKNI89tZAPgE206RfIThSOTqluAH+CdHLxhH7uR77Czq6g4DXbHWe7FTBfbXoOjvl2zsC1vlMbYNtmMLaojQU/23YE5fDOYXUaeBMzjuwCs5D7mDgr9Aei/D+jI/6rReOVEtAXYD13x8R3hbfnNBM+FP7KAW+U/wDZB9PSPh0/fVeqeBGyLca3/oj1sn5D52t8/0JItNUd37w2jiwO3NIcx6rTcJBgd157QRJf6YkaVM7Aygeq0Ssyz7qszHl//D68HpqsljCAzNEsBhyCcxllU6BcQbAv700CtLfoZqEUOUnUZLJzAYMsTbtX6GjhSiB0qyGmkKQgq7CcD5h6/pzQHPU3h5K5bnIHOaJJSEwYamhawq/uu6YaWyTV+1RS9MicNVkEPatFEFVelevSVkUGPHXfUGnFhb1W5pdPIoVPTpqq4z/3hXYrWMzzibaVl0au+ReeDERq+rWOqX+qsNRpnPhho6Q1sDmE+pWI0EBiEvFhi8jK1OXm9ZprOidSAnUu1Gj0NmSdclHyTyPS9foUUPPKLQXN5wiX5xNB8TxCcr8KB6Vafh8Fw8CW9aBirJsJgW1EbLPjQukbyofdZ+5gM5K67un8CyEN/GH/DLwfyE753/wPkh+OW3w9c0dVnBtpoAI6zBVr/1Ug7XpfnXtdkoB0X/uQhp7thPnDMMVd1+ojTjLz23Z5xBtn60vGl7fMdccaVO3nWvDRVgsMG6+q536HJhug+o83gsfu3NYXI7p8Dg/u/AA==</diagram></mxfile>" style="background-color: rgb(255, 255, 255);">
|
||||
<defs/>
|
||||
<g>
|
||||
<rect x="0" y="138" width="70" height="60" fill="none" stroke="none" pointer-events="all"/>
|
||||
<path d="M 0 190.12 C 0.33 185.06 0.82 180.02 1.48 175 C 1.8 173.47 2.19 171.97 2.66 170.5 C 3.13 168.98 4 167.67 5.14 166.72 C 6.56 165.61 8.15 164.81 9.83 164.35 C 10.51 164.04 11.26 164.04 11.94 164.35 C 16.84 169.6 24.48 169.6 29.38 164.35 C 29.98 164.08 30.64 164.08 31.24 164.35 C 33.19 165.09 35.06 166.07 36.82 167.27 C 34.65 167.54 32.55 168.25 30.62 169.39 C 27.64 171.19 25.41 174.27 24.43 177.95 L 22.92 190.14 Z M 20.17 161.73 C 17.61 161.8 15.14 160.56 13.36 158.3 C 11.58 156.05 10.65 152.98 10.79 149.85 C 10.72 146.76 11.68 143.77 13.45 141.58 C 15.23 139.39 17.66 138.19 20.17 138.26 C 22.78 138 25.35 139.12 27.25 141.33 C 29.14 143.54 30.18 146.64 30.09 149.85 C 30.25 153.1 29.25 156.28 27.34 158.56 C 25.44 160.84 22.83 162 20.17 161.73 Z M 25.84 198 C 26.15 193.52 26.59 189.05 27.17 184.6 C 27.42 182.59 27.8 180.6 28.32 178.66 C 28.64 176.59 29.65 174.75 31.15 173.52 C 32.85 172.3 34.66 171.28 36.55 170.5 C 37.4 170.21 38.32 170.4 39.03 171 C 40.08 172.2 41.31 173.19 42.66 173.92 C 46.02 175.58 49.83 175.58 53.19 173.92 C 54.53 173.16 55.78 172.22 56.9 171.1 C 57.79 170.31 59.01 170.19 60 170.8 C 61.6 171.42 63.13 172.3 64.51 173.42 C 65.8 174.41 66.77 175.86 67.26 177.55 C 68.13 180.7 68.72 183.94 69.03 187.22 C 69.43 190.81 69.76 194.4 70 198 Z M 48.5 167.98 C 42.29 168.13 37.15 161.83 36.99 153.87 C 37.03 150.02 38.26 146.34 40.42 143.65 C 42.58 140.97 45.49 139.5 48.5 139.57 C 54.38 140.09 58.97 146.32 59.02 153.87 C 58.89 161.35 54.33 167.47 48.5 167.98 Z" fill="#e58325" stroke="none" pointer-events="all"/>
|
||||
<rect x="70" y="138" width="340" height="90" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 332px; height: 1px; padding-top: 128px; margin-left: 75px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: left; max-height: 100px; overflow: hidden; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
<h1 style="font-size: 18px">
|
||||
User Groups
|
||||
</h1>
|
||||
<p>
|
||||
User groups, or "family" groups are a collection of users that are associated together. Users belonging to groups will have access to their associated mealplans and associated pages. This is currently the only feature of groups.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="75" y="140" fill="#000000" font-family="Helvetica" font-size="12px">
|
||||
User Groups...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="10" width="70" height="60" fill="none" stroke="none" pointer-events="all"/>
|
||||
<path d="M 63.22 68.4 C 63.82 68.4 64.58 67.93 64.58 67.14 C 64.58 66.64 64.03 65.99 63.22 65.99 C 62.34 65.99 61.86 66.7 61.86 67.14 C 61.86 67.83 62.49 68.4 63.22 68.4 Z M 66.39 67.22 C 66.39 68.69 64.91 70 63.27 70 C 61.44 70 60.07 68.65 60.07 67.25 L 60.07 50.06 C 58.43 49.33 56.45 47.65 56.45 44.65 C 56.55 42.25 58.13 40.43 60.07 39.51 L 60.07 44.39 L 63.22 45.99 L 66.39 44.39 L 66.39 39.5 C 68.29 40.34 70 42.32 70 44.78 C 69.95 47.1 68.53 49.03 66.39 50.06 Z M 49.19 69.99 C 48.73 69.99 48.32 69.65 48.32 69.19 L 48.32 57.17 C 48.32 56.81 48.7 56.39 49.17 56.39 L 50.12 56.39 L 50.13 45.21 L 49.77 42.55 L 49.77 38.79 L 52.29 38.79 L 52.3 42.55 L 51.94 45.21 L 51.94 56.39 L 52.85 56.39 C 53.37 56.39 53.74 56.68 53.74 57.21 L 53.74 69.22 C 53.74 69.68 53.33 69.99 52.88 69.99 Z M 27.78 36.63 C 20.5 36.63 14 31.25 14 22.98 C 14 16.57 19.5 10 27.52 10 C 35.36 10 41.1 16.36 41.1 23.29 C 41.1 31.31 34.33 36.63 27.78 36.63 Z M 0 63.51 C 0.63 57.61 1.47 49.54 3.07 45.46 C 3.81 43.61 4.88 42.28 6.61 41.17 C 7.73 40.43 11.72 38.48 12.45 38.16 C 13.73 37.57 15.05 37.26 16.18 38.16 C 22.94 43.46 32.3 43.3 39.15 38.18 C 39.94 37.46 41.21 37.65 42.04 37.94 C 42.97 38.26 45.37 39.46 46.96 40.29 L 46.96 42.69 L 47.32 45.36 L 47.32 54.39 C 46.31 54.92 45.52 55.93 45.52 57.17 L 45.51 63.51 Z" fill="#e58325" stroke="#d79b00" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="70" y="10" width="340" height="120" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 332px; height: 1px; padding-top: 0px; margin-left: 75px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: left; max-height: 130px; overflow: hidden; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
<h1 style="font-size: 18px">
|
||||
Admins
|
||||
</h1>
|
||||
<p>
|
||||
Mealie admins are super users that have access to all user data (excluding passwords). Perform administrative tasks like adding users, resetting user passwords, backing up the database, migrating data, and managing site settings. Administrators can also access restricted recipes that are marked hidden or uneditable by the user.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="75" y="12" fill="#000000" font-family="Helvetica" font-size="12px">
|
||||
Admins...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="10" y="240" width="60" height="60" fill="none" stroke="none" pointer-events="all"/>
|
||||
<path d="M 40.01 269.86 C 32.14 269.86 25.13 263.82 25.13 254.55 C 25.13 247.37 31.06 240 39.72 240 C 48.19 240 54.39 247.13 54.39 254.9 C 54.39 263.89 47.08 269.86 40.01 269.86 Z M 10 300 C 10.68 293.37 11.59 284.33 13.32 279.75 C 14.11 277.68 15.27 276.19 17.14 274.95 C 18.35 274.12 22.66 271.93 23.45 271.57 C 24.83 270.91 26.26 270.57 27.48 271.57 C 34.78 277.52 44.88 277.34 52.28 271.6 C 53.14 270.78 54.51 271 55.41 271.32 C 56.82 271.82 61.36 274.29 62.22 274.79 C 64.73 276.3 66.08 278.32 67.09 282.11 C 68.37 287.23 69.13 293.75 70 300 Z" fill="#e58325" stroke="none" pointer-events="all"/>
|
||||
<rect x="70" y="240" width="340" height="90" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 332px; height: 1px; padding-top: 230px; margin-left: 75px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: left; max-height: 100px; overflow: hidden; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
<h1 style="font-size: 18px">
|
||||
Users
|
||||
</h1>
|
||||
<p>
|
||||
A single user created by an Admin that has basic privlages to edit their profile, create and edit recipes they own. Edit recipes that are not hidden and are marked editable.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="75" y="242" fill="#000000" font-family="Helvetica" font-size="12px">
|
||||
Users...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 10 375 C 10 366.72 23.43 360 40 360 C 47.96 360 55.59 361.58 61.21 364.39 C 66.84 367.21 70 371.02 70 375 L 70 425 C 70 433.28 56.57 440 40 440 C 23.43 440 10 433.28 10 425 Z" fill="#e58325" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<path d="M 70 375 C 70 383.28 56.57 390 40 390 C 23.43 390 10 383.28 10 375" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="75" y="360" width="340" height="130" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 332px; height: 1px; padding-top: 350px; margin-left: 80px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: left; max-height: 140px; overflow: hidden; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
|
||||
<h1 style="font-size: 18px">
|
||||
Database Relationships
|
||||
</h1>
|
||||
<p>
|
||||
The basic relationship and ownership is diagramed below. In short users are owners of recipes and groups are the owners of meal-plans. By default all users will be added to the "default" group. If a recipe is added through a migration or through a backup where no user exists ownership will be set to the default Admin.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="80" y="362" fill="#000000" font-family="Helvetica" font-size="12px">
|
||||
Database Relationships...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 310 710 L 310 693.5 Q 310 680 296.5 680 L 163.5 680 Q 150 680 150 693.5 L 150 710" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<path d="M 150 710 L 150 786.5 Q 150 800 163.5 800 L 296.5 800 Q 310 800 310 786.5 L 310 710" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 150 710 L 310 710" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<g fill="#000000" font-family="Helvetica" font-weight="bold" pointer-events="none" text-anchor="middle" font-size="18px">
|
||||
<text x="229.5" y="702.5">
|
||||
Recipe
|
||||
</text>
|
||||
</g>
|
||||
<g fill="#000000" font-family="Helvetica" pointer-events="none" font-size="16px">
|
||||
<text x="155.5" y="731.5">
|
||||
- owners: list[Users]
|
||||
</text>
|
||||
<text x="155.5" y="750.5">
|
||||
- editable: boolean
|
||||
</text>
|
||||
<text x="155.5" y="769.5">
|
||||
- hidden: boolean
|
||||
</text>
|
||||
</g>
|
||||
<path d="M 200 550 L 200 533.5 Q 200 520 186.5 520 L 43.5 520 Q 30 520 30 533.5 L 30 550" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 30 550 L 30 626.5 Q 30 640 43.5 640 L 186.5 640 Q 200 640 200 626.5 L 200 550" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 30 550 L 200 550" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<g fill="#000000" font-family="Helvetica" font-weight="bold" pointer-events="none" text-anchor="middle" font-size="18px">
|
||||
<text x="114.5" y="542.5">
|
||||
User
|
||||
</text>
|
||||
</g>
|
||||
<g fill="#000000" font-family="Helvetica" pointer-events="none" font-size="16px">
|
||||
<text x="35.5" y="571.5">
|
||||
- admin: boolean
|
||||
</text>
|
||||
<text x="35.5" y="590.5">
|
||||
- group: list[Group]
|
||||
</text>
|
||||
<text x="35.5" y="609.5">
|
||||
- recipes: list[Recipe]
|
||||
</text>
|
||||
</g>
|
||||
<path d="M 670 710 L 670 693.5 Q 670 680 656.5 680 L 523.5 680 Q 510 680 510 693.5 L 510 710" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 510 710 L 510 786.5 Q 510 800 523.5 800 L 656.5 800 Q 670 800 670 786.5 L 670 710" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 510 710 L 670 710" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<g fill="#000000" font-family="Helvetica" font-weight="bold" pointer-events="none" text-anchor="middle" font-size="18px">
|
||||
<text x="589.5" y="702.5">
|
||||
MealPlan
|
||||
</text>
|
||||
</g>
|
||||
<g fill="#000000" font-family="Helvetica" pointer-events="none" font-size="16px">
|
||||
<text x="515.5" y="731.5">
|
||||
- group: Group
|
||||
</text>
|
||||
</g>
|
||||
<path d="M 610 550 L 610 533.5 Q 610 520 596.5 520 L 423.5 520 Q 410 520 410 533.5 L 410 550" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 410 550 L 410 626.5 Q 410 640 423.5 640 L 596.5 640 Q 610 640 610 626.5 L 610 550" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 410 550 L 610 550" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<g fill="#000000" font-family="Helvetica" font-weight="bold" pointer-events="none" text-anchor="middle" font-size="18px">
|
||||
<text x="509.5" y="542.5">
|
||||
Group
|
||||
</text>
|
||||
</g>
|
||||
<g fill="#000000" font-family="Helvetica" pointer-events="none" font-size="16px">
|
||||
<text x="415.5" y="571.5">
|
||||
- users: list[Users]
|
||||
</text>
|
||||
<text x="415.5" y="590.5">
|
||||
- mealplans list[MealPlan]
|
||||
</text>
|
||||
</g>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 570px; margin-left: 271px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: none; white-space: normal; word-wrap: normal; ">
|
||||
User.group is backfilled by a Groups object
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="320" y="574" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
User.group is bac...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="34" y="636" width="10" height="10" fill="#ffffff" stroke="none" pointer-events="none"/>
|
||||
<path d="M 39 611 L 39 690 Q 39 700 49 700 L 130.76 700" fill="none" stroke="#e58325" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 136.76 700 L 128.76 704 L 130.76 700 L 128.76 696 Z" fill="#e58325" stroke="#e58325" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<rect x="195" y="583" width="10" height="10" fill="#ffffff" stroke="none" pointer-events="none"/>
|
||||
<path d="M 174 588 L 234 588 Q 244 588 244 578 L 244 550 Q 244 540 254 540 L 391.76 540" fill="none" stroke="#e58325" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 397.76 540 L 389.76 544 L 391.76 540 L 389.76 536 Z" fill="#e58325" stroke="#e58325" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<rect x="414" y="634" width="10" height="10" fill="#ffffff" stroke="none" pointer-events="none"/>
|
||||
<path d="M 419 591 L 419 690 Q 419 700 429 700 L 480 700 Q 490 700 490.88 700 L 491.76 700" fill="none" stroke="#e58325" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<path d="M 497.76 700 L 489.76 704 L 491.76 700 L 489.76 696 Z" fill="#e58325" stroke="#e58325" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 730px; margin-left: 35px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: none; white-space: normal; word-wrap: normal; ">
|
||||
User.recipes is backfilled by Recipe objects
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="84" y="734" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
User.recipes is b...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 730px; margin-left: 401px;">
|
||||
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: none; white-space: normal; word-wrap: normal; ">
|
||||
Group.mealplan is backfilled by MealPlan objects
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="450" y="734" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Group.mealplan is...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
</g>
|
||||
<switch>
|
||||
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
|
||||
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
|
||||
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
|
||||
Viewer does not support full SVG 1.1
|
||||
</text>
|
||||
</a>
|
||||
</switch>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 138 KiB |
BIN
docs/docs/assets/img/custom-page.webp
Normal file
|
After Width: | Height: | Size: 187 KiB |
BIN
docs/docs/assets/img/dashboard.webp
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
docs/docs/assets/img/discord-notification-example.webp
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
docs/docs/assets/img/edit-recipe.webp
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
docs/docs/assets/img/gotify-notification-example.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
docs/docs/assets/img/mealie-diagram.webp
Normal file
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 482 KiB |
BIN
docs/docs/assets/img/sign-up-links.webp
Normal file
|
After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 175 KiB |
BIN
docs/docs/assets/img/site-settings.webp
Normal file
|
After Width: | Height: | Size: 71 KiB |
0
docs/docs/assets/js/analytics.js
Normal file
11
docs/docs/assets/js/extra.js
Normal file
@@ -0,0 +1,11 @@
|
||||
/* Add target="_blank" to external links */
|
||||
/* Source: https://html.com/attributes/a-target/#:~:text=browser */
|
||||
function externalLinks() {
|
||||
for (var c = document.getElementsByTagName("a"), a = 0; a < c.length; a++) {
|
||||
var b = c[a];
|
||||
b.getAttribute("href") &&
|
||||
b.hostname !== location.hostname &&
|
||||
(b.target = "_blank");
|
||||
}
|
||||
}
|
||||
externalLinks();
|
||||
@@ -33,6 +33,12 @@ a.md-button.md-button:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* Add icon after external links */
|
||||
/* Ignore auto-generated material theme links */
|
||||
a[target="_blank"]:not([class*="md-"]):after {
|
||||
content: " " url("../svg/open-in-new.svg");
|
||||
}
|
||||
|
||||
/* Site width etc.*/
|
||||
.md-grid {
|
||||
max-width: 64rem !important;
|
||||
|
||||
3
docs/docs/assets/svg/open-in-new.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24">
|
||||
<path fill="rgb(229,131,37)" d="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 259 B |
30
docs/docs/changelog/.template.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# vx.x.x COOL TITLE GOES HERE
|
||||
|
||||
**App Version: vx.x.x**
|
||||
|
||||
**Database Version: vx.x.x**
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
!!! error "Breaking Changes"
|
||||
|
||||
#### Database
|
||||
|
||||
#### ENV Variables
|
||||
|
||||
|
||||
## Bug Fixes
|
||||
- Fixed ...
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
### General
|
||||
- New Thing 1
|
||||
|
||||
|
||||
### UI Improvements
|
||||
-
|
||||
|
||||
|
||||
### Behind the Scenes
|
||||
- Refactoring...
|
||||
129
docs/docs/changelog/v0.5.0.md
Normal file
@@ -0,0 +1,129 @@
|
||||
# v0.5.0 Too Many Changes!
|
||||
|
||||
**App Version: v0.5.0**
|
||||
|
||||
**Database Version: v0.5.0**
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
!!! error "Breaking Changes"
|
||||
|
||||
#### Database
|
||||
Database version has been bumped from v0.4.x -> v0.5.0. You will need to export and import your data. Moving forward, we will be using database migrations (BETA) to do this automatically. Note that you still must backup your data. If you don't, it's entirely possible something may go wrong and you could lose your data on upgrade.
|
||||
|
||||
#### Image Directory
|
||||
the /data/img directory has been depreciated. All images are now stored in the /recipes/{slug}/image directory. Images should be migrated automatically, but you may experience issues related to this change.
|
||||
|
||||
#### API Usage
|
||||
If you have been using the API directly, many of the routes and status codes have changed. You may experience issues with directly consuming the API.
|
||||
|
||||
#### Arm/v7 Support
|
||||
Mealie will no longer build in CI/CD due to a issue with the rust compiler on 32 bit devices. You can reference [this issue on the matrix-org/synapse](https://github.com/matrix-org/synapse/issues/9403) Github page that are facing a similar issue. You may still be able to build the docker image you-self.
|
||||
|
||||
!!! warning "Potential Data Loss"
|
||||
With this release comes a major rework of how files are stored on disk and where things belong. Migration of files should be done automatically. We have tested extensively with many different backups and user bases and have found that no one experienced data-loss. HOWEVER, with all the major changes that have occurred, it is vital that to prevent any data-loss you must create a backup and store that backup outside of your mealie instance. If you do not do this, you may lose your data.
|
||||
|
||||
## Bug Fixes
|
||||
- Fixed #25 - Allow changing rating without going into edit
|
||||
- Fixed #475 - trim whitespace on login
|
||||
- Fixes #435 - Better Email Regex
|
||||
- Fixed #428 - Meal Planner now works on iOS devices
|
||||
- Fixed #419 - Typos
|
||||
- Fixed #418 - You can now "export" shopping lists
|
||||
- Fixed #356 - Shopping List items are now grouped
|
||||
- Fixed #329 - Fixed profile image not loading
|
||||
- Fixed #461 - Proper JSON serialization on webhooks
|
||||
- Fixed #332 - Language settings are saved for one browser
|
||||
- Fixes #281 - Slow Handling of Large Sets of Recipes
|
||||
- Fixed #356 - Shopping lists generate duplicate items
|
||||
- Fixed #271 - Slow handling of larger data sets
|
||||
- Fixed #472, #469, #458, #456 - Improve Recipe Parser
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
### Highlights
|
||||
- Recipe Parser
|
||||
- Recipes can now be imported with a bookmarklet!
|
||||
- Significant improvement in supported sites with the new [Recipe Scraper Library](https://github.com/hhursev/recipe-scrapers)
|
||||
- UI Debugging now available at `/recipes/debugger`
|
||||
- Better error messages on failure
|
||||
- ⚠️ last_recipe.json is now depreciated
|
||||
- Beta Support for Postgres! 🎉 See the getting started page for details
|
||||
- Recipe Features
|
||||
- New button bar for editors with improved accessibility and performance
|
||||
- Step Sections now supported
|
||||
- Recipe Assets
|
||||
- Add Asset image to recipe step
|
||||
- Additional View Settings.
|
||||
- Better print support
|
||||
- New Toolbox Page!
|
||||
- Bulk assign categories and tags by keyword search
|
||||
- Title case all Categories or Tags with 1 click
|
||||
- Create/Rename/Delete Operations for Tags/Categories
|
||||
- Remove Unused Categories or Tags with 1 click
|
||||
- Recipe Cards now have a menu button for quick actions!
|
||||
- Edit
|
||||
- Delete
|
||||
- Integrated Share with supported OS/Browsers
|
||||
- Print
|
||||
- New Profile Dashboard!
|
||||
- Edit Your Profile
|
||||
- Create/Edit Themes
|
||||
- View other users in your Group
|
||||
- See what's for dinner
|
||||
- Manage Long Live API Tokens (New)
|
||||
- New Admin Dashboard! 🎉
|
||||
- Now you can get some insight on your application with application statics and events.
|
||||
- See uncategorized/untagged recipes and organize them!
|
||||
- Backup/Restore right from your dashboard
|
||||
- See server side events. Now you can know who deleted your favorite recipe!
|
||||
- New Event Notifications through the Apprise Library
|
||||
- Get notified when specific server side events occur
|
||||
|
||||
### Meal Planner
|
||||
- Multiple Recipes per day
|
||||
- Supports meals without recipes (Enter title and description)
|
||||
- Generate share-link from created meal-planners
|
||||
- Shopping lists can be directly generated from the meal plan
|
||||
|
||||
### General
|
||||
- User can now favorite recipes
|
||||
- New 'Dark' Color Theme Packaged with Mealie
|
||||
- Updated Recipe Card Sections Toolbar
|
||||
- New Sort Options (They work this time!)
|
||||
- Alphabetical
|
||||
- Rating
|
||||
- Created Date
|
||||
- Updated Date
|
||||
- Shuffle (Random Sort)
|
||||
- New 'Random' Recipe button on recipe sections. Random recipes are selected from the filtered results below. For example, on the "Cakes" category page, you will only get recipes in the "Cakes" category.
|
||||
- Rating can be updated without entering the editor - Closes #25
|
||||
- Updated recipe editor styles and moved notes to below the steps.
|
||||
- Redesigned search bar
|
||||
- 'Dinner this week' shows a warning when no meal is planned yet
|
||||
- 'Dinner today' shows a warning when no meal is planned yet
|
||||
- More localization
|
||||
- Start date for Week is now selectable
|
||||
- Languages are now managed through Crowdin
|
||||
- Application Bar was Rewritten
|
||||
- Sidebar can now be toggled everywhere.
|
||||
- New and improved mobile friendly bottom bar
|
||||
- Improved styling for search bar in desktop
|
||||
- Improved search layout on mobile
|
||||
- Profile image now shown on all sidebars
|
||||
- Switched from Flash Messages to Snackbar (Removed dependency)
|
||||
|
||||
### Performance
|
||||
- Images are now served up by the Caddy increase performance and offloading some loads from the API server
|
||||
- Requesting all recipes from the server has been rewritten to refresh less often and manage client side data better.
|
||||
- All images are now converted to .webp for better compression
|
||||
|
||||
### Behind the Scenes
|
||||
- The database layer has been added for future recipe scaling.
|
||||
- Black and Flake8 now run as CI/CD checks
|
||||
- New debian based docker image
|
||||
- Unified Sidebar Components
|
||||
- Refactor UI components to fit Vue best practices (WIP)
|
||||
- The API returns more consistent status codes
|
||||
- The API returns error code instead of error text when appropriate
|
||||
- ⚠️ May cause side-effects if you were directly consuming the API
|
||||
11
docs/docs/changelog/v0.5.1.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v0.5.1
|
||||
|
||||
**App Version: v0.5.1**
|
||||
|
||||
**Database Version: v0.5.0**
|
||||
|
||||
|
||||
## Bug Fixes
|
||||
- Fixed #538 - Missing Ingredients on Editor
|
||||
- Fixed error on webhooks for new groups
|
||||
- Fixed various icons references
|
||||
65
docs/docs/changelog/v0.5.2.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# v0.5.2
|
||||
|
||||
**App Version: v0.5.2**
|
||||
|
||||
**Database Version: v0.5.0**
|
||||
|
||||
## Bug Fixes
|
||||
- Fixed #617 - Section behavior when adding a step
|
||||
- Fixed #615 - Recipe Settings are not available when creating new recipe
|
||||
- Fixed #625 - API of today's image returns strange characters
|
||||
- Fixed [#590](https://github.com/hay-kot/mealie/issues/590) - Duplicate Events when using Gunicorn Workers
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
### General
|
||||
- Recipe Instructions now collapse when checked
|
||||
- Default recipe settings can be set through ENV variables
|
||||
- Recipe Ingredient lists can now container ingredient sections.
|
||||
- You can now download and upload individual recipes
|
||||
|
||||
|
||||
### Localization
|
||||
|
||||
Huge thanks to [@sephrat](https://github.com/sephrat) for all his work on the project. He's very consistent in his contributions to the project and nearly every release has had some of his code in it! Here's some highlights from this release
|
||||
|
||||
- Lazy Load Translations (Huge Performance Increase!)
|
||||
- Tons of localization additions all around the site.
|
||||
- All of the work that goes into managing and making Crowdin a great feature the application
|
||||
|
||||
#### Here a list of contributors on Crowding who make Mealie possible in different locals
|
||||
|
||||
| Name | Languages | Translated (Words) | Target Words |
|
||||
| ---------------------------- | ------------------ | :----------------: | :----------: |
|
||||
| retmas-gh | Polish | 550 | 625 |
|
||||
| startos | Italian | 310 | 322 |
|
||||
| CMBoii | Spanish | 256 | 291 |
|
||||
| sephrat | French | 255 | 296 |
|
||||
| Daniel Tildeman (tildeman) | Swedish | 233 | 228 |
|
||||
| Rourke | Dutch | 216 | 214 |
|
||||
| Andreas Waschinski (Wascha) | German | 207 | 202 |
|
||||
| wengtad | Chinese Simplified | 176 | 343 |
|
||||
| Matthias Borremans (MrBorri) | Dutch | 96 | 89 |
|
||||
| Adam Syndoman (pypckompsite) | Polish | 68 | 65 |
|
||||
| JonasSchubert | German | 22 | 23 |
|
||||
| ThrawnJL | Danish | 7 | 7 |
|
||||
| NicholasBrody | Dutch | 7 | 7 |
|
||||
| Giel Janssens (gieljnssns) | Dutch | 4 | 4 |
|
||||
| kentora | Danish | 3 | 2 |
|
||||
|
||||
|
||||
|
||||
### Docker
|
||||
|
||||
#### Huge thanks to [@wengtad](https://github.com/wengtad) for all his work on improving the deployment with docker.
|
||||
|
||||
- Optimize Docker Dev Size (Frontend: from ~1.52GB to ~429MB | API: from ~657MB to ~380MB)
|
||||
- Optimize Docker Prod Size (from ~542MB to ~373MB)
|
||||
- Add Gunicorn
|
||||
- Add Gunicorn and Webworkers to Dockerfile #550
|
||||
- Add Docs for Gunicorn
|
||||
- Add PUID/PGID to Docker. Fixes Initialization scripts fail to run when not executing as root user inside container #350,
|
||||
- Not able to run correctly in docker if user permissions are specified #429
|
||||
- Merge Dockerfile.dev into Dockerfile (dev shared same base together with prod)
|
||||
- Add Docs for PUID/PGID
|
||||
- Add Docker healthcheck (for this is not necessary, I could remove if you want)
|
||||
@@ -9,11 +9,12 @@ We use github to host code, to track issues and feature requests, as well as acc
|
||||
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 `dev`.
|
||||
2. Read the page in in [dev/dev-notes.md](https://github.com/hay-kot/mealie/blob/master/dev/dev-notes.md) to get an idea on where the project is at.
|
||||
2. Checkout the Discord, the PRs page, or the Projects page to get an idea of what's already being worked on.
|
||||
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 branch reflect those changes in the dev/dev-notes.md to keep track of changes. Don't forget to add your name/handle/identifier!
|
||||
4. Once you've got an idea of what changes you want to make, create a draft PR as soon as you can to let us know what you're working on and how we can help!
|
||||
5. If you've changed APIs, update the documentation.
|
||||
6. Issue that pull request!
|
||||
7. If you make changes to the dev branch reflect those changes in the active changelog 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.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Guidelines
|
||||
|
||||
TODO
|
||||
## Python
|
||||
|
||||
## Vue
|
||||
|
||||
[See The Style Guide](../developers-guide/style-guide.md)
|
||||
@@ -1,6 +1,6 @@
|
||||
# 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.
|
||||
After reading through the [Code Contributions Guide](../developers-guide/code-contributions.md) 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
|
||||
Prerequisites
|
||||
@@ -8,7 +8,7 @@ Prerequisites
|
||||
- Docker
|
||||
- docker-compose
|
||||
|
||||
You can easily start the development stack by running `make docker-dev` in the root of the project directory. This will run and build the docker-compose.dev.yml file.
|
||||
You can easily start the development stack by running `make docker-dev` in the root of the project directory. This will run and build the docker-compose.dev.yml file.
|
||||
|
||||
## Without Docker
|
||||
Prerequisites
|
||||
@@ -18,32 +18,34 @@ Prerequisites
|
||||
- Nodejs
|
||||
- npm
|
||||
|
||||
Once the prerequisites are installed you can cd into the project base directory and run `make setup` to install the python and node dependencies. Once that is complete you can run `make backend` and `make vue` to start the backend and frontend servers.
|
||||
Once the prerequisites are installed you can cd into the project base directory and run `make setup` to install the python and node dependencies. Once that is complete you can run `make backend` and `make frontend` to start the backend and frontend servers.
|
||||
|
||||
## Make File Reference
|
||||
`make setup` installs python and node dependencies
|
||||
|
||||
`make backend` Starts the backend server on port `9000`
|
||||
Run `make help` for reference
|
||||
|
||||
`make vue` Starts the frontend server on port `8080`
|
||||
```
|
||||
clean-purge ⚠️ Removes All Developer Data for a fresh server start
|
||||
clean 🧹 Remove all build, test, coverage and Python artifacts
|
||||
clean-pyc 🧹 Remove Python file artifacts
|
||||
clean-test 🧹 Remove test and coverage artifacts
|
||||
test-all 🧪 Check Lint Format and Testing
|
||||
test 🧪 Run tests quickly with the default Python
|
||||
lint 🧺 Check style with flake8
|
||||
coverage ☂️ Check code coverage quickly with the default Python
|
||||
setup 🏗 Setup Development Instance
|
||||
backend 🎬 Start Mealie Backend Development Server
|
||||
frontend 🎬 Start Mealie Frontend Development Server
|
||||
frontend-build 🏗 Build Frontend in frontend/dist
|
||||
docs 📄 Start Mkdocs Development Server
|
||||
docker-dev 🐳 Build and Start Docker Development Stack
|
||||
docker-prod 🐳 Build and Start Docker Production Stack
|
||||
code-gen 🤖 Run Code-Gen Scripts
|
||||
|
||||
`make mdocs` Starts the documentation server on port `8000`
|
||||
```
|
||||
|
||||
`make docker-dev` Builds docker-compose.dev.yml
|
||||
## Before you Commit!
|
||||
|
||||
`make docker-prod` Builds docker-compose.yml to test for production
|
||||
|
||||
|
||||
## 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.
|
||||
Before you commit any changes on the backend/python side you'll want to run `make format` to format all the code with black. `make lint` to check with flake8, and `make test` to run pytests. You can also use `make test-all` to run both `lint` and `test`.
|
||||
|
||||
Run into another issue? [Ask for help on discord](https://discord.gg/QuStdQGSGK)
|
||||
33
docs/docs/contributors/developers-guide/style-guide.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Style Guide
|
||||
|
||||
!!! note
|
||||
Unifying styles across the application is an ongoing process, we are working on making the site more consistent.
|
||||
|
||||
## Button Guidelines
|
||||
|
||||
1. Buttons should follow the general color/icon scheme as outlined.
|
||||
2. All buttons should have an icon on the left side of the button and text on the right.
|
||||
3. Primary action buttons should be the default Vuetify styling.
|
||||
4. Primary action buttons should be right aligned
|
||||
5. Secondary buttons should be `text` or `outlined`. Text is preferred
|
||||
6. Other buttons should generally be "info" or "primary" color and can take any style type depending on context
|
||||
|
||||
### Button Colors and Icons
|
||||
|
||||
| Type | Color | Icon |
|
||||
| ----------- | :------------------ | :------------------------------------------------- |
|
||||
| Default | `info` or `primary` | None |
|
||||
| Create/New | `success` | `mdi-plus` or `$globals.icons.create` |
|
||||
| Update/Save | `success` | `mdi-save-content` or `$globals.icons.save` |
|
||||
| Edit | `info` | `mdi-square-edit-outline` or `$globals.icons.edit` |
|
||||
|
||||
### Example
|
||||
```html
|
||||
<v-btn color="primary">
|
||||
<v-icon left> mdi-plus </v-icon>
|
||||
Primary Button
|
||||
</v-btn>
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
# Contributing with Translations
|
||||
Translations can be a great way **for non-coders** to contribute to project.
|
||||
We use **[Crowdin](https://crowdin.com/project/mealie)** to allow several contributors to work on translating Mealie.
|
||||
You can simply help by voting for your preferred translations, or even by completely translating Mealie into a new language.
|
||||
|
||||
Mealie supports a framework for the community to contribute different translations. Translations can be a great way for non-coders to contribute to project.
|
||||
Translations are regularly pulled from Crowdin and included in each new release.
|
||||
|
||||
## My Language Is Missing
|
||||
If your language is missing, you can add it, by beginning to translate. We use a Vue-i18n in json files. Copy frontend/src/locales/en.json to get started.
|
||||
Please use Crowdin as much as possible if you have any question/issue regarding a particular string. You can take a look at [Crowdin Knowledge base](https://support.crowdin.com/for-volunteer-translators/) if you want to know more about how to use this tool.
|
||||
|
||||
## Improving Translations
|
||||
If your language is missing the translation for some strings, you can help out by adding a translation for that string. If you find a string you think could be improved, please feel free to do so.
|
||||
## My language is missing in Mealie
|
||||
Once your language is translated on Crowdin, we need to manually add it in Mealie. If you believe your language is ready for use, please create an issue on GitHub.
|
||||
|
||||
## Tooling
|
||||
Currently we use Vue-i18n for translations. Translations are stored in json format located in [frontend/src/locales](https://github.com/hay-kot/mealie/tree/master/frontend/src/locales).
|
||||
## I can't find a particular text in Crowdin
|
||||
There can be several reasons:
|
||||
- The text you're looking for is outdated: someone has already changed it or it will be removed/changed in the next release.
|
||||
- It is possible some texts are not translatable (yet) for technical reasons. If you spot one, please reach out to us on [Discord](https://discord.gg/QuStdQGSGK) or raise an issue on GitHub.
|
||||
|
||||
If you have experience with a good Translation Management System, please feel free to chime in on the [Discord](https://discord.gg/QuStdQGSGK), as such a system could be helpful as the projects grow.
|
||||
Until then, [i18n Ally for VScode](https://marketplace.visualstudio.com/items?itemName=antfu.i18n-ally) is recommended to aid in translating. It also has a nice feature, which shows translations in-place when editing code.
|
||||
i18n Ally will also show which languages is missing translations.
|
||||
## Technical information
|
||||
We use vue-i18n package for internationalization. Translations are stored in json format located in [frontend/src/locales/messages](https://github.com/hay-kot/mealie/tree/master/frontend/src/locales/messages).
|
||||
|
||||
[i18n Ally for VScode](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) is helpful for generating new strings to translate. It also has a nice feature, which shows translations in-place when editing code.
|
||||
@@ -3,7 +3,7 @@
|
||||
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.
|
||||
|
||||
!!! 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). Prior to upgrading you **should** perform a backup to limit any data loss.
|
||||
As this is still a **BETA** it is recommended that you backup your data often and store in more than one place. Adhere to backup best practices with the [3-2-1 Backup Rule](https://en.wikipedia.org/wiki/Backup). Prior to upgrading you **should** perform a backup to limit any data loss.
|
||||
|
||||
!!! tip "Mealie data that is saved on backups"
|
||||
- [x] Recipe Data
|
||||
@@ -15,11 +15,11 @@ All recipe data can be imported and exported as necessary from the UI. Under the
|
||||
|
||||
To create an export simply add the tag and the markdown template and click "Create" and your backup will be created on the server. The backup is a standard zipfile containing all the images, json files, and rendered jinaj2 templates for each recipe. To view the available 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 a source to restore from. Selected the desired backup and import the backup file. Backups can be uploaded from the UI as well as added on the file system
|
||||
To import a backup it must be in your backups folder. If it is in the backup folder it will automatically show up as a source to restore from. Selected the desired backup and import the backup file. Backups can be uploaded from the UI as well as added on the file system.
|
||||
|
||||
## Demo
|
||||
|
||||

|
||||

|
||||
|
||||
## API Examples
|
||||
You can use the API to create and retrieve backups remotely from any server that can access the Mealie instance. This is useful for easily managing off-site backups via cron-job or other scheduled tasks. You can find interactive documentation for your API at https://your-mealie-instance.com/docs
|
||||
@@ -38,21 +38,29 @@ curl -X 'POST' \
|
||||
"settings": true,
|
||||
"themes": true
|
||||
},
|
||||
"template": [
|
||||
"templates": [
|
||||
"recipes.md"
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
### wget Example
|
||||
Download a backup with `wget`
|
||||
First request a file token with curl:
|
||||
```bash
|
||||
wget http://localhost:9000/api/backups/{file_name}/download
|
||||
curl -X 'GET' \
|
||||
'http://localhost:9000/api/backups/{file_name}/download' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
Then download the file with wget:
|
||||
```bash
|
||||
wget http://localhost:9000/api/utils/download?token={fileToken}
|
||||
```
|
||||
|
||||
|
||||
## Jinja2 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.
|
||||
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
|
||||
@@ -120,4 +128,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.
|
||||
If you decide you don't like mealie: This is a good way to export into a format that can be imported into another.
|
||||
@@ -3,9 +3,11 @@
|
||||
!!! warning
|
||||
The page building is still experimental and may change. You can provide feedback on any changes you'd like to see on [github](https://github.com/hay-kot/mealie/discussions/229)
|
||||
|
||||
Custom pages can be created to organize multiple categories into a single page. Links to your custom pages are displayed on the home page sidebar and accessible by all users, however only Administrators can create or update pages.
|
||||
Custom pages can be created to organize multiple categories into a single page. Links to your custom pages are displayed on the home page sidebar and accessible by all users, however only Administrators can create or update pages.
|
||||

|
||||
|
||||
To create a new page. Navigate to the settings page at `/admin/settings` and scroll down to the custom pages section. Here you can create, view, and edit your custom pages. To reorder how they are displayed on the sidebar you can drag and drop the pages into the preferred order.
|
||||
To create a new page navigate to the settings page at `/admin/settings` and scroll down to the custom pages section. Here you can create, view, and edit your custom pages. To reorder how they are displayed on the sidebar you can drag and drop the pages into the preferred order.
|
||||

|
||||
|
||||
!!! tip
|
||||
To save the order of pages you must click the save button displayed on the bottom of the Custom Page section. This is not necessary for updating individual page data.
|
||||
To save the order of pages you must click the save button displayed on the bottom of the Custom Page section. This is not necessary for updating individual page data.
|
||||
16
docs/docs/documentation/admin/dashboard.md
Normal file
@@ -0,0 +1,16 @@
|
||||
#Dashboard
|
||||
|
||||
The dashboard gives you a quick overview of how your Mealie is doing. There is a 'Recipes' card, an overview of the users and groups, an 'Events' card and a 'Backups' card.
|
||||
|
||||

|
||||
|
||||
|
||||
## Recipes
|
||||
'Recipes' shows how many recipes you have in your catalogue but also checks if you have any untagged or uncategorized ones. If you click on one of these, you are redirected to the Toolbox where you can further organize these recipes.
|
||||
|
||||
## Users
|
||||
This gives an overview of the total number of users for your Mealie instance. The 'manage users' and 'manage groups' button will redirect you to the [user-management page](../admin/user-management.md).
|
||||
|
||||
## Backups
|
||||
Here you can choose to import an older backup from a previous instance. You could also create a custom backup with your own tag where you can choose for a full backup or only some parts like recipes, users,...
|
||||
If you click 'create', an automatic backup is generated.
|
||||
@@ -8,7 +8,7 @@ To migrate recipes from a Chowdown
|
||||
3. Select import on the newly available migration.
|
||||
|
||||
## Nextcloud Recipes
|
||||
Nextcloud recipes can be imported from a zip file the contains the data stored in Nextcloud. The zip file can be uploaded from the frontend or placed in the data/migrations/nextcloud directory. See the example folder structure below to ensure your recipes are able to be imported.
|
||||
Nextcloud recipes can be imported from a zip file that contains the data stored in Nextcloud. The zip file can be uploaded from the frontend or placed in the data/migrations/nextcloud directory. See the example folder structure below to ensure your recipes are able to be imported.
|
||||
|
||||
```
|
||||
nextcloud_recipes.zip
|
||||
15
docs/docs/documentation/admin/site-settings.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Site Settings
|
||||
Your sites settings panel can only be accessed by administrators. This is where you can customize your site for all users.
|
||||
|
||||
## Home Page Settings
|
||||
| Option | Description |
|
||||
| --------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| Show Recent | To display the recent recipes section on the home page |
|
||||
| Card Per Section | The amount of cards displayed in each section on the home page |
|
||||
| Home Page Sections | Category sections to include on the home page |
|
||||
| Language | The default site language |
|
||||
| First day of the week | The default start day of the week used in Meal Plans |
|
||||
| Custom Pages | Create a [custom page](../admin/building-pages.md) which appears in the sidebar with the categories you chose |
|
||||
|
||||

|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# User Managemenet
|
||||
# User Management
|
||||
|
||||
As of version v0.4.0 users have limited functionality, but they will offer more permissions and structure as time goes on. To understand the different systems, see each section below. Note, that by default all users will be assigned the default group. If you're only managing one household you won't need to do anything to set up a new group.
|
||||
|
||||
@@ -47,7 +47,7 @@ As of version v0.4.0 users have limited functionality, but they will offer more
|
||||
On the first startup you'll need to login to Mealie using the default username and password `changeme@email.com` and `MyPassword` or the default set through the env variable. On first login you'll be required to reset your password. After resetting your password you should also change your email address as appropriate. This will be used for logins on all future requests.
|
||||
|
||||
!!! tip
|
||||
Your default password environmental variable will be the default password for all new users that are created. This is stored in plain text and should not be used **any where** else.
|
||||
Your default password environment variable will be the default password for all new users that are created. This is stored in plain text and should not be used **anywhere** else.
|
||||
|
||||
|
||||
## Creating and Editing Users
|
||||
@@ -56,7 +56,7 @@ There are two ways to create users in Mealie.
|
||||
### Manually Creating a User
|
||||
In the Manage Users section you are able to create a user by providing the necessary information in the pop-up dialog.
|
||||
|
||||
{: align=right style="height:50%;width:50%"}
|
||||
{: align=right style="height:50%;width:50%"}
|
||||
|
||||
- User Name
|
||||
- Email
|
||||
@@ -69,7 +69,7 @@ When creating users manually, their password will be set from the default assign
|
||||
### Sign Up Links
|
||||
You can generate sign-up links in the Manage Users section. Select the "create link" button and provide the name of the link and if the user will be an administrator. Once a link is created it will populate in the table where you'll be able to see all active links, delete a link, and copy the link as needed.
|
||||
|
||||

|
||||

|
||||
|
||||
!!! tip
|
||||
When a link is used it is automatically removed from the database.
|
||||
@@ -77,10 +77,10 @@ You can generate sign-up links in the Manage Users section. Select the "create l
|
||||
## Creating Groups
|
||||
You can easily create and manage groups via the frontend in the admin panel under "Manage Users". Navigate to the groups tab and you'll find a "create group" button as well as a list of all groups in your database. To create a group, select the "create group" button and provide a name for the new group. Once created you can now assign users to the new group.
|
||||
|
||||

|
||||

|
||||
|
||||
!!! tip
|
||||
User Groups can only be deleted if no users are apart of the group. If you want to delete a group, you must assign the users to another group before removing.
|
||||
User Groups can only be deleted if no users are a part of the group. If you want to delete a group, you must assign the users to another group before removing.
|
||||
|
||||
## Password Reset
|
||||
If a user forgets their password an administrator is able to reset their password through the user management page. In the user table, select edit. In the popup windows click the "Reset Password" to reset a users password to the default. This is either 'MyPassword' or set through an environment variable. See the [Installation Page](/mealie/getting-started/install/) for more details on environmental variables
|
||||
If a user forgets their password an administrator is able to reset their password through the user management page. In the user table, select edit. In the popup window click the "Reset Password" to reset a user's password to the default. This is either 'MyPassword' or set through an environment variable. See the [Installation Page](../getting-started/install.md) for more details on environment variables.
|
||||
2
docs/docs/documentation/community-guide/.header.md
Normal file
@@ -0,0 +1,2 @@
|
||||
!!! info
|
||||
This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed!
|
||||
@@ -1,5 +1,5 @@
|
||||
!!! info
|
||||
This example was submitted by a user. Have an Example? Submit a PR!
|
||||
This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed!
|
||||
|
||||
|
||||
Recipes can be imported in bulk from a file containing a list of URLs. This can be done using the following bash or python scripts with the `list` file containing one URL per line.
|
||||
@@ -1,11 +1,15 @@
|
||||
In a lot of ways, Home Assistant is why this project exists! Since it Mealie has a robust API it makes it a great fit for interacting with Home Assistant and pulling information into your dashboard.
|
||||
!!! info
|
||||
This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed!
|
||||
|
||||
|
||||
In a lot of ways, Home Assistant is why this project exists! Since Mealie has a robust API it makes it a great fit for interacting with Home Assistant and pulling information into your dashboard.
|
||||
|
||||
### Get Todays Meal in Lovelace
|
||||
Starting in v0.4.1 you are now able to use the uri `/api/meal-plans/today/image?group_name=Home` to directly access the image to todays meal. This makes it incredible easy to include the image into your Home Assistant Dashboard using the picture entity.
|
||||
Starting in v0.4.1 you are now able to use the uri `/api/meal-plans/today/image?group_name=Home` to directly access the image to todays meal. This makes it incredibly easy to include the image into your Home Assistant Dashboard using the picture entity.
|
||||
|
||||
Here's an example where `sensor.mealie_todays_meal` is pulling in the meal-plan name and I'm using the url to get the image.
|
||||
|
||||

|
||||

|
||||
|
||||
```yaml
|
||||
type: picture-entity
|
||||
@@ -25,6 +29,19 @@ style:
|
||||
}
|
||||
```
|
||||
|
||||
The sensor that gets the name of the meal can be achieved using the following REST sensor in Home Assistant
|
||||
```yaml
|
||||
sensor:
|
||||
- platform: rest
|
||||
resource: 'http://localhost:9000/api/meal-plans/today'
|
||||
method: GET
|
||||
name: Mealie todays meal
|
||||
headers:
|
||||
Authorization: Bearer MySuperSecretBearerCode
|
||||
value_template: "{{ value_json.name }}"
|
||||
```
|
||||
The Bearer token can be created from the User Settings page (https://hay-kot.github.io/mealie/documentation/users-groups/user-settings/#api-key-generation)
|
||||
|
||||
|
||||
!!! tip
|
||||
Due to how Home Assistant works with images, I had to include the additional styling to get the images to not appear distorted. This includes and [additional installation](https://github.com/thomasloven/lovelace-card-mod) from HACS.
|
||||
@@ -1,35 +1,22 @@
|
||||
# Using iOS Shortcuts with Mealie
|
||||
{: align=right style="height:400px;width:400px"}
|
||||

|
||||
|
||||
|
||||
User [brasilikum](https://github.com/brasilikum) opened an issue on the main repo about how they had created an [iOS shortcut](https://github.com/hay-kot/mealie/issues/103) for interested users. This is a useful utility for iOS users who browse for recipes in their web browser from their devices.
|
||||
User [brasilikum](https://github.com/brasilikum) opened an issue on the main repo about how they had created an [iOS shortcut](https://github.com/hay-kot/mealie/issues/103) for interested users. This is a useful utility for iOS users who browse for recipes in their web browser from their devices. Recent updates to Mealie has made this original shortcut break. Reddit user [BooNooBooNooB](https://www.reddit.com/user/BooNooBooNooB/) has helped to create a new working version.
|
||||
|
||||
Don't know what an iOS shortcut is? Neither did I! Experienced iOS users may already be familiar with this utility but for the uninitiated, here is the official Apple explanation:
|
||||
|
||||
|
||||
> A shortcut is a quick way to get one or more tasks done with your apps. The Shortcuts app lets you create your own shortcuts with multiple steps. For example, build a “Surf Time” shortcut that grabs the surf report, gives an ETA to the beach, and launches your surf music playlist.
|
||||
>
|
||||
|
||||
Basically it is a visual scripting language that lets a user build an automation in a guided fashion. The automation can be [shared with anyone](https://www.icloud.com/shortcuts/4c40fcc6f39549f9a189995a449cd44f) but if it is a user creation, you'll have to jump through a few hoops to make an untrusted automation work on your device.
|
||||
|
||||
Basically it is a visual scripting language that lets a user build an automation in a guided fashion. The automation can be [shared with anyone](https://www.icloud.com/shortcuts/6ae356d5fc644cfa8983a3c90f242fbb) but if it is a user creation, you'll have to jump through a few hoops to make an untrusted automation work on your device. In brasilikum's shortcut, you need to make changes for it to work. Recent updates to the project have changed some of the syntax and folder structure since its original creation.
|
||||
You need to replace `username` and `password` with the login information for your mealie instance.
|
||||
|
||||

|
||||
|
||||
{: align=right style="height:500;width:400px"}
|
||||
Then, you need to put in your mealie domain. The API port of `:9000` is not needed when putting your domain in the text field.
|
||||
|
||||

|
||||
|
||||
|
||||
!!! tip
|
||||
You may need to change the url depending on which version you're using. Recipe is now plural and there is no trailing "/" at the end of the string.
|
||||
|
||||
```
|
||||
api/recipe/create-url/
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
```
|
||||
api/recipes/create-url
|
||||
```
|
||||
|
||||
|
||||
|
||||
Having made those changes, you should now be able to share a website to the shortcut and have mealie grab all the necessary information!
|
||||
You should now be able to share a website to the shortcut and have mealie grab all the necessary information!
|
||||
92
docs/docs/documentation/community-guide/swag.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# Using SWAG as Reverse Proxy
|
||||
|
||||
!!! info
|
||||
This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed!
|
||||
|
||||
|
||||
|
||||
To make the setup of a Reverse Proxy much easier, Linuxserver.io developed [SWAG](https://github.com/linuxserver/docker-swag)
|
||||
SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx web server and reverse proxy with PHP support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.
|
||||
|
||||
## Step 1: Get a domain
|
||||
|
||||
The first step is to grab a dynamic DNS if you don't have your own subdomain already. You can get this from for example [DuckDNS](https://www.duckdns.org).
|
||||
|
||||
## Step 2: Set-up SWAG
|
||||
|
||||
Then you will need to set up SWAG, the variables of the docker-compose are explained on the Github page of [SWAG](https://github.com/linuxserver/docker-swag).
|
||||
This is an example of how to set it up using duckdns and docker-compose.
|
||||
|
||||
!!! example "docker-compose.yml"
|
||||
```yaml
|
||||
version: "2.1"
|
||||
services:
|
||||
swag:
|
||||
image: ghcr.io/linuxserver/swag
|
||||
container_name: swag
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Europe/Brussels
|
||||
- URL=<mydomain.duckdns>
|
||||
- SUBDOMAINS=wildcard
|
||||
- VALIDATION=duckdns
|
||||
- CERTPROVIDER= #optional
|
||||
- DNSPLUGIN= #optional
|
||||
- DUCKDNSTOKEN=<duckdnstoken>
|
||||
- EMAIL=<e-mail> #optional
|
||||
- ONLY_SUBDOMAINS=false #optional
|
||||
- EXTRA_DOMAINS=<extradomains> #optional
|
||||
- STAGING=false #optional
|
||||
volumes:
|
||||
- /etc/config/swag:/config
|
||||
ports:
|
||||
- 443:443
|
||||
restart: unless-stopped
|
||||
|
||||
```
|
||||
|
||||
Don't forget to change the <code>mydomain.duckns</code> into your personal domain and the <code>duckdnstoken</code> into your token and remove the brackets.
|
||||
|
||||
## Step 3: Change the config files
|
||||
|
||||
Navigate to the config folder of SWAG and head to <code>proxy-confs</code>. If you used the example above, you should navigate to: <code>/etc/config/swag/nginx/proxy-confs/</code>.
|
||||
There are a lot of preconfigured files to use for different apps such as radarr, sonarr, overseerr, ...
|
||||
|
||||
To use the bundled configuration file, simply rename <code>mealie.subdomain.conf.sample</code> in the proxy-confs folder to <code>mealie.subdomain.conf</code>.
|
||||
Alternatively, you can create a new file <code>mealie.subdomain.conf</code> in proxy-confs with the following configuration:
|
||||
|
||||
!!! example "mealie.subdomain.conf"
|
||||
```yaml
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name mealie.*;
|
||||
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
location / {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app mealie;
|
||||
set $upstream_port 80;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
## Step 4: Port-forward port 443
|
||||
|
||||
Since SWAG allows you to set up a secure connection, you will need to open port 443 on your router for encrypted traffic. This is way more secure than port 80 for http.
|
||||
|
||||
## Step 5: Restart SWAG
|
||||
|
||||
When you change anything in the config of Nginx, you will need to restart the container using <code>docker restart swag</code>.
|
||||
If everything went well, you can now access mealie on the subdomain you configured: mealie.mydomain.duckdns.org
|
||||
@@ -2,38 +2,17 @@
|
||||
|
||||
## Getting a Token
|
||||
|
||||
Currently Mealie doesn't support creating a long-live token. You can however get a token from the API. This example was pulled from the automatic API documentation provided by Mealie.
|
||||
Mealie supports long-live api tokens in the user frontend. See [user settings page](../users-groups/user-settings.md)
|
||||
|
||||
### Curl
|
||||
```bash
|
||||
curl -X 'POST' \
|
||||
'https://mealie-demo.hay-kot.dev/api/auth/token' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/x-www-form-urlencoded' \
|
||||
-d 'grant_type=&username=changeme%40email.com&password=demo&scope=&client_id=&client_secret='
|
||||
|
||||
```
|
||||
|
||||
#### Response
|
||||
```json
|
||||
{
|
||||
"snackbar": {
|
||||
"text": "User Successfully Logged In",
|
||||
"type": "success"
|
||||
},
|
||||
"access_token": "your-long-token-string",
|
||||
"token_type": "bearer"
|
||||
}
|
||||
```
|
||||
|
||||
## Key Components
|
||||
|
||||
### Exploring Your Local API
|
||||
On your local installation you can access interactive API documentation that provides `curl` examples and expected results. This allows you to easily test and interact with your API to identify places to include your own functionality. You can visit the documentation at `http://mealie.yourdomain.com/docs or see the example at the [Demo Site](https://mealie-demo.hay-kot.dev/docs)
|
||||
On your local installation you can access interactive API documentation that provides `curl` examples and expected results. This allows you to easily test and interact with your API to identify places to include your own functionality. You can visit the documentation at `http://mealie.yourdomain.com/docs` or see the example at the [Demo Site](https://mealie-demo.hay-kot.dev/docs)
|
||||
|
||||
### 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.
|
||||
|
||||

|
||||

|
||||
227
docs/docs/documentation/getting-started/install.md
Normal file
@@ -0,0 +1,227 @@
|
||||
# Installation
|
||||
|
||||
To deploy mealie 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. You can deploy with either SQLite (default) or Postgres. SQLite is sufficient for most use cases. Additionally, with mealies automated backup and restore functionality, you can easily move between SQLite and Postgres as you wish.
|
||||
|
||||
[Get Docker](https://docs.docker.com/get-docker/)
|
||||
|
||||
[Mealie on Dockerhub](https://hub.docker.com/r/hkotel/mealie)
|
||||
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
## Quick Start - Docker CLI
|
||||
|
||||
Deployment with the Docker CLI can be done with `docker run` and specify the database type, in this case `sqlite`, setting the exposed port `9925`, mounting the current directory, and pull the latest image. After the image is up and running you can navigate to http://your.ip.address:9925 and you'll should see mealie up and running!
|
||||
|
||||
```shell
|
||||
docker run \
|
||||
-p 9925:80 \
|
||||
-v `pwd`:'/app/data/' \
|
||||
hkotel/mealie:latest
|
||||
|
||||
```
|
||||
|
||||
!!! tip "Default Credentials"
|
||||
|
||||
**Username:** changeme@email.com
|
||||
|
||||
**Password:** MyPassword
|
||||
|
||||
## Docker Compose with SQLite
|
||||
|
||||
Deployment with docker-compose is the recommended method for deployment. The example below will create an instance of mealie available on port `9925` with the data volume mounted from the local directory. To use, create a docker-compose.yml file, paste the contents below and save. In the terminal run `docker-compose up -d` to start the container.
|
||||
|
||||
```yaml
|
||||
version: "3.1"
|
||||
services:
|
||||
mealie:
|
||||
container_name: mealie
|
||||
image: hkotel/mealie:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 9925:80
|
||||
environment:
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
TZ: America/Anchorage
|
||||
|
||||
# Default Recipe Settings
|
||||
RECIPE_PUBLIC: true
|
||||
RECIPE_SHOW_NUTRITION: true
|
||||
RECIPE_SHOW_ASSETS: true
|
||||
RECIPE_LANDSCAPE_VIEW: true
|
||||
RECIPE_DISABLE_COMMENTS: false
|
||||
RECIPE_DISABLE_AMOUNT: false
|
||||
|
||||
# Gunicorn
|
||||
WEB_CONCURRENCY: 2
|
||||
# WORKERS_PER_CORE: 0.5
|
||||
# MAX_WORKERS: 8
|
||||
volumes:
|
||||
- ./mealie/data/:/app/data
|
||||
```
|
||||
|
||||
## Docker Compose with Postgres _(BETA)_
|
||||
|
||||
Postgres support was introduced in v0.5.0. At this point it should be used with caution and frequent backups.
|
||||
|
||||
```yaml
|
||||
version: "3.1"
|
||||
services:
|
||||
mealie:
|
||||
container_name: mealie
|
||||
image: hkotel/mealie:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 9090:80
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
TZ: America/Anchorage
|
||||
|
||||
# Database Settings
|
||||
DB_ENGINE: postgres # Optional: 'sqlite', 'postgres'
|
||||
POSTGRES_USER: mealie
|
||||
POSTGRES_PASSWORD: mealie
|
||||
POSTGRES_SERVER: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_DB: mealie
|
||||
|
||||
# Default Recipe Settings
|
||||
RECIPE_PUBLIC: true
|
||||
RECIPE_SHOW_NUTRITION: true
|
||||
RECIPE_SHOW_ASSETS: true
|
||||
RECIPE_LANDSCAPE_VIEW: true
|
||||
RECIPE_DISABLE_COMMENTS: false
|
||||
RECIPE_DISABLE_AMOUNT: false
|
||||
|
||||
# Gunicorn
|
||||
WEB_CONCURRENCY: 2
|
||||
# WORKERS_PER_CORE: 0.5
|
||||
# MAX_WORKERS: 8
|
||||
volumes:
|
||||
- ./mealie/data/:/app/data
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_PASSWORD: mealie
|
||||
POSTGRES_USER: mealie
|
||||
```
|
||||
|
||||
## Env Variables
|
||||
|
||||
| Variables | Default | Description |
|
||||
| ----------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| PUID | 911 | UserID permissions between host OS and container |
|
||||
| PGID | 911 | GroupID permissions between host OS and container |
|
||||
| DEFAULT_GROUP | Home | The default group for users |
|
||||
| DEFAULT_EMAIL | changeme@email.com | The default username for the superuser |
|
||||
| BASE_URL | http://localhost:8080 | Used for Notifications |
|
||||
| DB_ENGINE | sqlite | Optional: 'sqlite', 'postgres' |
|
||||
| POSTGRES_USER | mealie | Postgres database user |
|
||||
| POSTGRES_PASSWORD | mealie | Postgres database password |
|
||||
| POSTGRES_SERVER | postgres | Postgres database server address |
|
||||
| POSTGRES_PORT | 5432 | Postgres database port |
|
||||
| POSTGRES_DB | mealie | Postgres database name |
|
||||
| TOKEN_TIME | 2 | The time in hours that a login/auth token is valid |
|
||||
| RECIPE_PUBLIC | True | Default Recipe Settings - Make Recipe Public |
|
||||
| RECIPE_SHOW_NUTRITION | True | Default Recipe Settings - Show Recipe Nutrition |
|
||||
| RECIPE_SHOW_ASSETS | True | Default Recipe Settings - Show Recipe Assets |
|
||||
| RECIPE_LANDSCAPE_VIEW | True | Default Recipe Settings - Set Landscape View |
|
||||
| RECIPE_DISABLE_COMMENTS | False | Default Recipe Settings - Disable Comments |
|
||||
| RECIPE_DISABLE_AMOUNT | False | Default Recipe Settings - Disable Amount |
|
||||
| API_PORT | 9000 | The port exposed by backend API. **Do not change this if you're running in Docker** |
|
||||
| API_DOCS | True | Turns on/off access to the API documentation locally. |
|
||||
| TZ | UTC | Must be set to get correct date/time on the server |
|
||||
| WORKERS_PER_CORE | 1 | Set the number of workers to the number of CPU cores multiplied by this value (Value \* CPUs). More info [here][workers_per_core] |
|
||||
| MAX_WORKERS | | Set the maximum number of workers to use. Default is not set meaning unlimited. More info [here][max_workers] |
|
||||
| WEB_CONCURRENCY | 2 | Override the automatic definition of number of workers. More info [here][web_concurrency] |
|
||||
|
||||
|
||||
## Raspberry Pi 4
|
||||
|
||||
!!! tip "Fatal Python error: init_interp_main: can't initialize time"
|
||||
|
||||
Some users experience an problem with running the linux/arm/v7 container on Raspberry Pi 4. This is not a problem with the Mealie container, but with a bug in the hosts Docker installation.
|
||||
|
||||
Update the host RP4 using [instructions](https://github.com/linuxserver/docker-papermerge/issues/4#issuecomment-735236388), summarized here:
|
||||
|
||||
```shell
|
||||
wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
|
||||
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
!!! warning "Not Required"
|
||||
|
||||
The items below are completely optional and are not required to manage or install your Mealie instance.
|
||||
|
||||
### Custom Caddy File
|
||||
|
||||
The Docker image provided by Mealie contains both the API and the html bundle in one convenient image. This is done by using a proxy server to serve different parts of the application depending on the URL/URI. Requests sent to `/api/*` or `/docs` will be directed to the API, anything else will be served the static web files. Below is the default Caddyfile that is used to proxy requests. You can override this file by mounting an alternative Caddyfile to `/app/Caddyfile`.
|
||||
|
||||
```
|
||||
{
|
||||
auto_https off
|
||||
admin off
|
||||
}
|
||||
|
||||
:80 {
|
||||
@proxied path /api/* /docs /openapi.json
|
||||
|
||||
root * /app/dist
|
||||
encode gzip
|
||||
uri strip_suffix /
|
||||
|
||||
handle_path /api/recipes/image/* {
|
||||
root * /app/data/img/
|
||||
file_server
|
||||
}
|
||||
|
||||
handle @proxied {
|
||||
reverse_proxy http://127.0.0.1:9000
|
||||
}
|
||||
|
||||
handle {
|
||||
try_files {path}.html {path} /
|
||||
file_server
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Deployed without Docker
|
||||
|
||||
!!! error "Unsupported Deployment"
|
||||
|
||||
If you are experiencing a problem with manual deployment, please do not submit a github issue unless it is related to an aspect of the application. For deployment help, the [discord server](https://discord.gg/QuStdQGSGK) is a better place to find support.
|
||||
|
||||
Alternatively, this project is built on Python and SQLite so you may run it as a python application on your server. This is not a supported options for deployment and is only here as a reference for those who would like to do this on their own. To get started you can clone this repository into a directory of your choice and use the instructions below as a reference for how to get started.
|
||||
|
||||
There are three parts to the Mealie application
|
||||
|
||||
- Frontend/Static Files
|
||||
- Backend API
|
||||
- Proxy Server
|
||||
|
||||
### Frontend/ Static Files
|
||||
|
||||
The frontend static files are generated with `npm run build`. This is done during the build process with docker. If you choose to deploy this as a system application you must do this process yourself. In the project directory run `cd frontend` to change directories into the frontend directory and run `npm install` and then `npm run build`. This will generate the static files in a `dist` folder in the frontend directory.
|
||||
|
||||
### Backend API
|
||||
|
||||
The backend API is build with Python, FastAPI, and SQLite and requires Python 3.9, and Poetry. Once the requirements are installed, in the project directory you can run the command `poetry install` to create a python virtual environment and install the python dependencies.
|
||||
|
||||
Once the dependencies are installed you should be ready to run the server. To initialize that database you need to first run `python mealie/db/init_db.py`. Then to start The web server, you run the command `uvicorn mealie.app:app --host 0.0.0.0 --port 9000`
|
||||
|
||||
### Proxy Server
|
||||
|
||||
You must use a proxy server to server up the static files created with `npm run build` and proxy requests to the API. In the docker build this is done with Caddy. You can use the CaddyFile in the section above as a reference. One important thing to keep in mind is that you should drop any trailing `/` in the url. Not doing this may result in failed API requests.
|
||||
|
||||
[workers_per_core]: https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/2daa3e3873c837d5781feb4ff6a40a89f791f81b/README.md#workers_per_core
|
||||
[max_workers]: https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/2daa3e3873c837d5781feb4ff6a40a89f791f81b/README.md#max_workers
|
||||
[web_concurrency]: https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/2daa3e3873c837d5781feb4ff6a40a89f791f81b/README.md#web_concurrency
|
||||
@@ -8,14 +8,14 @@ Mealie is a self hosted recipe manager and meal planner with a RestAPI backend a
|
||||
In some of the demo gifs the styling may be different than the finale application. demos were done during development prior to finale styling.
|
||||
|
||||
!!! warning
|
||||
This is a **BETA** release and that means things may break and or change down the line. I'll do my best to make sure that any API changes are thoughtful and necessary in order not to break things. Additionally, I'll do my best to provide a migration path if the database schema ever changes. Do not use programs like watchtower to auto update your container. You **WILL** run into issues if you do this,
|
||||
This is a **BETA** release and that means things may break and or change down the line. I'll do my best to make sure that any API changes are thoughtful and necessary in order not to break things. Additionally, I'll do my best to provide a migration path if the database schema ever changes. Do not use programs like watchtower to auto update your container. You **WILL** run into issues if you do this!
|
||||
|
||||
|
||||
## Key Features
|
||||
- 🔍 Fuzzy search
|
||||
- 🏷️ Tag recipes with categories or tags to flexible sorting
|
||||
- 🕸 Import recipes from around the web by URL
|
||||
- 📱 Beautiful Mobile Views
|
||||
- 📱 Progressive Web App
|
||||
- 📆 Create Meal Plans
|
||||
- 🛒 Generate shopping lists
|
||||
- 🐳 Easy setup with Docker
|
||||
@@ -56,16 +56,15 @@ As to why we need a database?
|
||||
<!-- ROADMAP -->
|
||||
## Road Map
|
||||
|
||||
[See Roadmap](/roadmap)
|
||||
[See Roadmap](../../roadmap.md)
|
||||
|
||||
|
||||
<!-- CONTRIBUTING -->
|
||||
## Contributing
|
||||
|
||||
Contributions are what make the open source community such an amazing place to be learn, develop, and create. Any contributions you make are **greatly appreciated**. See the [Contributors Guide](https://hay-kot.github.io/mealie/contributors/developers-guide/code-contributions/) for help getting started.
|
||||
Contributions are what make the open source community such an amazing place to learn, develop, and create. Any contributions you make are **greatly appreciated**. See the [Contributors Guide](../../contributors/non-coders.md) 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.
|
||||
If you are not a coder, you can still contribute financially. Financial contributions help me prioritize working on this project over others and help me to know that there is a real demand for project development.
|
||||
|
||||
<a href="https://www.buymeacoffee.com/haykot" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-green.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Updating Mealie
|
||||
|
||||
!!! warning "Read The Release Notes"
|
||||
You MUST read the release notes prior to upgrading your container. Currently Mealie provides no database migrations as doing such would slow down development and hinder major changes that may need to happen prior to v1.0.0. Mealie has a robust backup and restore system for managing your data.
|
||||
You MUST read the release notes prior to upgrading your container. Currently Mealie provides no database migrations as doing so would slow down development and hinder major changes that may need to happen prior to v1.0.0. Mealie has a robust backup and restore system for managing your data.
|
||||
|
||||
### Before Upgrading
|
||||
- Read The Release Notes
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
## Backing Up Your Data
|
||||
|
||||
[See Backups and Restore Section](/mealie/site-administration/backups-and-exports/) for details on backing up your data
|
||||
[See Backups and Restore Section](../admin/backups-and-exports.md) for details on backing up your data
|
||||
|
||||
## Docker
|
||||
For all setups using Docker the updating process look something like this
|
||||
For all setups using Docker the updating process looks something like this
|
||||
|
||||
- Stop the container using docker-compose down
|
||||
- Pull the latest image using docker-compose pull
|
||||
23
docs/docs/documentation/recipes/organizing-recipes.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Organizing Recipes
|
||||
|
||||
Below are some general guidelines that were considered when creating the organization structure for recipes.
|
||||
|
||||
|
||||
## From The Community
|
||||
|
||||
> My categories are mostly based on the 'course' they belong to. Appetizers, Starters, Main course, but also sauces or beverages. When I'm looking for an idea for an every day dinner, I just browse "main course".
|
||||
>
|
||||
> My tags are for picking the exact type of meal I'm looking for, based on my mood or my guests' diet, like gluten-free, vegetarian, sweet-sour or casserole. They can also act as sub-categories, like "alcohol" for beverages or "hot meal" for a main course.
|
||||
>
|
||||
> User: [sephrat](https://github.com/sephrat)
|
||||
|
||||
|
||||
## Structure
|
||||
|
||||
!!! tip
|
||||
Below is a suggestion of guidelines my wife and I use for organizing our recipes within Mealie. Mealie is fairly flexible, so feel free to utilize how you'd like! 👍
|
||||
|
||||
In the diagram below you will see what we came up with using the new custom pages feature. The large circles indicate pages, and the rectangles indicate categories. We've grouped several 'like' categories with each other as a way to quickly find similar items.
|
||||
|
||||

|
||||
|
||||
139
docs/docs/documentation/recipes/recipes.md
Normal file
@@ -0,0 +1,139 @@
|
||||
# Recipes
|
||||
|
||||
## URL Import
|
||||
Adding a recipe can be as easy as clicking in the bottom-right corner, copying the recipe URL into Mealie and letting the web scraper organize information. Currently this scraper is implemented with [recipe-scrapers](https://github.com/hhursev/recipe-scrapers). 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.
|
||||
|
||||
!!! tip
|
||||
You can find a list of some of the supported sites in the recipe-scrapers repo. If you're site isn't supported, you can work with the recipe-scrapers team to implement it and we can down-stream those changes into Mealie.
|
||||
|
||||

|
||||
|
||||
## Using Bookmarklets
|
||||
|
||||
You can use bookmarklets to generate a bookmark that will take your current location, and open a new tab that will try to import that URL into Mealie.
|
||||
|
||||
You can use a [bookmarklet generator site](https://caiorss.github.io/bookmarklet-maker/) and the code below to generate a bookmark for your site. Just change the `http://localhost:8080` to your sites web address and follow the instructions. Note that there is no trailing `/`.
|
||||
|
||||
```js
|
||||
var url = document.URL ;
|
||||
var mealie = "http://localhost:8080"
|
||||
var dest = mealie + "/?recipe_import_url=" + url
|
||||
window.open(dest, '_blank')
|
||||
```
|
||||
|
||||
## Recipe Editor
|
||||
|
||||
{: align=right style="height:225px;width:275px"}
|
||||
Recipes can be edited and created via the UI. This is done with both a form based approach where you have a UI to work with as well as with a in browser JSON Editor. The JSON editor allows you to easily copy and paste data from other sources.
|
||||
|
||||
You can also add a custom recipe with the UI editor built into the web view. Using the `+` button on the site.
|
||||
|
||||
### Recipe Settings
|
||||
|
||||
Settings for a specific recipe can be adjusted in the settings menu inside the editor. Currently the settings supports
|
||||
|
||||
- Settings a Recipe to Public/Private
|
||||
- Show Nutrition Values
|
||||
- Show Assets
|
||||
- Landscape Mode (Coming Soon)
|
||||
|
||||
!!! note
|
||||
Recipes set to private will only be displayed when a user is logged in. Currently there is no way to generate a share-link for a private recipe, but it is on the roadmap.
|
||||
|
||||
### Recipe Assets
|
||||
|
||||
While in the editor you also have an opportunity to upload any asset to your recipe. There are several icons that you can choose from or you can choose an arbitrary file icon. Once uploaded you can view or download the asset when viewing the page.
|
||||
|
||||
!!! tip
|
||||
You can get a link to an asset to embed in a recipe step by select the copy icon in editor mode.
|
||||
|
||||
### 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.
|
||||
|
||||
### Example
|
||||
```json
|
||||
{
|
||||
"id": 263,
|
||||
"name": "Homemade Mac and Cheese Bites",
|
||||
"slug": "homemade-mac-and-cheese-bites",
|
||||
"image": "no image",
|
||||
"description": "These are so simple and the perfect finger food ideal for serving kids and as an appetizer! These are DELICIOUS",
|
||||
"recipeCategory": [],
|
||||
"tags": [],
|
||||
"rating": null,
|
||||
"dateAdded": "2021-06-07",
|
||||
"dateUpdated": "2021-06-07T16:23:10.254840",
|
||||
"recipeYield": null,
|
||||
"recipeIngredient": [
|
||||
"½ pound elbow macaroni",
|
||||
"2 Tablespoons butter",
|
||||
"2 Tablespoons flour",
|
||||
"1½ cups milk",
|
||||
"2 cups shredded sharp cheddar cheese",
|
||||
"2 ounces cream cheese",
|
||||
"½ teaspoon salt",
|
||||
"¼ teaspoon pepper",
|
||||
"1 egg beaten"
|
||||
],
|
||||
"recipeInstructions": [
|
||||
{
|
||||
"title": "Preperation",
|
||||
"text": "Preheat oven to 400 degrees F."
|
||||
},
|
||||
{
|
||||
"title": "",
|
||||
"text": "Spray mini muffin tins with cooking spray."
|
||||
},
|
||||
{
|
||||
"title": "",
|
||||
"text": "Cook pasta according to packaged directions and set aside."
|
||||
},
|
||||
{
|
||||
"title": "Cooking",
|
||||
"text": "In a medium size pan combine butter and flour over medium heat. Whisk until butter is melted and mixture is smooth. Slowly add milk and bring to a simmer. Add 1½ cups of the cheese, cream cheese, salt and pepper. Stir until smooth and creamy. Remove from heat."
|
||||
},
|
||||
{
|
||||
"title": "",
|
||||
"text": "In a large mixing bowl, carefully stir pasta, cheese sauce, and egg until evenly mixed and pasta is evenly coated."
|
||||
},
|
||||
{
|
||||
"title": "",
|
||||
"text": "Spoon mac and cheese into mini muffin tins and top each with a small pinch of remaining cheese. Bake at 400 degrees F for 15 minutes or until golden brown."
|
||||
},
|
||||
{
|
||||
"title": "",
|
||||
"text": "Allow to cool 5 minutes before gently removing the bites."
|
||||
}
|
||||
],
|
||||
"nutrition": {
|
||||
"calories": null,
|
||||
"fatContent": null,
|
||||
"proteinContent": null,
|
||||
"carbohydrateContent": null,
|
||||
"fiberContent": null,
|
||||
"sodiumContent": null,
|
||||
"sugarContent": null
|
||||
},
|
||||
"tools": [],
|
||||
"totalTime": null,
|
||||
"prepTime": null,
|
||||
"performTime": null,
|
||||
"settings": {
|
||||
"public": true,
|
||||
"showNutrition": true,
|
||||
"showAssets": true,
|
||||
"landscapeView": true
|
||||
},
|
||||
"assets": [],
|
||||
"notes": [],
|
||||
"orgURL": "https://www.chef-in-training.com/homemade-mac-and-cheese-bites/",
|
||||
"extras": {},
|
||||
"comments": []
|
||||
}
|
||||
```
|
||||
59
docs/docs/documentation/toolbox/notifications.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# External Notifications
|
||||
|
||||
## Apprise
|
||||
|
||||
Using the [Apprise](https://github.com/caronc/apprise/) library Mealie is able to provide notification services for nearly every popular service. Some of our favorites are...
|
||||
|
||||
- [Gotify](https://github.com/caronc/apprise/wiki/Notify_gotify)
|
||||
- [Discord](https://github.com/caronc/apprise/wiki/Notify_discord)
|
||||
- [Home Assistant](https://github.com/caronc/apprise/wiki/Notify_homeassistant)
|
||||
- [Matrix](https://github.com/caronc/apprise/wiki/Notify_matrix)
|
||||
- [Pushover](https://github.com/caronc/apprise/wiki/Notify_pushover)
|
||||
|
||||
But there are many more to choose from! Take a look at their wiki for information on how to create their URL formats that you can use to create a notification integration in Mealie.
|
||||
|
||||
|
||||
## Subscribe Events
|
||||
There are several categories of events that mealie logs that can be broadcast with the notifications feature. You can also see a feed of your events in the Admin Dashboard
|
||||
|
||||
- General Events
|
||||
- Application Startup
|
||||
- Recipe Events
|
||||
- Create Recipe
|
||||
- Delete Recipe
|
||||
- Database Events
|
||||
- Export/Import
|
||||
- Database Initialization
|
||||
- Scheduled Events
|
||||
- MealPlan Webhooks Sent
|
||||
- Group Events
|
||||
- Create/Delete Groups
|
||||
- User Events
|
||||
- User Creation
|
||||
- User Sign-up
|
||||
- Sign-up Token Creation
|
||||
- Invalid login attempts
|
||||
|
||||
In most cases the events will also provide details on which user performed the action. Now you'll know when your grandma deletes your favorite recipe!
|
||||
|
||||
!!! info
|
||||
This is a new feature and we are still working through all the possibilities of events. if you have an idea for an event let us know!
|
||||
|
||||
|
||||
## Creating a New Notification
|
||||
|
||||
New events can be created and viewed in admin Toolbox `/admin/toolbox?tab=event-notifications`. Select the "+ Notification" button and you'll be provided with a dialog. Complete the form using the URL for the service you'd like to connect to. Before saving be sure to use the test feature.
|
||||
|
||||
!!! tip
|
||||
The feedback provided from the test feature indicates only if the URL you provided is valid, not if the message was successfully sent. Be sure to check the notification feed for the test message.
|
||||
|
||||

|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
#### Discord
|
||||

|
||||
|
||||
#### Gotify
|
||||

|
||||
17
docs/docs/documentation/toolbox/organize-tools.md
Normal file
@@ -0,0 +1,17 @@
|
||||
#Toolbox
|
||||
The toolbox gives you multiple options to clean-up and organize your recipes. You can get notified through different channels.
|
||||
You can access it through the 'Settings' menu or through the [dashboard](../admin/dashboard.md).
|
||||
|
||||
|
||||
## Category and Tag Editor
|
||||
|
||||
The 'Categories' and 'Tags' tab give you the option to bulk assign categories and tags to multiple recipes. You could also remove the unused ones or title case them all.
|
||||
|
||||

|
||||
|
||||
## Bulk Organize
|
||||
|
||||
The 'Organize' tab can be used to show all of the items that do not have any category or tag assigned.
|
||||
|
||||

|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
# Meal Planner
|
||||
|
||||
## Working with Meal Plans
|
||||
In Mealie you can create a meal plan based off the calendar inputs on the meal planner page. There is no limit to how long or how short a meal plan is. You may also create duplicate meal plans for the same date range. After selecting your date range, click on the card for each day and search through recipes to find your choice. After selecting a recipe for all meals save the plan. You can also randomly generate meal plans.
|
||||
## Working with Planner
|
||||
|
||||
To edit the meal in a meal plan simply select the edit button on the card in the timeline. Similarly, to delete a meal plan click the delete button on the card in the timeline. Currently there is no support to change the date range in a meal plan.
|
||||
In Mealie you can create a meal plan based off the calendar inputs on the meal planner page. There is no limit to how long or how short a meal plan is. You may also create duplicate meal plans for the same date range. After selecting your date range, click on the card for each day and search through recipes to find your choice. Add a side-dish if you prefer to. After selecting a recipe for all meals, save the plan. Selecting the 'No Recipe' button will allow you to add an entry without a recipe by providing a title and description.
|
||||
|
||||
You can also randomly generate meal plans with the dice-button at the bottom.
|
||||
|
||||
To edit the meal in a meal plan simply select the edit button on the card in the timeline. Similarly, to delete a meal plan click the delete button on the card in the timeline. Currently, there is no support to change the date range in a meal plan.
|
||||
|
||||
## Shopping Lists
|
||||
For any meal plan created you can view a breakdown of all the ingredients and use an experimental sort function to sort similarly ingredients. This is a very new feature and results of the auto sort may vary.
|
||||
|
||||

|
||||

|
||||
|
||||
33
docs/docs/documentation/users-groups/user-settings.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# User Settings
|
||||
|
||||
## Profile Settings
|
||||
In the users profile they are able to:
|
||||
|
||||
- Change Display Name
|
||||
- Change Email
|
||||
- Update Password
|
||||
- View Their Group
|
||||
- Update Profile Picture (Experimental)
|
||||
- Create API Keys
|
||||
|
||||
## Themes
|
||||
Color themes can be created and set from the UI in the Settings-Profile 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.
|
||||
|
||||

|
||||
|
||||
!!! tip
|
||||
Theme data is stored in local storage in the browser. Calling "Save colors and apply theme will refresh the local storage with the selected theme as well save the theme to the database.
|
||||
|
||||
## Group & Meal Plan
|
||||
In the meal planner section a user can select categories to be used as a part of the random recipe selector in the meal plan creator. If no categories are selected, all recipes will be used
|
||||
|
||||
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" prior to any changes taking affect server side.
|
||||
|
||||
## API Key Generation
|
||||
Users can quickly and easily generate API keys with the user interface. Provide a name for your token and then you are shown 1 time the generated API key. If you ever loose the API key you are not able to identify or retrieve it from the UI.
|
||||
|
||||

|
||||
|
||||
|
||||
!!! warning
|
||||
API keys are stored in plain text in the database.
|
||||
@@ -1,14 +0,0 @@
|
||||
# Usage
|
||||
|
||||
## Getting a Token
|
||||
Bla Bla
|
||||
|
||||
## 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.
|
||||
|
||||

|
||||
|
||||
Have Ideas? Submit a PR!
|
||||
@@ -1,122 +0,0 @@
|
||||
# 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 only SQLite is supported. Postrgres support is planned, however for most loads you may find SQLite performant enough.
|
||||
|
||||
|
||||
[Get Docker](https://docs.docker.com/get-docker/)
|
||||
|
||||
[Mealie on Dockerhub](https://hub.docker.com/r/hkotel/mealie)
|
||||
|
||||
- linux/amd64
|
||||
- linux/arm/v7
|
||||
- linux/arm64
|
||||
|
||||
|
||||
## Quick Start - Docker CLI
|
||||
Deployment with the Docker CLI can be done with `docker run` and specify the database type, in this case `sqlite`, setting the exposed port `9925`, mounting the current directory, and pull the latest image. After the image is up an running you can navigate to http://your.ip.addres:9925 and you'll should see mealie up and running!
|
||||
|
||||
```shell
|
||||
docker run \
|
||||
-e DB_TYPE='sqlite' \
|
||||
-p 9925:80 \
|
||||
-v `pwd`:'/app/data/' \
|
||||
hkotel/mealie:latest
|
||||
|
||||
```
|
||||
|
||||
!!! tip "Default Credentials"
|
||||
**Username:** changeme@email.com
|
||||
|
||||
**Password:** MyPassword
|
||||
|
||||
## Docker Compose with SQLite
|
||||
Deployment with docker-compose is the recommended method for deployment. The example below will create an instance of mealie available on port `9925` with the data volume mounted from the local directory. To use, create a docker-compose.yml file, paste the contents below and save. In the terminal run `docker-compose up -d` to start the container.
|
||||
|
||||
```yaml
|
||||
version: "3.1"
|
||||
services:
|
||||
mealie:
|
||||
container_name: mealie
|
||||
image: hkotel/mealie:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 9925:80
|
||||
environment:
|
||||
DB_TYPE: sqlite
|
||||
TZ: America/Anchorage
|
||||
volumes:
|
||||
- ./mealie/data/:/app/data
|
||||
|
||||
```
|
||||
|
||||
## Env Variables
|
||||
|
||||
| Variables | Default | Description |
|
||||
| ---------------- | ------------------ | ----------------------------------------------------------------------------------- |
|
||||
| DB_TYPE | sqlite | The database type to be used. Current Options 'sqlite' |
|
||||
| DEFAULT_GROUP | Home | The default group for users |
|
||||
| DEFAULT_USERNAME | changeme@email.com | The default username for the superuser |
|
||||
| DEFAULT_PASSWORD | MyPassword | The default password for the superuser |
|
||||
| TOKEN_TIME | 2 | The time in hours that a login/auth token is valid |
|
||||
| API_PORT | 9000 | The port exposed by backend API. **do not change this if you're running in docker** |
|
||||
| API_DOCS | True | Turns on/off access to the API documentation locally. |
|
||||
| TZ | UTC | Must be set to get correct date/time on the server |
|
||||
|
||||
|
||||
|
||||
|
||||
## Advanced
|
||||
!!! warning "Not Required"
|
||||
The items below are completely optional and are not required to manage or install your Mealie instance.
|
||||
|
||||
### Custom Caddy File
|
||||
The Docker image provided by Mealie contains both the API and the html bundle in one convenient image. This is done by using a proxy server to serve different parts of the application depending on the URL/URI. Requests sent to `/api/*` or `/docs` will be directed to the API, anything else will be served the static web files. Below is the default Caddyfile that is used to proxy requests. You can override this file by mounting an alternative Caddyfile to `/app/Caddyfile`.
|
||||
|
||||
```
|
||||
{
|
||||
auto_https off
|
||||
admin off
|
||||
}
|
||||
|
||||
:80 {
|
||||
@proxied path /api/* /docs /openapi.json
|
||||
|
||||
root * /app/dist
|
||||
encode gzip
|
||||
uri strip_suffix /
|
||||
|
||||
handle @proxied {
|
||||
reverse_proxy http://127.0.0.1:9000
|
||||
}
|
||||
|
||||
handle {
|
||||
try_files {path}.html {path} /
|
||||
file_server
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
## Deployed without Docker
|
||||
!!! error "Unsupported Deployment"
|
||||
If you are experiencing a problem with manual deployment, please do not submit a github issue unless it is related to an aspect of the application. For deployment help, the [discord server](https://discord.gg/QuStdQGSGK) is a better place to find support.
|
||||
|
||||
Alternatively, this project is built on Python and SQLite so you may run it as a python application on your server. This is not a supported options for deployment and is only here as a reference for those who would like to do this on their own. To get started you can clone this repository into a directory of your choice and use the instructions below as a reference for how to get started.
|
||||
|
||||
There are three parts to the Mealie application
|
||||
|
||||
- Frontend/Static Files
|
||||
- Backend API
|
||||
- Proxy Server
|
||||
|
||||
### Frontend/ Static Files
|
||||
The frontend static files are generated with `npm run build`. This is done during the build process with docker. If you choose to deploy this as a system application you must do this process yourself. In the project directory run `cd frontend` to change directories into the frontend directory and run `npm install` and then `npm run build`. This will generate the static files in a `dist` folder in the frontend directory.
|
||||
|
||||
### Backend API
|
||||
The backend API is build with Python, FastAPI, and SQLite and requires Python 3.9, and Poetry. Once the requirements are installed, in the project directory you can run the command `poetry install` to create a python virtual environment and install the python dependencies.
|
||||
|
||||
Once the dependencies are installed you should be ready to run the server. To initialize that database you need to first run `python mealie/db/init_db.py`. Then to start The web server, you run the command `uvicorn mealie.app:app --host 0.0.0.0 --port 9000`
|
||||
|
||||
|
||||
### Proxy Server
|
||||
You must use a proxy server to server up the static files created with `npm run build` and proxy requests to the API. In the docker build this is done with Caddy. You can use the CaddyFile in the section above as a reference. One important thing to keep in mind is that you should drop any trailing `/` in the url. Not doing this may result in failed API requests.
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# Organizing Recipes
|
||||
|
||||
!!! tip
|
||||
Below is a suggestion of guidelines my wife and I use for organizing our recipes within Mealie. Mealie is fairly flexible, so feel free to utilize how you'd like! 👍
|
||||
|
||||
In the diagram below you will see what we came up with using the new custom pages feature. The large circles indicate pages, and the rectangles indicate categories. We've grouped several 'like' categories with each other as a way to quickly find similar items.
|
||||
|
||||

|
||||
@@ -1,90 +0,0 @@
|
||||
# Recipes
|
||||
|
||||
## URL Import
|
||||
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
|
||||
Recipes can be edited and created via the UI. This is done with both a form based approach where you have a UI to work with as well as with a in browser JSON Editor. The JSON editor allows you to easily copy and paste data from other sources.
|
||||
|
||||
You can also add a custom recipe with the UI editor built into the web view.
|
||||
|
||||
## 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.
|
||||
|
||||
### Example
|
||||
```json
|
||||
{
|
||||
_id: ObjectId('5fcdc3d715f131e8b191f642'),
|
||||
name: 'Oat and Pecan Brittle Cookies',
|
||||
description: 'A gorgeously textured cookie with crispy-edges, a chewy center, toasty pecans, and tiny crispy pecan brittle bits throughout.',
|
||||
image: 'oat-and-pecan-brittle-cookies.jpg',
|
||||
recipeYield: 'Makes about 18',
|
||||
recipeIngredient: [
|
||||
'1¼ cups (142 g) coarsely chopped pecans',
|
||||
'¾ cup (150 g) granulated sugar',
|
||||
'4 Tbsp. (½ stick) unsalted butter',
|
||||
'½ tsp. baking soda',
|
||||
'½ tsp. Diamond Crystal or ¼ tsp. Morton kosher salt',
|
||||
'1 cup (2 sticks) unsalted butter, cut into 16 pieces, divided',
|
||||
'1⅓ cups (173 g) all-purpose flour',
|
||||
'2 tsp. Diamond Crystal or 1 tsp. Morton kosher salt',
|
||||
'1 tsp. baking soda',
|
||||
'2 cups (200 g) old-fashioned oats, divided',
|
||||
'¾ cup (packed; 150 g) dark brown sugar',
|
||||
'½ cup (100 g) granulated sugar',
|
||||
'2 large eggs',
|
||||
'1 Tbsp. vanilla extract'
|
||||
],
|
||||
recipeInstructions: [
|
||||
{
|
||||
'@type': 'HowToStep',
|
||||
text: 'Place a rack in middle of oven; preheat to 350°. Toast pecans on a small rimmed baking sheet, tossing halfway through, until slightly darkened and fragrant, 8–10 minutes. Let cool.'
|
||||
},
|
||||
{
|
||||
'@type': 'HowToStep',
|
||||
text: 'Line another small rimmed baking sheet with a Silpat baking mat. Cook granulated sugar, butter, and 2 Tbsp. water in a small saucepan over medium-low heat, stirring gently with a heatproof rubber spatula, until sugar is dissolved. Increase heat to medium and bring syrup to a rapid simmer. Cook, without stirring, swirling pan often, until syrup turns a deep amber color, 8–10 minutes. Immediately remove saucepan from heat and stir in pecans. Once pecans are well coated, add baking soda and salt and stir to incorporate (mixture will foam and sputter as baking soda aerates caramel). Working quickly (it will harden fast), scrape mixture onto prepared baking sheet and spread into a thin layer. Let cool completely, 5–10 minutes. Chop into pea-size pieces; set aside.'
|
||||
},
|
||||
{
|
||||
'@type': 'HowToStep',
|
||||
text: 'Place half of butter (½ cup) in the bowl of a stand mixer. Bring remaining butter to a boil in a small saucepan over medium-low heat, stirring often with a heatproof rubber spatula. Cook, scraping bottom and sides of pan constantly, until butter sputters, foams, and, eventually, you see browned bits floating on the surface, 5–7 minutes. Pour brown butter over butter in stand mixer bowl, making sure to scrape in all the browned bits. Let sit until butter begins to resolidify, about 30 minutes.'
|
||||
},
|
||||
{
|
||||
'@type': 'HowToStep',
|
||||
text: 'Pulse flour, salt, and baking soda in a food processor to combine. Add half of reserved pecan brittle and 1 cup oats; process in long pulses until oats and brittle are finely ground.'
|
||||
},
|
||||
{
|
||||
'@type': 'HowToStep',
|
||||
text: 'Add brown sugar and granulated sugar to butter and beat with paddle attachment on medium speed until light and smooth but not fluffy, about 2 minutes. Scrape down sides of bowl and add eggs and vanilla. Beat until very light and satiny, about 1 minute. Scrape down sides of bowl and add flour mixture; beat on low speed until no dry spots remain and you have a soft, evenly mixed dough. Add remaining half of brittle and remaining 1 cup oats; mix on low speed just to distribute. Fold batter several times with a spatula to ensure everything is evenly mixed.'
|
||||
},
|
||||
{
|
||||
'@type': 'HowToStep',
|
||||
text: 'Using a 2-oz. scoop or ¼-cup measuring cup, scoop level portions of dough to make 18 cookies. Place on a parchment-lined baking sheet, spacing as close together as possible (you’ll space them out before baking). Cover tightly with plastic wrap and chill at least 12 hours and up to 2 days. (If you’re pressed for time, a couple hours will do; cookies just won’t be as chewy.)'
|
||||
},
|
||||
{
|
||||
'@type': 'HowToStep',
|
||||
text: 'When ready to bake, place racks in upper and lower thirds of oven; preheat to 350°. Line 2 large rimmed baking sheets with parchment paper. Arrange 6 cookies on each prepared baking sheet, spacing at least 3" apart.'
|
||||
},
|
||||
{
|
||||
'@type': 'HowToStep',
|
||||
text: 'Bake cookies, rotating baking sheets top to bottom and front to back after 12 minutes, until dark golden brown around the edges, 16–20 minutes. Let cookies cool 5 minutes on baking sheets, then transfer cookies to a wire rack with a spatula and let cool completely.'
|
||||
},
|
||||
{
|
||||
'@type': 'HowToStep',
|
||||
text: 'Carefully move a rack to middle of oven. Arrange remaining dough on one of the baking sheets (it’s okay if it’s still warm). Bake as before (this batch might go a bit faster).\nDo ahead: Dough can be formed 2 months ahead; chill dough balls at least 2 hours before transferring to freezer. Once frozen solid, store in resealable plastic freezer bags and keep frozen. No need to thaw before baking, but you may need to add a minute or two to the baking time. Cookies can be baked 5 days ahead; store airtight at room temperature.'
|
||||
}
|
||||
],
|
||||
slug: 'oat-and-pecan-brittle-cookies',
|
||||
tags: [],
|
||||
categories: [],
|
||||
dateAdded: ISODate('2020-12-07T05:55:35.434Z'),
|
||||
notes: [],
|
||||
orgURL: 'https://www.bonappetit.com/recipe/oat-and-pecan-brittle-cookies',
|
||||
rating: 3
|
||||
}
|
||||
```
|
||||
8
docs/docs/overrides/main.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %} {% block analytics %}
|
||||
<script
|
||||
async
|
||||
defer
|
||||
data-domain="hay-kot.github.io/mealie"
|
||||
src="https://plausible.io/js/plausible.js"
|
||||
></script>
|
||||
{% endblock %}
|
||||
@@ -1,18 +0,0 @@
|
||||
# Site Settings
|
||||
Your sites settings panel can only be accessed by administrators. This where you can customize your site for all users.
|
||||
|
||||
|
||||
## Home Page Settings
|
||||
| Option | Description |
|
||||
| ------------------ | -------------------------------------------------------------- |
|
||||
| Language | The default site language |
|
||||
| Show Recent | To display the recent recipes section on the home page |
|
||||
| Card Per Section | The amount of cards displayed in each section on the home page |
|
||||
| Home Page Sections | Category sections to include on the home page |
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
# User Settings
|
||||
|
||||
A user will be able to access 3 sections in their admin panel. The user profile, themes, group/meal-plan settings section.
|
||||
|
||||
## Profile Settings
|
||||
In as users profile they are able to
|
||||
|
||||
- Change Display Name
|
||||
- Change Email
|
||||
- Update Password
|
||||
- View Their Group
|
||||
- Upgrade Profile Picture (Experimental)
|
||||
|
||||
## Themes
|
||||
Color themes can be created and set from the UI in the users 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.
|
||||
|
||||

|
||||
|
||||
!!! tip
|
||||
Theme data is stored in local storage in the browser. Calling "Save colors and apply theme will refresh the local storage with the selected theme as well save the theme to the database.
|
||||
|
||||
## Group & Meal Plan
|
||||
In the meal planner section a user can select categories to be used as apart of the random recipe selector in the meal plan creator. If no categories are selected, all recipes will be used
|
||||
|
||||
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" prior to any changes taking affect server side.
|
||||
@@ -1,5 +1,7 @@
|
||||
site_name: Mealie
|
||||
demo_url: https://mealie-demo.hay-kot.dev/
|
||||
site_url: https://hay-kot.github.io/mealie/
|
||||
use_directory_urls: true
|
||||
theme:
|
||||
palette:
|
||||
# Light mode
|
||||
@@ -17,7 +19,7 @@ theme:
|
||||
custom_dir: docs/overrides
|
||||
features:
|
||||
- navigation.top
|
||||
- navigation.instant
|
||||
# - navigation.instant
|
||||
- navigation.expand
|
||||
- navigation.sections
|
||||
- navigation.tabs
|
||||
@@ -43,30 +45,44 @@ markdown_extensions:
|
||||
|
||||
extra_css:
|
||||
- assets/stylesheets/custom.css
|
||||
extra_javascript:
|
||||
- assets/js/extra.js
|
||||
repo_url: https://github.com/hay-kot/mealie
|
||||
repo_name: hay-kot/mealie
|
||||
|
||||
nav:
|
||||
- Home: "index.md"
|
||||
- Getting Started:
|
||||
- Introduction: "getting-started/introduction.md"
|
||||
- Installation: "getting-started/install.md"
|
||||
- Updating: "getting-started/updating.md"
|
||||
- Working With Recipes: "getting-started/recipes.md"
|
||||
- Organizing Recipes: "getting-started/organizing-recipes.md"
|
||||
- Planning Meals: "getting-started/meal-planner.md"
|
||||
- iOS Shortcuts: "getting-started/ios.md"
|
||||
- Site Administration:
|
||||
- User Settings: "site-administration/user-settings.md"
|
||||
- Site Settings: "site-administration/site-settings.md"
|
||||
- Building Pages: "site-administration/building-pages.md"
|
||||
- User Management: "site-administration/user-management.md"
|
||||
- Backups and Restore: "site-administration/backups-and-exports.md"
|
||||
- Recipe Migration: "site-administration/migration-imports.md"
|
||||
- API Usage:
|
||||
- Getting Started: "api-usage/getting-started.md"
|
||||
- Home Assistant: "api-usage/home-assistant.md"
|
||||
- Bulk Url Import: "api-usage/bulk-url-import.md"
|
||||
- Introduction: "documentation/getting-started/introduction.md"
|
||||
- Installation: "documentation/getting-started/install.md"
|
||||
- Updating: "documentation/getting-started/updating.md"
|
||||
- API: "documentation/getting-started/api-usage.md"
|
||||
|
||||
- Recipes:
|
||||
- Working With Recipes: "documentation/recipes/recipes.md"
|
||||
- Organizing Recipes: "documentation/recipes/organizing-recipes.md"
|
||||
|
||||
- Users & Groups:
|
||||
- User Settings: "documentation/users-groups/user-settings.md"
|
||||
- Planning Meals: "documentation/users-groups/meal-planner.md"
|
||||
|
||||
- Admin:
|
||||
- Dashboard: "documentation/admin/dashboard.md"
|
||||
- Site Settings: "documentation/admin/site-settings.md"
|
||||
- Building Pages: "documentation/admin/building-pages.md"
|
||||
- User Management: "documentation/admin/user-management.md"
|
||||
- Backups and Restore: "documentation/admin/backups-and-exports.md"
|
||||
- Recipe Migration: "documentation/admin/migration-imports.md"
|
||||
|
||||
- Toolbox:
|
||||
- External Notifications: "documentation/toolbox/notifications.md"
|
||||
- Organization Tools: "documentation/toolbox/organize-tools.md"
|
||||
|
||||
- Community Guides:
|
||||
- iOS Shortcuts: "documentation/community-guide/ios.md"
|
||||
- Reverse Proxy (SWAG): "documentation/community-guide/swag.md"
|
||||
- Home Assistant: "documentation/community-guide/home-assistant.md"
|
||||
- Bulk Url Import: "documentation/community-guide/bulk-url-import.md"
|
||||
- API Reference: "api/redoc.md"
|
||||
- Contributors Guide:
|
||||
- Non-Code: "contributors/non-coders.md"
|
||||
@@ -75,8 +91,12 @@ nav:
|
||||
- Code Contributions: "contributors/developers-guide/code-contributions.md"
|
||||
- Dev Getting Started: "contributors/developers-guide/starting-dev-server.md"
|
||||
- Guidelines: "contributors/developers-guide/general-guidelines.md"
|
||||
- Style Guide: "contributors/developers-guide/style-guide.md"
|
||||
- Development Road Map: "roadmap.md"
|
||||
- Change Log:
|
||||
- v0.5.2 Misc Updates: "changelog/v0.5.2.md"
|
||||
- v0.5.1 Bug Fixes: "changelog/v0.5.1.md"
|
||||
- v0.5.0 General Upgrades: "changelog/v0.5.0.md"
|
||||
- v0.4.3 Hot Fix: "changelog/v0.4.3.md"
|
||||
- v0.4.2 Backend/Migrations: "changelog/v0.4.2.md"
|
||||
- v0.4.1 Frontend/UI: "changelog/v0.4.1.md"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
VUE_APP_API_BASE_URL=http://localhost:9000
|
||||
VUE_APP_API_BASE_URL=http://localhost:9000
|
||||
PREVIEW_BUNDLE=true
|
||||
@@ -1,5 +1,3 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
presets: ["@vue/cli-plugin-babel/preset"],
|
||||
};
|
||||
|
||||