developers have to eat, too
a flat, fast recipe website built in rust because i got tired of fancy recipe sites with 47 popups and a video that auto-plays at maximum volume.
just recipes.
- fast - rust + axum = instant page loads
- minimal ui - inspired by old github
- markdown export - because real developers keep their recipes in version control
- responsive - works on your phone when you're burning dinner and need instructions NOW
- github integration - add recipe via github issues
- fun 404 page - refresh it a few times
- clone this thing (repo)
cargo run(orcargo build --release)- open
http://127.0.0.1:3000 - profit? no, just recipes
- create
/recipes/directory - add recipe json files (see format below)
- set
GITHUB_OWNERandGITHUB_REPOenvironment variables - deploy to netlify/vercel/railway/wherever
- watch the recipes flow in (now, profit?)
how it works:
- user fills out "add recipe" form
- we redirect them to github with pre-filled issue
- you review, convert to json file, add to
/recipes/ - push to main
- site rebuilds automatically
- recipe appears
each recipe is a json file in /recipes/. here's what they look like:
{
"id": "some-uuid-here",
"title": "Late Night Grilled Cheese",
"description": "because 2am cravings don't care about nutrition",
"ingredients": [
"2 slices whatever bread you have",
"2 slices cheese (preferably real cheese)",
"butter. more than you think you need."
],
"instructions": [
"butter bread like your life depends on it",
"put cheese between bread slices",
"fry until golden brown",
"burn tongue slightly because you couldn't wait 30 seconds"
],
"tags": ["comfort food", "late night", "regret"],
"created_at": "2024-01-15T02:34:00Z",
"updated_at": "2024-01-15T02:34:00Z"
}if you're building something on top of this (please do, it's cool):
GET /api/recipes- all the recipesGET /api/recipes/:id- one specific recipeGET /api/recipes/:id/markdown- download as md filePOST /api/recipes/issue- generates github issue url for new recipe
i built this because:
- modern recipe sites are terrible
- i hate tracking cookies and want to burn them with the heat of a thousand suns
- sometimes i just want a recipe, not a lifestyle blog and 972 images
- developers keep recipes as markdown files anyway (right?)
- i wanted to learn more rust (tick ✅)
the goal: something that loads fast, looks simple, and gets out of your way.
- rust - because memory safety is important, even with recipes
- axum - web framework (mmmm)
- tokio - async runtime
- serde - json handling
- vanilla javascript - no frameworks, no build steps, no heavy-weight nonsense
mit. do whatever you want with it. seriously. fork it, deploy it, add features, break it, fix it. it's just recipes. i would just love a lil credit :)
found a bug? want a feature? have a recipe to share?
open an issue. or a pr. or both. i'm not your boss. but i will probably merge it
- sample recipes generated because empty sites are sad, im not a chef. please don't steal recipes and if you do, clearly note it, so i can at very least credit the writer.
- cooking puns created during moments of questionable decision-making
- the rust community for making async actually pleasant
ps: if you're reading this, you probably should be cooking instead of reading readme files. go make me something tasty.