Skip to content

HumanCrafted/FoodBase-Template

Repository files navigation

FoodBase

A plain-text, markdown-first food vault schema for personal meal planning, grocery management, and nutrition tracking. No proprietary database. No lock-in. Works with any text editor — and with AI.

This repository is a blank template. Clone it, open it in Obsidian, and start filling in your own food data. Each folder contains one sample file showing the expected format.


Philosophy

The vault is the source of truth. Apps are replaceable skins on top of it.

All data lives as plain markdown files with YAML frontmatter. This means:

  • Works with any markdown editor (Obsidian, iA Writer, VS Code, or just a text editor)
  • Syncs via iCloud, Dropbox, Git, or anything else that handles files
  • Readable by humans and AI alike — no custom query interface needed
  • Never breaks because a SaaS product shut down or changed its API

The schema is designed to be Obsidian-compatible (including Obsidian Bases for filterable table views), but it requires nothing from Obsidian specifically. Every file is just a markdown file.


Vault Structure

FoodBase/
├── recipes/            # Full recipes with ingredients and instructions
├── food-nutrition/     # Individual food/ingredient items with macros
├── dog-food-nutrition/ # Pet food items with caloric density data
├── pantry/             # Home inventory by location (pantry/fridge/freezer)
├── menu-ideas/         # Browsable meal idea cards
├── menu-plan/          # Weekly meal plans (one file per week)
├── groceries/          # Weekly grocery lists (one file per week)
├── templates/          # Blank templates for each file type
├── recipes.base        # Obsidian Bases view for recipes
├── food-nutrition.base # Obsidian Bases view for foods
├── dog-food-nutrition.base
├── pantry.base
├── menu-ideas.base
├── menu-plan.base
└── groceries.base

Schemas

Recipe (recipes/)

Filename convention: kebab-case-title.md Template: templates/recipe.md

---
title: Classic Roast Chicken
category: dinner          # breakfast | lunch | dinner | snack | dessert | side | appetizer | drink | dog
cuisine: american         # italian | mexican | american | asian | mediterranean | other
servings: 4
prep_time: 20 min         # e.g. "15 min", "1 hr", "8 hrs 15 min"
cook_time: 1 hr 30 min
total_time: 1 hr 50 min   # prep_time + cook_time
tags: [chicken, weeknight]
nutrition: "[[food-nutrition/whole-milk]]"   # link to a food-nutrition file
source: https://example.com/recipe           # URL or book reference
---

## Ingredients

- [ ] 1 whole chicken (3.5–4 lbs)
- [ ] ...

## Instructions

1. [ ] Preheat oven to 425°F...
2. [ ] ...

## Notes

Optional notes, substitutions, or variations.

Notes on prep_time: Always account for all knife work and ingredient preparation implied by the recipe. "20 min" means 20 minutes of actual hands-on prep, including chopping, peeling, and measuring — not just mixing.


Food / Ingredient (food-nutrition/)

Filename convention: kebab-case-title.md Template: templates/food-nutrition.md

---
title: Whole Milk
brand: Generic            # omit if not applicable
category: ingredient      # breakfast | lunch | dinner | snack | beverage | condiment | ingredient
serving: 1 cup (244ml)    # describe the serving unit clearly
calories: 149
protein: 8                # grams
carbs: 12                 # grams
fat: 8                    # grams
fiber: 0                  # grams
sugar: 12                 # grams
---

The food-nutrition.base view sums all macro columns — useful for reviewing what's in a given meal or recipe if you link items together.


Dog Food (dog-food-nutrition/)

Filename convention: kebab-case-title.md Template: templates/dog-food-nutrition.md

---
title: Sample Chicken & Rice Formula
brand: Sample Brand Co.
qty: 13608              # total package weight in grams
upc: 000000000000
kcal_per_gram: 3.6
kcal_per_cup: 349
kcal_per_kg: 3600
kcal_per_treat:         # for treat items only; leave blank for kibble
---

Pantry Item (pantry/)

Filename convention: kebab-case-title.md Template: templates/pantry-item.md

