A beautiful mobile app for tracking cravings and building resistance. Built with Expo, React Native, and NativeWind (Tailwind CSS).
- Willpower Points System: Earn +10 points for observing cravings, +30 for resisting
- Category Tracking: Track different types of cravings (Sugar, Junk Food, Social Media, etc.)
- Beautiful UI: Modern design with glass-morphism effects and smooth animations
- Persistent Storage: All data saved locally with AsyncStorage
- Journal: Full history of your moments with category filtering
- Planned Joys: Schedule treats you've earned
- Framework: Expo (React Native)
- Styling: NativeWind (Tailwind CSS for React Native)
- Icons: lucide-react-native
- Navigation: Expo Router (File-based routing)
- State Management: Zustand
- Animations: react-native-reanimated
- Storage: @react-native-async-storage/async-storage
-
Install Dependencies:
npm install
-
Create Assets Folder (if not exists):
mkdir assets
Add placeholder images:
assets/icon.png(1024x1024)assets/splash.png(1242x2436)assets/adaptive-icon.png(1024x1024)assets/favicon.png(48x48)
-
Start Development Server:
npm start
-
Run on Device/Simulator:
- Press
ifor iOS simulator - Press
afor Android emulator - Scan QR code with Expo Go app for physical device
- Press
craveCount/
├── app/
│ ├── (tabs)/
│ │ ├── _layout.tsx # Tab navigation with floating dock
│ │ ├── index.tsx # Dashboard (Home)
│ │ ├── events.tsx # Planned Joys
│ │ ├── add.tsx # Placeholder for add button
│ │ ├── journal.tsx # Full history with filters
│ │ └── settings.tsx # Settings & preferences
│ └── _layout.tsx # Root layout
├── components/
│ ├── LogCard.tsx # Individual log entry card
│ ├── LogModal.tsx # Bottom sheet for logging cravings
│ └── TikTokIcon.tsx # Custom TikTok SVG icon
├── store/
│ └── useStore.ts # Zustand store for state management
├── app.json # Expo configuration
├── babel.config.js # Babel configuration with NativeWind
├── metro.config.js # Metro bundler configuration
├── tailwind.config.js # Tailwind CSS configuration
├── global.css # Global Tailwind styles
└── package.json # Dependencies
- Primary: Slate-900 (#0f172a) - Dark backgrounds/buttons
- Secondary: Indigo-500 (#6366f1) - Glows/Highlights
- Awareness: Amber-500 (#f59e0b) - Observed cravings
- Resistance: Emerald-500 (#10b981) - Resisted cravings
- Surface: Slate-50 (#f8fafc) - Light backgrounds
- Font: System default (Inter on iOS, Roboto on Android)
- Headers: Bold, tracking-tight
- Body: Regular weight
- Labels: Semibold, uppercase, tracking-wide
- Border Radius: Large (24px-32px for cards)
- Touch Targets: Minimum 44x44px
- Spacing: Consistent 6-unit scale (4px base)
- Log a Craving: Tap the center
+button - Choose Category: Select from Sugar, Junk Food, Instagram, etc.
- Add Reflection (Optional): Write what you're feeling
- Choose Action:
- Observed (+10 pts): You noticed the craving
- Resisted (+30 pts): You successfully resisted!
Edit store/useStore.ts:
export type Category = 'Sugar' | 'Junk Food' | 'YourNewCategory';Edit the addLog function in store/useStore.ts:
const points = type === 'observed' ? 10 : 30; // Change these valuesEdit tailwind.config.js to customize the color palette.
- Events/Planned Joys is currently a placeholder screen
- No user authentication (all data stored locally)
- No cloud sync
- No reminder/notification implementation (toggle exists in settings)
- Firebase integration for cloud sync
- User authentication
- Real event scheduling with rewards
- Push notifications for reminders
- Statistics and charts
- Streak tracking
- Export data feature
MIT
Built with ❤️ using Expo and React Native