BreadBuddy - A recipe scheduler for iOS
BreadBuddy
BreadBuddy is a recipe scheduler for iOS. I use it to schedule my overnight pizza dough, and my partner uses it to schedule her awesomely complicated (but incredibly yummy) sourdough baguettes!
Screenshots
Download
Open Source
BreadBuddy is the reference I wish I had when I was first learning how to build apps with Swift/SwiftUI. It was therefore built to be open source.
Code Philosophy
The source code for BreadBuddy is meant to be read, tested, and replaced. The app is influenced by—but not beholden to—Clean Code, SOLID, and TDD.
⛳️ CADI
BreadBuddy is built with SwiftUI and MVVM. And is organized with CADI, an acronym that stands for Core, App, Data, Interface. Pronounced like, and inspired by, “Caddie“, the system compliments MVVM through the use of folders, local packages, and protocols to make feature iteration, code replacement, and refactoring a relative breeze…
- Core/*
- Models (the M in MVVM)
- Core data representations
- Services (domain logic)
- Made as thin as possible
- Type extensions
- Critical unit tests
- Models (the M in MVVM)
- App/
- @main entry point
- Configuration files
- Asset catalogues
- Environment/plist variables
- Data/
- Database
- UserDefaults, CoreData, GRDB.swift, or similar
- Stores
- With protocols to allow for future data layer substitutions
- Database
- Interface/
- Views (the V in MVVM)
- Organized by Screen
- Co-located/nested ViewModels (the VM in MVVM)
- Fonts
- Colors
- Sugar*
- Custom and reusable UI components
- Views (the V in MVVM)
*Core and Sugar are local packages firewall-ed from the rest of the app
Notable Files
RecipeService.swift
– core engine of the app (really not that complicated)RecipeServiceTests.swift
– XCTestCase for the core engineData/Database
– files for the GRDB/SQLite data persistence layerRecipeStore.swift
– replaceable bridge intended to span ViewModel and data persistence layerAlertInput
– files that wrap a UIKit input alert for usage in SwiftUI