Recibase is a recipe ingestion and navigation service, designed to ease the choosing of what to cook.
Recibase works like so:
- Write Scala files containing or linking to your recipes
- Recibase spins up a recipe API
- The frontend lets you browse recipes by name, ingredient and more
There is also a separate CDN to host images of the cooked recipes and a Meal Chooser for filtering a complete list of everything we cook.
Recibase is a long term project which will grow depending on what features are useful or interesting to develop. The current plan is:
Standardise ingredients schemaAdd a bunch of recipesAdd any small but useful features to improve frontend- Improve ingestion debugging capabilities (churn/reporting/etc.)
- Continue to develop schema
- Migrate frontend to separate React client and REST API
- Add microservices for useful client-side functionality (favouriting, etc.)
- ???
- Profit
- SBT
- Java 17
- Clone Recibase
- Open a command prompt inside the cloned repo
sbt run- Wait until the program says
started at http://[::]:8081/ - Visit
localhost:8081/recipes/
If you want to use the web interface you'll need to set up the frontend too
I've been using AI (yes, I know) to fix the disparity of our meal collection mostly existing outside Recibase, by scanning the various photos we have of recipe cards and book pages. Here's prompts used to get recipe parts from photos:
This photo contains the steps to cook a recipe, split into two columns. Please OCR the recipe's method, ignoring any red text. The output should be a JSON array of strings. Ask for any clarification if needed. Replace any dashes "–" with "-" and any apostraphes "’" with "'". Newlines indicate new array elements. Array elements should always end with a full stop.
Please OCR the recipes in the
photographsdirectory and write a Scala recipe for each recipe. Create the new Scala files in thesrc/main/scala/se/reciba/api/recibase/recipesdirectory. Each subfolder in thephotographsis a recipe. Use the name of each subfolder as the name of the recipe. Structure the new recipe Scala files similarly to the existing recipe Scala files. Ignore fields you do not have data for likeimage,notesortags. Thepermalinkof the recipe should be the name of the recipe lowercase then kebab-case formatted. The name of each recipe Scala file should be the recipe name with no spaces and Studly Case formatted. If a step in the recipe's method is too long split it into two steps.
If you have any questions or want to help out feel free to open an issue
Meals that we cook are defined in two places:
- Entire recipes: Ingredients, preparation steps and more
- Meal Stubs: References to full recipes stored elsewhere or from memory. They're like library reference cards
Both have tags, to help with filtering our list of meals in order to choose what to cook. Tags are defined here. Every recipe has tags defined as a comma separated list inside the recipe's file, like so:
val tags = Set(Tag.Vegetarian, Tag.Slow, Tag.Scales)Every Meal Stub has its tags defined as the 2nd parameter:
MealStub("Aubergine curry", Set(Tag.Vegan, Tag.Scales, Tag.Slow))The 3rd parameter is an optional link to the full recipe, which is only defined if that recipe exists on the internet.