- Python 71.9%
- TypeScript 13.3%
- Jinja 5.4%
- Gherkin 4.6%
- CSS 2.5%
- Other 2.3%
no-beef
This is a cattle_grid providing recipe functionality. Code for a rudimentary frontend is available at no-beef-web.
no-beef can be understood as a proof of concept of what one can implement with the tech stack described below. By replacing the recipe specific components with another domain, one can create a Fediverse platform for it.
Technology stack
no-beef is build on top of many other projects. Here is a list
Specifications
- cooklang, used as Format for the recipes
Backend
no-beef contains code related to recipes. The Fediverse interactions are managed by
- cattle_grid manages the connection to the Fediverse. cattle_grid is based on fastapi, faststream, pydantic, and sqlalchemy.
- cattle_hugs provides handling of Fediverse interactions
- muck_out instead of dealing with raw Fediverse objects, we use a normalized version.
Frontend
Used components for the frontend
- @tmlmt/cooklang-parser to parse cooklang recipes
- @helge/display-recipe display recipe
- @bovine/mucked_up_components to display Fediverse content
The display is done through a mix of preact and jinja2.
Publishing recipes
Currently publishing is done by calling the publish_recipe method with
the content
{
"actor": "http://local.test/actor/id",
"recipe": "Crack the @eggs{3} into a #blender, then add the @plain flour{125%g},\n@milk{250%ml} and @sea salt{1%pinch}, and blitz until smooth."
}
The meaning of method is explained for example in Cattle Drive Protocol.
Recipes are then serialized as ActivityPub objects as follows
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "http://local.test/recipes/objs/019b0991-bf02-7f38-ae61-c7b40b069ea1",
"type": "Note",
"attributedTo": "http://local.test/actor/id",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"http://local.test/actor/id/followers"
],
"published": "2025年12月10日T19:35:12Z",
"content": "Crack the @eggs{3} into a #blender, then add the @plain flour{125%g},<br>@milk{250%ml} and @sea salt{1%pinch}, and blitz until smooth.",
"url": [
{
"href": "http://local.test/recipes/019b0991-bf02-7f38-ae61-c7b40b069ea1",
"mediaType": "text/html",
"type": "Link"
}
],
"source": {
"content": "Crack the @eggs{3} into a #blender, then add the @plain flour{125%g},\n@milk{250%ml} and @sea salt{1%pinch}, and blitz until smooth.",
"mediaType": "text/cooklang"
}
}
Development
Run
docker compose up
The app will be available at http://localhost:2990/recipes/
Run pytest
Download schema
curl https://schemas.funfedi.dev/assets/activity-pub-object.schema.json \
-o ./resources/schemas/activity-pub-object.schema.json
and run tests
uv run pytest
Run JS build hook
uv run hatch build --hooks-only -t wheel
Feature testing
docker compose up --wait
docker compose run --name runner --rm cattle-grid-app ./test_shell.sh
behave