A comprehensive iOS app built with SwiftUI for coffee enthusiasts to log their brewing experiments, calculate ratios, and track their coffee journey.
- Detailed Brew Records: Log coffee name, brew method, beans weight, water weight, grind size, temperature, and brew time
- Coffee Information: Track origin, coffee type, altitude, and roast level
- Notes & Observations: Add personal notes about each brew
- Automatic Timestamps: Every entry is automatically dated and timed
- Real-time Ratio Calculation: Instantly see your coffee-to-water ratio
- Common Brewing Ratios: Pre-configured ratios for popular methods:
- Espresso (1:2.0)
- Pour Over (1:16.67)
- French Press (1:15.0)
- AeroPress (1:17.0)
- Chemex (1:16.0)
- V60 (1:16.67)
- And more...
- Interactive Sliders: Adjust coffee and water weights with precision
- Total Brew Calculation: See your total brew weight
- Realistic Scale Display: Large, easy-to-read weight display
- Target Weight Tracking: Set and track your target weight
- Progress Visualization: Visual progress bar toward your target
- Tare Function: Zero the scale for accurate measurements
- Simulated Weight Addition: Test the scale functionality
- Tab-based Navigation: Three main sections for easy access
- Adaptive UI: Works seamlessly across all iPhone sizes
- Smooth Animations: Spring animations for a polished feel
- Dark Mode Support: Automatic light/dark mode adaptation
- Accessibility: VoiceOver and accessibility features included
- SwiftUI: Modern declarative UI framework
- MVVM Pattern: Clean separation of concerns
- FileManager: Local JSON storage for coffee entries
- Environment Objects: Shared state management across tabs
- iOS 16+: Leverages latest iOS features and APIs
- Logs Tab: Comprehensive coffee logging form
- History Tab: View and manage all your coffee entries
- Calculator Tab: Ratio calculator and digital scale
- Xcode 15.0 or later
- iOS 16.0+ deployment target
- macOS 13.0 or later (for development)
-
Clone the repository
git clone https://github.com/devrangoonwala/CoffeeLog-SwiftUI.git cd CoffeeLog-SwiftUI
-
Open in Xcode
open CoffeeLog.xcodeproj
-
Build and Run
- Select your target device or simulator
- Press
Cmd + R
to build and run
The project includes a custom coffee-themed app icon. To use it:
- Convert the provided
coffee_icon.svg
to PNG files in the required sizes - Add the PNG files to
Assets.xcassets/AppIcon.appiconset/
- The
Contents.json
file is already configured with the correct mappings
- Open the Logs tab
- Fill in the coffee details:
- Coffee name and brew method (required)
- Beans weight and water weight
- Grind size and water temperature
- Brew time
- Add optional information:
- Origin, coffee type, altitude
- Roast level
- Personal notes
- Tap Save Coffee Log
- Open the Calculator tab
- Adjust coffee and water weights using the sliders
- View the calculated ratio in real-time
- Use pre-configured ratios by tapping on brewing methods
- Open the digital scale for precise measurements
- Open the History tab
- View all your coffee entries in chronological order
- Swipe left on entries to delete them
- Tap the Edit button to enter edit mode for bulk deletion
CoffeeLog/
├── CoffeeLogApp.swift # App entry point
├── Views/
│ ├── CoffeeLogView.swift # Main logging form
│ ├── HistoryView.swift # Coffee entries history
│ └── CoffeeRatioCalculatorView.swift # Calculator & scale
├── ViewModels/
│ └── CoffeeLogViewModel.swift # Data management
├── Models/
│ └── CoffeeEntry.swift # Coffee entry data model
├── Helpers/
│ └── FileManager+Documents.swift # File storage utilities
└── Assets.xcassets/ # App icons and assets
struct CoffeeEntry: Identifiable, Codable {
let id: UUID
let date: Date
var type: String // Coffee name
var brewMethod: String // Brewing method
var rating: Int // Rating (1-5)
var gramsUsed: Double // Beans weight
var pourTimeSeconds: Int // Brew time
var stopTime: Date? // Optional stop time
var notes: String? // Personal notes
var origin: String? // Coffee origin
var coffeeType: String? // Coffee type (Arabica, etc.)
var altitudeMeters: Int? // Growing altitude
}
- Local JSON Storage: All data is stored locally using FileManager
- Automatic Saving: Changes are saved immediately
- Data Persistence: Entries survive app restarts and updates
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Follow SwiftUI best practices
- Maintain MVVM architecture
- Add comments for complex logic
- Test on multiple device sizes
- Ensure accessibility compliance
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with ❤️ using SwiftUI
- Inspired by coffee enthusiasts worldwide
- Icons from SF Symbols
- Coffee brewing ratios from industry standards
If you have any questions or need help with the app:
- Open an issue on GitHub
- Check the documentation above
- Review the code comments for implementation details
Happy Brewing! ☕
CoffeeLog helps you perfect your coffee brewing technique, one cup at a time.