Tandoor Recipes Documentation
repository·develop·Indexed 27 days ago
https://github.com/tandoorrecipes/recipesA comprehensive digital recipe management system for power users to organize collections, plan meals, and manage shopping lists. Features include AI-assisted recipe processing, mobile optimization, and the ability to import recipes from thousands of websites via ld+json or microdata. The documentation provides guides for installation, usage, and developer instructions for creating new import/export integration classes using Python and Vue3.
What's inside Tandoor Recipes
- Tandoor Recipes is a digital recipe manager designed for power users to organize, plan, and share recipe collections. It includes features for meal planning, shopping lists, AI-assisted recipe processing, and cookbook organization. The application is optimized for mobile use and supports localization in multiple languages.
Configure Connectors in TandoorRecipes
developConnectors allow TandoorRecipes to translate actions into API calls for external services. Note that connectors are currently in a beta stage.
Security Warning: Because connectors store authentication information to push data to external providers, it is highly recommended to use read-only accounts, separate accounts, or app passwords whenever possible.
Deploy Apache + Traefik + Tandoor with Sub-Paths
developThis community-contributed setup uses Docker Compose, Traefik, and Apache to host Tandoor under a specific sub-path.
Key Configuration Requirements:
- Environment Variables: You must set
SCRIPT_NAME,STATIC_URL, andMEDIA_URLin therecipesservice to match your sub-path routing. - Volumes: The
apacheservice needs read-only access to thestaticandmediadirectories, while therecipesservice needs read-write access to them. - Traefik Labels: Configure Traefik routers to use
PathPrefixfor both the Apache service and the Recipes service. - Apache Configuration: Use
Aliasdirectives to map the static and media URLs to the correct local paths.
# recipes service environment environment: - SCRIPT_NAME=/<sub path> - STATIC_URL=/<www path>/static/ - MEDIA_URL=/<www path>/media/ # apache configuration Alias /<www path>/static/ /var/www/recipes/static/ Alias /<www path>/media/ /var/www/recipes/media/ <Directory "/var/www/recipes/"> Require all granted </Directory>- Environment Variables: You must set
Install Tandoor using Docker CLI
developYou can run the Tandoor container directly using
docker run. This image (vabene1111/recipes) exposes the application on port80via an integrated nginx webserver. You must replaceSECRET_KEYandPOSTGRES_PASSWORDwith your own values.docker run -d \ -v "$(pwd)"/staticfiles:/opt/recipes/staticfiles \ -v "$(pwd)"/mediafiles:/opt/recipes/mediafiles \ -p 80:80 \ -e SECRET_KEY=YOUR_SECRET_KEY \ -e DB_ENGINE=django.db.backends.postgresql \ -e POSTGRES_HOST=db_recipes \ -e POSTGRES_PORT=5432 \ -e POSTGRES_USER=djangodb \ -e POSTGRES_PASSWORD=YOUR_POSTGRES_SECRET_KEY \ -e POSTGRES_DB=djangodb \ --name recipes_1 \ vabene1111/recipesSetup prettier Watcher for Vue and Docs
developConfigure a File Watcher to format Vue files and documentation using
prettier.- Navigate to
File -> Settings -> Tools -> File Watchersand click the '+'. - Set 'File Type' to 'Any'.
- Create a custom 'Scope' by clicking the three dots next to 'Scope' and adding a new scope with these details:
- Name:
prettier - Pattern:
file:vue/src//*||file:vue3/src//*||file:docs//*
- Name:
- Configure the watcher arguments:
--cwd $ProjectFileDir$\vue prettier -w --config $ProjectFileDir$\.prettierrc $FilePath$
--cwd $ProjectFileDir$\vue prettier -w --config $ProjectFileDir$\.prettierrc $FilePath$- Navigate to
Install Project and Frontend Requirements
developInstall Python dependencies using the virtual environment and build the Vue3 frontend.
Python dependencies:
/var/www/recipes/bin/pip3 install -r requirements.txtFrontend build: Navigate to the
./vue3directory to install and build the assets:cd ./vue3 yarn install yarn buildUse kitshn mobile app for Tandoor
developkitshn is an unofficial Tandoor recipes client maintained by Aimo. It is available on both iOS and Android platforms.
- Website: https://kitshn.app/
- Apple App Store: Download kitshn
- Google Play Store: Download kitshn
Install Tandoor Recipes via Docker
developTandoor Recipes can be deployed easily using Docker. Official installation guides and examples for specific platforms like Kubernetes, Unraid, and Synology are available in the external documentation.
For quick setup, refer to the Docker installation guide at
https://docs.tandoor.dev/install/docker/.https://docs.tandoor.dev/install/docker/Populate Recipe steps, ingredients, and keywords
developTo build a complete recipe during import, you need to interact with several related models:
Step,Ingredient,Food,Unit, andKeyword.Keywords
Use
Keyword.objects.get_or_create()to add keywords to the recipe. Always passspace=self.request.spaceto ensure the keyword belongs to the correct user space.Steps and Ingredients
- Create a Step: Use
Step.objects.create(). You should provideinstruction,order, andspace. You can also setshow_ingredients_tablebased on user preferences viaself.request.user.userpreference.show_step_ingredients. - Create Ingredients: For each ingredient in a step, use
Ingredient.objects.create(). This requires:food: UseFood.objects.get_or_create(name=..., space=self.request.space)[0].unit: UseUnit.objects.get_or_create(name=..., space=self.request.space)[0].amount: The numeric quantity.space:self.request.space.
- Link to Recipe: Use
recipe_object.steps.add(step)andrecipe_object.keywords.add(keyword)to associate these objects with the mainRecipeinstance.
from cookbook.models import Recipe, Keyword, Step, Ingredient, Food, Unit def get_recipe_from_file(self, file) -> Recipe: recipe_object = Recipe.objects.create( name = your_recipe_name, created_by = self.request.user, internal = True, space = self.request.space, ) # Logic for creating keywords for keyword in parsed_file.keywords: recipe_object.keywords.add( Keyword.objects.get_or_create( space=self.request.space, name=keyword)[0]) i = 0 for line in parsed_file: # Logic for creating steps step = Step.objects.create( instruction=line.instruction_string, order=i, space=self.request.space, show_ingredients_table=self.request.user.userpreference.show_step_ingredients) # Logic for creating ingredients within the step for ingredient in line.ingredients: step.ingredients.add( Ingredient.objects.create( food=Food.objects.get_or_create(name=ingredient.name, space=self.request.space)[0], unit=Unit.objects.get_or_create(name=ingredient.quantity.unit, space=self.request.space)[0], amount=ingredient.quantity.amount, space=self.request.space, )) recipe_object.steps.add(step) i += 1 recipe_object.save() return recipe_object- Create a Step: Use
Install Tandoor Recipes on Arch Linux via AUR
developThis is a community-contributed installation guide for pacman-based distributions like Arch Linux. It uses
systemdintegration, socket activation, and runs as a non-root user.Warning: This guide has not been verified for Tandoor 2. Tandoor 2 integrates an Nginx service inside the default Docker container and exposes services on port 80 instead of 8080.
To install, clone the AUR package and build it using
makepkg:- Clone the repository.
- Build and install using
makepkg -sior your preferred AUR helper.
git clone https://aur.archlinux.org/tandoor-recipes-git.git cd tandoor-recipes-git makepkg -siContribute code to Tandoor
developDevelopers can contribute by fixing issues, adding features, or writing scripts using Tandoor's API.
Before starting code contributions:
- Review the general contribution guidelines.
- Configure your IDE using the provided VSCode or PyCharm settings.
- Consult specific feature guides at /contribute/feature_contrib/featureguides/ for guidance on implementing certain types of features.
Access the Tandoor Recipes Demo
developIf you want to try the application before installing it, a live demo is available athttps://app.tandoor.dev/e/demo-auto-login/.https://app.tandoor.dev/e/demo-auto-login/