chefbible/README.md
2025-08-14 13:03:11 -04:00

3.6 KiB
Raw Blame History

ChefBible

Overview

ChefBible is a self-hosted, mobile-friendly recipe and menu management tool designed for real-world kitchen use.
It is optimized for speed, simplicity, and offline-friendly workflows so cooks can find, read, and add recipes in under 10 seconds.

The app is built with:

  • SvelteKit for UI and server logic
  • TailwindCSS for responsive, kitchen-friendly design
  • Prisma as the ORM
  • PostgreSQL as the database

This repo is intentionally structured to make onboarding both humans and LLMs easy, so all core context is documented here.


Purpose

ChefBible aims to replace clunky recipe binders, scattered Google Docs, and slow web apps with something built for the kitchen.
It focuses on:

  1. Storing and organizing recipes
  2. Tracking ingredients and allergens
  3. Building menus from recipes
  4. Displaying everything in a fast, easy-to-read format on tablets or phones

MVP Rule:
If a feature isnt needed for a cook to find, read, or add a recipe in <10 seconds, it is not part of Phase 12.


Core Features

Recipes

  • Name, description, instructions, optional photo
  • Linked ingredients (with quantity/unit/prep notes)
  • Automatic allergen mapping from ingredients
  • “Kitchen Mode” for step-by-step cooking view

Ingredients

  • Unique name
  • Linked allergens
  • Linked to recipes via RecipeIngredient

Allergens

  • Name + optional description
  • Linked to ingredients

Menus

  • Name + optional season
  • Contains recipes in sortable order

Data Model Summary

Recipe --(RecipeIngredient)--> Ingredient --(IngredientAllergens)--> Allergen
Menu --(MenuRecipe)--> Recipe
Tables:
Recipe: Core recipe info

Ingredient: Basic ingredient info + allergens

Allergen: Common allergen definitions

Menu: Collection of recipes

RecipeIngredient: Join table with quantity/unit/prep

MenuRecipe: Join table with position

UI Patterns
List + Detail
Recipes, ingredients, and menus use a consistent split layout: search/filter on one side, detail view on the other.

Form with Inline Add
Add missing ingredients without leaving the recipe form.

Tag/Chip Display
Allergens and prep notes shown as color-coded chips.

Kitchen Mode
Large font, high contrast, step-by-step cooking instructions.

Menu Builder
Drag-and-drop ordering of recipes in a menu.

Global Search
Accessible from anywhere with / key shortcut.

Development Phases
Phase 1 — Core Foundation
Local dev setup with repeatable builds

Postgres + Prisma migration & seed

Direct Prisma usage in +page.server.ts actions

Phase 2 — Minimum Usable UI
CRUD for recipes, ingredients, menus

Recipe form with ingredient selector + allergen auto-mapping

Phase 3 — Internal Dogfooding
Fast search

Menu builder

Mobile-first adjustments

Phase 4 — Stability & Shareability
JSON export/import for recipes

Refined allergen mapping

Search & filtering enhancements

Local Development
Prerequisites
Node.js 20+

PostgreSQL 16+ (local or Docker)

npm

Setup
bash
Copy
Edit
git clone <repo-url>
cd chefbible

npm install

# Start Postgres (example using Docker)
docker compose up -d

# Run migrations & seed
npx prisma migrate dev --name init
npx prisma db seed

# Start dev server
npm run dev
Notes for LLMs
Framework: SvelteKit with Node adapter

DB Layer: Prisma (/src/lib/server/db/*.ts contains reusable queries)

Routing: Use +page.server.ts and form actions for now; no dedicated API routes until external consumers are needed

UI: TailwindCSS utility-first design, mobile-first sizing

Performance Requirement: All page loads & actions <500ms on LAN

Design Priority: Minimal clicks, fast search, allergen visibility