Introduction
Welcome to a brief overview of Orbit, my self-developed iOS app aimed at helping users stay focused and manage their time more effectively. Orbit combines a customizable timer, Detox Mode, and a data-driven statistics dashboard to enhance productivity and mindfulness.
Key Technologies: Swift, SwiftUI, Core Haptics, SwiftUI Charts, JSON file persistence
Background & Motivation
In a world full of distractions, I often found myself struggling to keep my phone from interrupting deep work sessions. So I decided to build an app that not only tracks focused time but also locks me in the session until the timer ends, making it much harder to get sidetracked.
Core Features
- Focus Timer with Custom Rotation Gestures
- The timer duration is set by rotating a ring on the screen.
- Haptic feedback provides tactile confirmation when rotating to adjust minutes.
- Detox Mode
- When enabled, Detox Mode prevents the user from leaving the app or putting it into the background.
- Attempts to switch out trigger an instant reminder, reinforcing the focus mindset.
- Perfect for those times when you need to truly “lock in” and avoid digital temptations.
- Tag-Based Organization
- Each focus session can be categorized with color-coded tags (e.g., Work, Study, Create).
- Users can add or remove tags freely within a maximum limit.
- Statistics & Visualization
- Integrated SwiftUI Charts to provide insights into daily/weekly/monthly focus data.
- Pie, bar, and heatmap charts help you understand how you distribute your time across different tasks.
- Data Persistence & Export
- Session logs are stored locally using JSON files, ensuring offline access.
- Export CSV functionality allows you to share or back up session records.
App Screens & Demo
1. Main Focus Interface
Here the user can rotate the outer ring to set the timer duration, select a tag, and start the focus session.
2. Detox Mode in Action
When Detox Mode is active, you’ll see a lock indicator and a “Locked Until Complete” button, preventing you from exiting the app.
3. Tag Management
Users can create new tags, select colors, and organize them. Once the tag limit is reached, a short animation or warning message appears.
4. Statistics View
A set of charts (pie, bar, heatmap) displays your logged time over different intervals (day, week, month). This visualization helps track habits and identify trends.
Under the Hood
- SwiftUI & MVVM
The app architecture separates UI (Views) from business logic (ViewModels) and data models, making code more modular and maintainable.
- Core Haptics
Implemented subtle haptic cues when adjusting the timer ring or toggling settings, offering a more immersive user experience.
- Local JSON Persistence
Time logs and focus tags are encoded/decoded with
Codable
structures, then saved in the device’s Documents directory. This approach keeps data fully offline and private.- SwiftUI Charts
Three chart types (pie, bar, and heatmap) were used to give an intuitive, at-a-glance look at session durations per day/week/month.
Future Improvements
- Cloud Sync
- Integrate iCloud or Firebase for cross-device synchronization.
- Social Sharing
- Allow users to share daily/weekly achievements via social media.
- Gamification
- Add achievements or streaks to maintain motivation for regular focused sessions.
Closing Thoughts
Orbit is an ongoing project that blends usability, data visualization, and focus-driven features into one package. It’s helped me—and hopefully will help others—stay on task and minimize digital distractions.
Feel free to check out more details and previews on my blog! If you’d like a closer look at the codebase or have any feedback, don’t hesitate to reach out.
Email: aoshen.dev@gmail.com
Thank you for reading! If you have any questions, suggestions, or want to discuss mobile development, feel free to leave a comment or drop me a message.