---
title: Kosher Salt
category: spices          # produce | protein | dairy | dry-goods | canned | frozen | condiments | spices | snacks | beverages
location: spice-rack      # pantry | fridge | freezer | spice-rack
brand: Diamond Crystal
quantity: 1
unit: pkg                 # g | oz | lbs | cups | count | pkg | L | ml
expires:                  # YYYY-MM-DD; leave blank if not applicable
---

The pantry.base view sorts by location, giving you a quick view of what's on hand in each area of your kitchen.


Menu Idea (menu-ideas/)

Filename convention: kebab-case-title.md Template: templates/menu-idea.md

---
title: Roast Chicken with Vegetables
category: dinner          # breakfast | lunch | dinner | snack | dessert
cuisine: american
tags: [chicken, one-pan, family-friendly]
last_made: 2026-01-10    # YYYY-MM-DD; update after making the meal
recipe: "[[recipes/classic-roast-chicken]]"   # optional link to recipe file
source: https://example.com/recipe             # optional URL or book reference
---

Menu ideas are intentionally lightweight — they're discovery cards for browsing, not full recipes. Link to a recipes/ file when one exists.


Menu Plan (menu-plan/)

Filename convention: YYYY-Www.md (ISO week number format, e.g. 2026-W01.md) Template: templates/menu-plan.md

---
week: 2026-W01
starts: 2026-01-03   # date of the Saturday that starts the week
---

## Saturday
- Note: Optional note for the day.
- Weather: 38°F, partly cloudy
- Meal: Roast Chicken with Vegetables

## Sunday
- Note:
- Weather: 42°F, sunny
- Meal: Leftover chicken tacos

One file per week. The week runs Saturday–Friday. Weather is optional but useful for contextualizing meal choices in retrospect. The menu-plan.base view sorts by starts descending to show most recent weeks first.


Grocery List (groceries/)

Filename convention: YYYY-Www.md — matches its corresponding menu plan week Template: templates/grocery-list.md

---
week: 2026-W01
generated: 2026-01-03   # date the list was created or last updated
---

### Produce
- [ ] Baby potatoes (1 lb)
- [ ] Carrots (3–4 medium)

### Protein
- [x] ~~Chicken thighs (2 lbs)~~   # strikethrough = purchased

Workflow convention: Check items off as you shop. Items marked with strikethrough (~~text~~) are purchased. When creating next week's list, carry over any unchecked items from the prior week.


Obsidian Bases

Each .base file at the root of the vault defines a filterable, sortable table view over its corresponding folder. Open these in Obsidian to browse and filter your data.

File Covers Key columns
recipes.base recipes/ category, cuisine, servings, prep, cook, tags
food-nutrition.base food-nutrition/ brand, category, serving, macros (summed)
dog-food-nutrition.base dog-food-nutrition/ brand, qty, kcal/g, kcal/cup, kcal/kg
pantry.base pantry/ category, location, brand, quantity, expires
menu-ideas.base menu-ideas/ category, cuisine, tags, last_made
menu-plan.base menu-plan/ week, starts (sorted newest first)
groceries.base groceries/ week, generated (sorted newest first)

Obsidian Bases requires Obsidian v1.8 or later.


Getting Started

  1. Clone or download this repository.
  2. Open the folder as a vault in Obsidian (Open folder as vault).
  3. Browse the .base files to see the table views — they'll be empty until you add content.
  4. Use the templates in templates/ as your starting point for each new file.
  5. Start with food-nutrition/ and recipes/ to build your core database, then populate menu-ideas/ as you accumulate meals you like.

Naming Conventions

Type Convention Example
Recipes kebab-case-title.md classic-roast-chicken.md
Foods kebab-case-title.md whole-milk.md
Dog food kebab-case-title.md sample-chicken-rice-formula.md
Pantry items kebab-case-title.md kosher-salt.md
Menu ideas kebab-case-title.md roast-chicken-with-vegetables.md
Menu plans YYYY-Www.md 2026-W01.md
Grocery lists YYYY-Www.md 2026-W01.md

License

CC0 1.0 Universal — public domain. Use this schema for any purpose, without restriction.

About

Template for FoodBase data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages