A modern iOS app for tracking daily habits and building consistency.
- Habit Tracking: Track both boolean (yes/no) and counter-based habits
- Streaks: Monitor your current and longest streaks for each habit
- Multiple Environments: Switch between development and production environments
- Demo Mode: Try the app with sample data without requiring an internet connection
- Modern UI: Clean, intuitive interface following Apple's design guidelines
- Xcode 15.0+
- iOS 17.0+
- Swift 5.9+
- Clone the repository
git clone https://github.com/fberrez/minihabits-ios.git
cd minihabits-ios
- Open the project in Xcode
open minihabits-ios.xcodeproj
- Build and run the application on your simulator or device
MiniHabits iOS follows the MVVM (Model-View-ViewModel) architecture pattern:
- Models: Data structures like
Habit
that represent the core entities - Views: SwiftUI views that display the UI
- ViewModels: Classes like
HabitsViewModel
that manage the business logic and data flow
- APIClient: Handles all network communication with the MiniHabits API
- HabitsViewModel: Manages habit data and operations
- ContentView: Main view that displays the list of habits
- HabitDetailView: Detailed view for a specific habit
- HabitFormView: Form for creating and editing habits
The app connects to the MiniHabits API for data persistence. It supports:
- Authentication: Sign up and sign in functionality
- CRUD Operations: Create, read, update, and delete habits
- Habit Tracking: Track habit completion and manage streaks
Two environments are supported:
- Development: Connects to
http://localhost:3000
- Production: Connects to
https://minihabits-api.fberrez.co
- Tap the "+" button in the top right corner
- Enter a name for your habit
- Select the habit type (boolean or counter)
- For counter habits, set a daily target
- Choose a color
- Tap "Add"
- Boolean Habits: Tap the circle to mark as complete
- Counter Habits: Use the "+" and "-" buttons to increment or decrement the counter
Tap on any habit to view detailed information, including:
- Current and longest streaks
- Daily target (for counter habits)
- Progress tracking
Enable demo mode in the Settings to use the app without an internet connection. This mode uses sample data for demonstration purposes.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.