Crookey is a comprehensive iOS application that combines recipe management, food analysis, and meal planning using modern Swift and SwiftUI. The app features advanced food scanning capabilities, personalized recipe recommendations, and seamless integration with health tracking platforms.
- AI-powered food recognition using Vision framework
- Real-time nutritional analysis and freshness detection
- Ingredient identification with confidence scoring
- Camera integration with photo library support
- Extensive recipe discovery with advanced search
- Personalized recommendations based on dietary preferences
- Save favorite recipes with offline access
- Interactive cooking mode with step-by-step guidance
- Social sharing and community features
- HealthKit integration for nutrition tracking
- Dietary restriction and allergy management
- Calorie and macro tracking
- Wellness insights and progress monitoring
- Weekly meal planning with shopping list generation
- Inventory management and expiration tracking
- Smart grocery recommendations
- Budget tracking and cost analysis
- Native SwiftUI interface with iOS design guidelines
- Dark mode support with adaptive theming
- Accessibility features (VoiceOver, Dynamic Type)
- Smooth animations and responsive design
100% On-Device, Zero-Liability Architecture
- Private Pantry Management: SQLite-based local inventory with FileProtection encryption
- On-Device AI Recipes: Apple Foundation Models (3B params) - zero API costs, 100% offline
- Smart Expiration Tracking: Perishability notifications based on FSIS FoodKeeper data
- No Data Collection: Zero tracking, zero analytics, zero cloud uploads
- Offline-First: All core features work in Airplane Mode
- Privacy Guarantee: "This recipe was generated 100% on your device. Your data never left your phone."
Strategic Differentiator: Privacy is not a limitationβit's the core moat. Inspired by Paprika's success with the "anti-data-selling" user segment.
Crookey implements a "thick-client, thin-server" architecture where all user data and AI processing remain on-device:
Client (iOS App)
- SwiftUI: Declarative UI framework for all interfaces
- SQLite: Local-first database with FileProtectionType.complete encryption
- Foundation Models: Apple's 3B parameter on-device LLM (iOS 18.2+)
- Clean Architecture: Decoupled UI β Business Logic β Data layers
- Async/Await: Swift 6 concurrency with actor isolation
Core Services
DatabaseService: SQLite initialization with integrity checks and fallback stores (Core/Storage/)PantryService: CRUD operations with validation and query helpers (Services/)RecipeService: On-device prompt builder + Foundation Models integration (Services/)
Privacy Architecture
- Zero-Liability: Company cannot access user data (E2EE CloudKit for future sync)
- No Network Calls: All pantry and recipe operations work offline
- Encrypted at Rest: iOS Data Protection with complete file protection
- Minimal Backend: Future database updates only (no user data collection)
Traditional Stack (Pre-MVP Features)
- Core Data: Legacy recipe management with CloudKit sync
- Vision Framework: ML-powered image analysis for food scanning
- HealthKit: Nutrition tracking integration
- iOS 15.0+ (for base app functionality)
- Xcode 15.4+
- Swift 5.9+
- Apple Developer Account (for device testing)
- iOS 18.2+ (for Foundation Models on-device AI)
- macOS 15.2+ (for testing on Mac)
- Physical device recommended (for realistic AI performance testing)
git clone https://github.com/kakashi3lite/Crookey.git
cd Crookey./setup.shmake open- Open project settings in Xcode
- Select your Apple Developer Team
- Update bundle identifier if needed
make dev # Lint, build, and test
# Or press β+R in Xcode# Development
make dev # Quick development workflow (lint, build, test)
make build # Build the project
make test # Run all tests
make clean # Clean build artifacts
# Code Quality
make lint # Run SwiftLint
make format # Format code with SwiftFormat
make analyze # Run static analysis
# Testing
make test-unit # Run unit tests only
make test-ui # Run UI tests only
make test-coverage # Generate coverage report
# Utilities
make open # Open project in Xcode
make simulator # Open iOS Simulator
make devices # List available simulatorsAutomatic quality checks are enabled:
- Pre-commit: SwiftLint validation
- Pre-push: Unit test execution
The project includes comprehensive testing:
- Model validation and business logic
- Service layer testing
- Utility function verification
- End-to-end user flows
- Multi-device compatibility
- Accessibility compliance
- UnitTests.xctestplan: Focused unit testing
- UITests.xctestplan: Cross-device UI testing
- AccessibilityTests.xctestplan: Accessibility validation
Run specific test suites:
xcodebuild test -scheme Crookey -testPlan UnitTests
xcodebuild test -scheme Crookey -testPlan UITestsCrookey uses Xcode Cloud for automated CI/CD:
- Development: Feature branch validation
- CI: Main branch testing and analysis
- Release: TestFlight deployment
- β SwiftLint code quality
- β SwiftFormat style consistency
- β Unit and UI test execution
- β Multi-device compatibility
- β Accessibility compliance
- β Code coverage reporting
git tag -a v1.0.0 -m "Release v1.0.0"
git push origin v1.0.0Automatically builds and deploys to TestFlight.
Crookey/
βββ App/ # App lifecycle and main entry point
β βββ Models/ # Data models and Core Data entities
β βββ Services/ # Business logic and API services
β βββ ViewModels/ # SwiftUI view models (MVVM)
βββ Core/ # Core functionality
β βββ Config/ # App configuration
β βββ Network/ # Networking layer
β βββ Storage/ # Data persistence
βββ Features/ # Feature-based organization
β βββ FoodScanner/ # Food scanning and analysis
β βββ MealPlanning/ # Meal planning features
β βββ Profile/ # User profile and settings
β βββ Recipe/ # Recipe management
β βββ Search/ # Recipe search functionality
β βββ Social/ # Social features and sharing
βββ UI/ # User interface components
β βββ Components/ # Reusable UI components
β βββ Theme/ # App theming and styling
β βββ Views/ # Screen-level views
βββ Services/ # App-wide services
βββ Tests/ # Unit and UI tests
βββ Resources/ # Assets, localizations, etc.
- 50+ enabled rules for consistent code style
- Custom rules for SwiftUI best practices
- Enforced file headers and documentation
- Automatic code formatting
- Consistent indentation and spacing
- Import organization and cleanup
- Unit Tests: >80% code coverage
- Critical Paths: 100% coverage
- UI Tests: Core user flows
Zero-Liability Architecture
- No User Data Stored on Servers: All pantry data stays in local SQLite database
- No API Keys Required: Foundation Models runs 100% on-device (zero cloud AI calls)
- No Tracking SDKs: Zero analytics, zero telemetry, zero third-party data sharing
- Encrypted at Rest: Database protected via FileProtectionType.complete
- Offline-First: Core features work in Airplane Mode
Before ANY release, complete the Privacy Verification Checklist:
# Run comprehensive test suite
xcodebuild test -scheme Crookey -destination 'platform=iOS Simulator,name=iPhone 16 Pro'
# Verify privacy tests pass
# - testNoNetworkCallsDuringPantryOperations()
# - testDatabaseFileProtection()
# - Recipe generation in Airplane Mode
# Static analysis
swiftlint lint --strict
xcodebuild analyze -scheme CrookeyKey Privacy Tests:
- β Add pantry items in Airplane Mode
- β Generate recipes in Airplane Mode
- β Verify database file has FileProtectionType.complete
- β Confirm no URLSession/network code in PantryService or RecipeService
- β Check privacy message displayed on generated recipes
See Docs/PrivacyVerification.md for complete QA playbook.
- Local Processing: Food scanning via Vision framework on-device
- Secure API: HTTPS-only communications for recipe discovery
- Permission Management: Granular privacy controls for camera/photos
- CloudKit E2EE: Optional sync with Advanced Data Protection
Currently supporting:
- English (Base)
- Additional languages planned
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Swift style guidelines
- Include unit tests for new features
- Update documentation as needed
- Ensure accessibility compliance
This project is licensed under the MIT License - see the LICENSE file for details.
- Swanand Tanavade - Lead Developer
- Issues: GitHub Issues
- Documentation: Wiki
- Discussions: GitHub Discussions
- Core recipe management
- Food scanning functionality
- Basic meal planning
- Health integration
- Xcode Cloud CI/CD
- Advanced meal planning
- Social features expansion
- Offline recipe storage
- Apple Watch companion app
- AR food scanning
- Voice recipe instructions
- Smart kitchen integration
- Multi-language support
Made with β€οΈ for iOS developers and food enthusiasts.