A beautiful, feature-rich habit tracking app built with React Native and Expo. Track your daily habits, build streaks, and achieve your goals with an intuitive and modern interface.
- Today View - See all habits scheduled for today with progress tracking
- Habit Management - Create, edit, and organize habits with categories (Essential, Flexible, Weekly)
- Streak Tracking - Visual streak badges and total streak counter
- History Calendar - View your completion history in a beautiful calendar view
- Dark/Light Mode - Automatic theme switching with system preference support
- Onboarding Flow - Guided setup for first-time users
- Morning Reminders - Customizable daily morning motivation (default: 7:00 AM)
- Evening Summaries - Daily progress recap (default: 9:30 PM)
- Smart Reminders - AI-powered optimal timing reminders
- Habit-Specific Reminders - Individual reminders for each habit
- Streak Warnings - Alerts to prevent breaking your streak
- Flexible Streak Modes - Strict or lenient streak calculation
- Grace Days - Configurable grace period for missed days
- Habit Categories - Organize habits as Essential, Flexible, or Weekly
- Archive Habits - Archive old habits without losing history
- Real-time Updates - Instant UI updates when habits are added/edited
- Data Export - Export your data as JSON (development mode)
- Framework: React Native 0.81.5
- Platform: Expo SDK 54
- Language: TypeScript
- Navigation: React Navigation (Stack & Bottom Tabs)
- Database: Realm (local database)
- Storage: AsyncStorage (settings & preferences)
- Notifications: Expo Notifications
- Date Handling: date-fns
- Icons: Expo Vector Icons (Feather)
- Node.js 18+ and npm
- iOS Simulator (for iOS development) or Android Emulator (for Android development)
- Expo CLI (
npm install -g expo-cli) - For iOS: Xcode 14+ (macOS only)
- For Android: Android Studio
-
Clone the repository
git clone https://github.com/yourusername/habit-tracker.git cd habit-tracker -
Install dependencies
npm install
-
Start the development server
npm start # or npx expo start
npm run ios
# or
npx expo run:iosnpm run android
# or
npx expo run:androidnpm run web
# or
npx expo start --webThis app uses native modules (Realm), so you need a development build instead of Expo Go:
# Install expo-dev-client
npx expo install expo-dev-client
# Build for iOS
npx expo run:ios
# Build for Android
npx expo run:androidhabit-tracker/
βββ src/
β βββ components/ # Reusable UI components
β β βββ Screen.tsx
β β βββ StreakBadge.tsx
β β βββ TimeInput.tsx
β β βββ WeekdaySelector.tsx
β βββ hooks/ # Custom React hooks
β β βββ useHabits.ts
β β βββ useOnboardingState.ts
β β βββ useSettings.ts
β βββ navigation/ # Navigation configuration
β β βββ RootNavigator.tsx
β β βββ types.ts
β βββ screens/ # Screen components
β β βββ TodayScreen.tsx
β β βββ HabitListScreen.tsx
β β βββ HabitFormScreen.tsx
β β βββ HabitDetailScreen.tsx
β β βββ HistoryScreen.tsx
β β βββ ProfileScreen.tsx
β β βββ onboarding/
β βββ services/ # Business logic services
β β βββ notifications.ts
β βββ storage/ # Data persistence
β β βββ habits.ts
β β βββ realm-config.ts
β βββ theme/ # Theme configuration
β β βββ index.ts
β β βββ palettes.ts
β β βββ tokens.ts
β βββ types/ # TypeScript type definitions
β β βββ habits.ts
β β βββ settings.ts
β βββ utils/ # Utility functions
β βββ streak.ts
βββ assets/ # Images, icons, fonts
βββ App.tsx # Root component
βββ app.json # Expo configuration
βββ package.json # Dependencies
- Essential: Daily habits that are critical to your routine
- Flexible: Habits that can be done on any day
- Weekly: Habits that occur on specific days of the week
- Strict Mode: Streak breaks if you miss a scheduled day
- Lenient Mode: Allows grace days before breaking streak
- All notification times are customizable
- Habit-specific reminders only fire on scheduled days
- Smart reminders adapt to your completion patterns
npm start- Start Expo development servernpm run ios- Run on iOS simulatornpm run android- Run on Android emulatornpm run web- Run on web browser
In development mode (__DEV__ === true), the app includes:
- Database inspection tools
- Data export functionality
- Full reset option for testing
These are automatically removed in production builds.
This repository includes GitHub Actions workflows for automated builds:
- Android: Builds AAB for Google Play Store
- iOS: Builds ad-hoc distribution for free Apple Developer accounts
Setup:
- Add
EXPO_TOKENto GitHub Secrets (Settings β Secrets β Actions) - Push to
mainbranch or create a release tag - Builds run automatically
Manual Build Commands:
# Install EAS CLI
npm install -g eas-cli
# Login
eas login
# Configure (first time)
eas build:configure
# Build Android for Play Store
eas build --platform android --profile production-android
# Build iOS for ad-hoc (free account)
eas build --platform ios --profile ios-adhocWe have an automated release system that creates GitHub releases when you push a version tag:
# Make the script executable (first time only)
chmod +x scripts/release.sh
# Create a new release
./scripts/release.sh 1.0.2The script will:
- β
Update
package.jsonandapp.jsonversions - β
Verify release notes exist in
RELEASE_NOTES.md - β Commit and tag the release
- β Push to GitHub
- β Trigger automatic GitHub Release creation
# 1. Update versions in package.json and app.json
# 2. Add release notes to RELEASE_NOTES.md
# 3. Commit changes
git add .
git commit -m "chore: bump version to 1.0.2"
# 4. Create and push tag
git tag v1.0.2
git push origin main
git push origin v1.0.2- π GitHub Release is created with notes from
RELEASE_NOTES.md - π·οΈ Release is tagged with version number
- π Commit history is included
- π Release appears on GitHub Releases page
π See RELEASE_GUIDE.md for detailed release instructions
π See DEPLOYMENT.md for complete deployment guide
The app uses Realm for local data storage:
- Habits and completions are stored in Realm
- Settings and preferences are stored in AsyncStorage
- Database file is automatically created on first launch
The app requests the following permissions:
- Notifications - For habit reminders and daily summaries
- Requested automatically on app launch
If you encounter database errors:
- Close the app completely
- Delete and reinstall the app
- Or use the reset option in Profile screen (development mode)
- Check device notification settings
- Ensure permissions are granted
- Verify notification times are set correctly
- Ensure all dependencies are installed:
npm install - Clear cache:
npx expo start -c - For iOS: Clean build folder in Xcode
- For Android:
cd android && ./gradlew clean
- β Automated builds via GitHub Actions
- β Automatic submission to Play Store (after setup)
- β AAB format for Play Store submission
- β See DEPLOYMENT.md for details
- β See GOOGLE_PLAY_SETUP.md for Play Store automation setup
- β Ad-hoc distribution (up to 100 devices)
- β No $99/year App Store fee required
- β Perfect for personal use and testing
- β See DEPLOYMENT.md for details
- Android Build:
.github/workflows/android.yml - iOS Build:
.github/workflows/ios.yml - Release Build:
.github/workflows/release.yml
All workflows trigger on:
- Push to
main/masterbranch - Release tags (e.g.,
v1.0.0)
This project is private and proprietary.
Musavir
- Built with Expo
- Icons by Feather Icons
- Database powered by Realm
Made with β€οΈ using React Native and Expo