How nextcloud/cookbook works
Nextcloud Cookbook manages a user’s recipe library as schema.org-style JSON files. A user browses or searches recipes, opens one to view or edit it, or submits a recipe URL for import; the server downloads and parses the page, extracts recipe data, and stores it in the configured folder. The UI also supports recipe images and thumbnails, settings, and library rescan/indexing. Backend service links are supported by sampled source references; several UI and controller relationships are documented or indexed but their implementations were not sampled.
Main entry points: RecipeService.php Recipe service · router/index.ts Page routing · store/index.ts Client state · DbCacheService.php Library indexing
Components 26
Browser application
- App bootstrap
src/main.ts - Page routing
src/router/index.ts - Search results
src/components/SearchResults.vue - Recipe list
src/components/List/RecipeList.vue - Recipe view
src/components/RecipeView/RecipeView.vue - Recipe editor
src/components/RecipeEdit.vue - Client state
src/store/index.ts
HTTP interface
- API client
src/js/api-interface.js - Recipe endpoints
lib/Controller/Implementation/RecipeImplementation.php - Category endpoints
lib/Controller/Implementation/CategoryImplementation.php
Recipe processing
- Recipe service
lib/Service/RecipeService.php - HTML download
lib/Service/HtmlDownloadService.php - Recipe extraction
lib/Service/RecipeExtractionService.php - HTML parsing
lib/Helper/HtmlToDomParser.php
Library and search
- Recipe database
lib/Db/RecipeDb.php - Library indexing
lib/Service/DbCacheService.php - Search provider
lib/Search/Provider.php - User settings
lib/Helper/UserConfigHelper.php - Recipe folder
lib/Helper/UserFolderHelper.php - Recipe JSON files
Images and media
- Image service
lib/Service/ImageService.php - Image files
lib/Helper/ImageService/ImageFileHelper.php - Thumbnail files
lib/Helper/ImageService/ThumbnailFileHelper.php
Other components
- Cookbook user
- Recipe website
- Nextcloud platform
Connections 31
- Cookbook user → Page routing: browses
src/router/index.ts - App bootstrap → Page routing: initializes
src/main.ts - App bootstrap → Client state: initializes
src/main.ts - Page routing → Search results: routes searches
src/router/index.ts - Page routing → Recipe view: routes recipe view
src/router/index.ts - Page routing → Recipe editor: routes editing
src/router/index.ts - Search results → Client state: loads results
src/components/SearchResults.vue - Search results → Recipe list: renders
src/components/SearchResults.vue - Recipe view → Client state: reads recipe
src/components/RecipeView/RecipeView.vue - Recipe editor → Client state: saves recipe
- Client state → API client: requests data
src/store/index.ts - API client → Recipe endpoints: calls endpoints
- Recipe endpoints → Recipe service: delegates
lib/Controller/Implementation/RecipeImplementation.php - Category endpoints → Recipe service: uses service
lib/Controller/Implementation/CategoryImplementation.php - Cookbook user → Recipe website: imports URL
README.md - Recipe service → HTML download: downloads page
lib/Service/RecipeService.php - HTML download → Recipe website: fetches HTML
lib/Service/HtmlDownloadService.php - HTML download → HTML parsing: parses HTML
lib/Service/HtmlDownloadService.php - Recipe service → Recipe extraction: extracts recipe
lib/Service/RecipeService.php - Recipe service → Recipe database: updates records
lib/Service/RecipeService.php - Recipe service → Recipe JSON files: stores JSON
- Recipe service → Recipe folder: resolves folder
lib/Service/RecipeService.php - Recipe service → User settings: reads settings
lib/Service/RecipeService.php - Recipe service → Image service: manages images
lib/Service/RecipeService.php - Image service → Image files: accesses images
lib/Service/ImageService.php - Image service → Thumbnail files: creates thumbnails
lib/Service/ImageService.php - Library indexing → Recipe database: syncs index
lib/Service/DbCacheService.php - Library indexing → Recipe service: reads recipes
lib/Service/DbCacheService.php - Library indexing → User settings: reads settings
lib/Service/DbCacheService.php - Search provider → Recipe service: searches recipes
lib/Search/Provider.php - Nextcloud platform → Recipe endpoints: dispatches requests