How flaviecousin/cooking_book works
Cooking Book is an offline Android recipe notebook. The documented user flow is to browse and filter the recipe grid, open a recipe, and create or edit recipes through a shared form; recipes persist locally and can be exported as PNG or PDF for system sharing. The graph follows the README’s MVVM and navigation descriptions. Source excerpts were not provided, so details beyond the documented wiring and the paths visible in the tree are represented conservatively.
Main entry points: Recette.kt Recipe model · ShareAction.kt Share action · RecipeGridScreen.kt Recipe grid · RecetteViewModel.kt Recipe ViewModel
Components 20
App navigation
- MainActivity
app/src/main/java/com/example/cookingbook/MainActivity.kt
Recipe experience
- Recipe grid
app/src/main/java/com/example/cookingbook/ui/screens/RecipeGridScreen.kt - Recipe detail
app/src/main/java/com/example/cookingbook/ui/screens/RecipeScreen.kt - Add/edit form
app/src/main/java/com/example/cookingbook/ui/screens/AddScreen.kt - Compose components
app/src/main/java/com/example/cookingbook/ui/components
Recipe data
- Recipe ViewModel
app/src/main/java/com/example/cookingbook/ui/models/RecetteViewModel.kt - Filter ViewModel
app/src/main/java/com/example/cookingbook/ui/models/FilterTextViewModel.kt - Recipe repository
app/src/main/java/com/example/cookingbook/ui/data/RecetteRepository.kt - Room DAO
app/src/main/java/com/example/cookingbook/ui/data/RecetteRequests.kt - Room database
app/src/main/java/com/example/cookingbook/ui/data/AppDatabase.kt - Recipe model
app/src/main/java/com/example/cookingbook/ui/data/Recette.kt - Ingredient model
app/src/main/java/com/example/cookingbook/ui/data/Ingredient.kt - Preparation model
app/src/main/java/com/example/cookingbook/ui/data/Preparation.kt - Category model
app/src/main/java/com/example/cookingbook/ui/data/Categorie.kt - List converters
app/src/main/java/com/example/cookingbook/ui/data/Converters.kt
Export and sharing
- Share action
app/src/main/java/com/example/cookingbook/ui/components/ShareAction.kt - Share formats
app/src/main/java/com/example/cookingbook/ui/components/ShareFormat.kt - Compose capture
app/src/main/java/com/example/cookingbook/ui/utils/CapturableContent.kt - Android share sheet
Other components
- Cook
Connections 22
- Cook → MainActivity: opens app
- MainActivity → Recipe grid: starts navigation
- Cook → Recipe grid: browses and filters
- Recipe grid → Filter ViewModel: filters recipes
- Recipe grid → Recipe ViewModel: observes recipes
- Cook → Recipe detail: opens recipe
- Recipe detail → Recipe ViewModel: loads recipe
- Cook → Add/edit form: creates or edits
- Add/edit form → Recipe ViewModel: saves recipe
- Recipe ViewModel → Recipe repository: requests data
- Recipe repository → Room DAO: queries and updates
- Room DAO → Room database: uses Room
- Room database → Recipe model: stores recipes
- Recipe model → Ingredient model: contains ingredients
- Recipe model → Preparation model: contains steps
- Recipe model → Category model: has category
- List converters → Ingredient model: converts lists
- List converters → Preparation model: converts lists
- Cook → Share action: requests export
- Share action → Share formats: selects format
- Share action → Compose capture: captures content
- Share action → Android share sheet: shares export