Skip to content

flecmart/mealplan

Repository files navigation

mealplan

Custom Mealplanning and recipe management.

Abstract

In our household we need an overview of our recipes and a calendar that we can plan our meals within the next week(s).

Install

Dependencies:

  1. Clone the repository:
git clone https://github.com/flecmart/mealplan.git
  1. Create your environment.conf from environment.conf.example

  2. Build and run with docker compose:

cd mealplan
docker-compose up -d

The app is now reachable at localhost:5000

Features

Manage recipes in a cookbook

example image cookbook

Show recipes with ingredients and instructions

example image recipe view

Assign recipes in a calendar to plan meals

Weekly View:

example image planning week

Monthly View:

example image planning month

  • calendar UI is pretty basic to potentially run the mealplan on an e-ink display (I plan to implement this in the future)
  • use of symbols to represent meals in the calendar to make the plan readable for the smallest family members
  • meals can be rescheduled with drag & drop

Generate shopping list based on ingredients & export to todoist

example image shopping list

  • time range for shopping list selectable in UI
  • mealplan tries to aggregate ingredients with natural language processing
  • shopping list or certain ingredients can then be exported to todoist and are therefore synced on your mobile device for the actual shopping

Recreate DB

Just remove the volume with the following command:

docker volume rm mealplan_db_volume

Then restart the app.

Backup and restore DB

Backup: https://github.com/prodrigestivill/docker-postgres-backup-local

Restore:

Replace the backupfile name, $CONTAINER, $USERNAME and $DBNAME from the following command:

zcat backupfile.sql.gz | docker exec --tty --interactive $CONTAINER psql --username=$USERNAME --dbname=$DBNAME -W

Inspiration & Development

Some code and ideas, especially the html templates and the use of fullcalendar.io are inspired by this project: https://github.com/digitaljosh/meal-planner. The data models & routing were reimplemented to match our personal requirements. The user authentication system was dropped as I wanted to avoid to do the authentication myself and just run the app as a docker service locally, potentially exposing it with a reverse proxy. Also the use of the spoonacular api to import recipes was replaced by using https://pypi.org/project/recipe-scrapers/ to support multiple recipe websites & languages.