How drewbawden/simple-recipe-book works
Simple Recipe Book is a web application for browsing and editing recipes and managing a shopping list, with inventory-related screens also present. The main user flows are recipe-table interactions backed by recipe actions, and shopping-list interactions backed by list actions and persistent data. Recipe entry supports parsing external recipes; list management includes categorization and sorting. The graph includes these distinct product areas and shared UI/state support. Some subsystem wiring is documented only by the source index; uncertain integrations are omitted rather than inferred.
Main entry points: shopping-list.tsx Shopping-list interface · recipe-table.tsx Recipe table · shopping-lists.ts Shopping-list actions · recipes.ts Recipe actions
Components 28
Recipe book
- Recipe page
app/page.tsx - Recipe table
components/recipes/recipe-table.tsx - Recipe editor
components/recipes/popups/recipe-input.tsx - Recipe overview
components/recipes/popups/overview.tsx - Recipe actions
actions/recipes.ts - External recipe parsing
actions/parse-external.ts - Recipe data types
types/recipe.ts
Shopping list
- List page
app/list/page.tsx - Shopping-list interface
components/shopping-list/shopping-list.tsx - List item controls
components/shopping-list/item-input.tsx - List settings
components/shopping-list/popups/list-edit.tsx - Shopping-list actions
actions/shopping-lists.ts - Item and category actions
actions/items.ts - List sorting logic
lib/shopping-list.ts - List item types
types/list-item.ts
Inventory
- Scanner page
app/scanner/page.tsx - Barcode scanner UI
components/inventory/barcode-scanner.tsx - Product card
components/inventory/product-card.tsx - Inventory actions
actions/inventory.ts - Inventory types
types/inventory.ts
Shared services
- Application database
- Update events
lib/event.ts - SSE events route
app/api/sse/events/route.ts - Recipe picture route
app/recipe-pictures/[...slug]/route.ts - Modal query state
hooks/useModalQuery.ts - Modal UI
components/templates/modal.tsx - Context menus
components/templates/context-menu.tsx
Other components
- User
Connections 37
- User → Recipe page: opens recipes
app/page.tsx - Recipe page → Recipe table: renders
app/page.tsx - Recipe table → Recipe actions: loads and deletes
components/recipes/recipe-table.tsx - Recipe table → Recipe editor: opens editor
components/recipes/recipe-table.tsx - Recipe table → Recipe overview: shows overview
components/recipes/recipe-table.tsx - Recipe editor → Recipe actions: submits recipe
components/recipes/popups/recipe-input.tsx - Recipe editor → External recipe parsing: parses source
components/recipes/popups/recipe-input.tsx - Recipe actions → External recipe parsing: downloads image
actions/recipes.ts - Recipe actions → Application database: reads and writes
actions/recipes.ts - Recipe actions → Update events: broadcasts updates
actions/recipes.ts - Recipe page → Modal query state: controls modal query
- Recipe table → Modal UI: renders dialogs
components/recipes/recipe-table.tsx - Recipe table → Context menus: uses menus
components/recipes/recipe-table.tsx - User → List page: opens list
app/list/page.tsx - List page → Shopping-list interface: renders
app/list/page.tsx - Shopping-list interface → Shopping-list actions: loads and changes items
components/shopping-list/shopping-list.tsx - Shopping-list interface → Recipe actions: loads recipe overview
components/shopping-list/shopping-list.tsx - Shopping-list interface → List item controls: renders item entry
components/shopping-list/shopping-list.tsx - Shopping-list interface → List settings: renders list settings
components/shopping-list/shopping-list.tsx - List item controls → Shopping-list actions: submits item changes
components/shopping-list/item-input.tsx - List settings → Item and category actions: loads categories
components/shopping-list/popups/list-edit.tsx - Shopping-list actions → Application database: reads and writes
actions/shopping-lists.ts - Shopping-list actions → Item and category actions: increments usage
actions/shopping-lists.ts - Shopping-list actions → List sorting logic: sorts list
actions/shopping-lists.ts - Shopping-list actions → Update events: broadcasts updates
actions/shopping-lists.ts - User → Scanner page: opens scanner
app/scanner/page.tsx - Scanner page → Barcode scanner UI: renders
app/scanner/page.tsx - Scanner page → Product card: renders
app/scanner/page.tsx - Scanner page → Inventory actions: fetches inventory
app/scanner/page.tsx - Inventory actions → Application database: reads inventory
actions/inventory.ts - Barcode scanner UI → Product card: supports scanning flow
- SSE events route → Update events: streams updates
app/api/sse/events/route.ts - User → Recipe picture route: requests image
- Recipe table → Modal query state: reads and updates
components/recipes/recipe-table.tsx - Shopping-list interface → Modal query state: reads and updates
components/shopping-list/shopping-list.tsx - Shopping-list interface → Modal UI: renders dialogs
components/shopping-list/shopping-list.tsx - Shopping-list interface → Context menus: uses menus
components/shopping-list/shopping-list.tsx