HabitFlow is a simple habit-tracking app developed in Swift. The goal of this project was to build my first Swift app within a few hours, purely for fun and to learn more about Swift development.
The main goal of this project was to create a working app quickly, leveraging Swift and SwiftUI to develop a useful tool for tracking daily habits. This app serves as an entry point into iOS development, created in a short span of time to explore the basics of app design, user interface, and data persistence.
- Create Habits: Easily add new habits to track daily routines.
- Mark Habits as Done: Keep track of which habits are completed for the day with a simple "Mark as Done" button.
- Undo Habit Completion: Undo habit completion for the current day if done by mistake.
- Track Habit Streaks: Automatically calculates and displays streaks for consecutive days of habit completion.
- Circular Progress Indicator: Displays progress toward your habit's deadline using a dynamic circular progress bar.
- Calendar View: See which days you have completed a habit in the current month.
- Habit Persistence: Habits are saved between app launches using
UserDefaults
for simple data persistence. - Edit Habit: Modify habits at any time, including changing the name, priority, and deadline.
- Dark Mode Support: The app supports iOS Dark Mode for a more comfortable viewing experience in low-light environments.
The app is a result of experimenting with Swift and SwiftUI in a 2 hours. I never use Swift before. It showcases key functionality such as UI design, state management, and progress tracking.
This app was developed quickly as an exploration of Swift and Xcode, so there are many areas that could be improved or expanded upon in the future:
- More advanced analytics on habit progress.
- Push notifications to remind users about their habits.
- Synchronization with cloud services like iCloud or Firebase for multi-device support.
To run the project:
- Clone the repository from GitHub.
- Open the project in Xcode.
- Set the target device to an iPhone simulator or a physical device.
- Run the project and start tracking habits!
This project is open-source and can be used freely for educational purposes.