fond-domain
Domain types, traits, and errors for fond — a local-first, CLI-first personal cooking & recipe manager.
This crate contains pure data structures and type definitions with no I/O or side effects. All entities that flow through fond are defined here.
Key Types
Recipe— Parsed representation of a.cookfile: title, slug, ingredients, steps, cookware, tags, timers, and metadata.Ingredient,Step,Cookware— Components of a recipe.RecipeFilter— Filter criteria (tags, max time, source) for search and list queries.
Utilities
parse()/emit_cook()— Cooklang round-trip: parse a.cookfile into aRecipeand emit it back without data loss.slugify()/title_from_stem()— Derive URL-safe slugs from titles and vice versa.parse_time_minutes()— Normalize human-readable time strings ("1 hour 30 min") to minutes.escape_fts5_query()— Sanitize user input for safe FTS5 full-text queries.update_tags_in_cook_source()— Edit tags in.cookfile source text while preserving all other content.
Usage
use ;
let source = read_to_string.unwrap;
let recipe = parse.unwrap;
println!;
License
Part of the fond workspace.