Build habits together, stay accountable, and grow stronger with your partner!
- Frontend Framework: React Native with Expo
- Styling: NativeWind (TailwindCSS for React Native)
- State Management: Zustand
- Backend & Authentication: Supabase
- Navigation: Expo Router
- Storage: MMKV for local storage
- Animations: React Native Reanimated
habitmates-ui.mp4
HabitMates/
├── app/ # Application screens and navigation
│ ├── (auth)/ # Authenticated routes
│ │ ├── (tabs)/ # Bottom tab navigation
│ │ │ ├── habits/ # Habits management
│ │ │ ├── home/ # Home dashboard
│ │ │ ├── partners/ # Partners management
│ │ │ └── profile/ # User profile
│ ├── login.tsx # Login screen
│ └── _layout.tsx # Root layout
├── components/ # Reusable components
├── lib/ # Core functionality
│ ├── stores/ # Zustand stores
│ ├── types.ts # TypeScript definitions
│ └── supabase.ts # Supabase client
└── assets/ # Static assets
-
users
- id (UUID, PK)
- username (text)
- avatar_url (text)
- is_active (boolean)
- banned (boolean)
- streak_rescues_remaining (integer)
- created_at (timestamp)
- updated_at (timestamp)
-
habits
- id (UUID, PK)
- name (text)
- description (text)
- frequency ('daily' | 'weekly')
- owner_id (UUID, FK)
- partner_id (UUID, FK)
- current_streak (integer)
- longest_streak (integer)
- is_public (boolean)
- created_at (timestamp)
- updated_at (timestamp)
-
streaks
- id (UUID, PK)
- habit_id (UUID, FK)
- date (date)
- user_completed (boolean)
- partner_completed (boolean)
- created_at (timestamp)
-
Authentication
- Email/Password login
- Session persistence
- Protected routes
-
Habit Management
- Create habits
- Track daily/weekly progress
- Streak tracking
- Public/Private habits
-
Theme System
- Light/Dark mode
- System theme support
- Persistent theme preferences
- Install dependencies:
npm install
- Set up environment variables:
Create a
.env
file with:
EXPO_PUBLIC_SUPABASE_URL=your_supabase_url
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
- Start the development server:
npm start
- Enable Row Level Security (RLS)
ALTER TABLE habits ENABLE ROW LEVEL SECURITY;
- Create RLS Policies
-- Habits table policies
CREATE POLICY "Users can create their own habits"
ON habits FOR INSERT TO authenticated
WITH CHECK (auth.uid() = owner_id::uuid);
CREATE POLICY "Users can view their own habits"
ON habits FOR SELECT TO authenticated
USING (auth.uid() = owner_id::uuid OR is_public = true);
CREATE POLICY "Users can update their own habits"
ON habits FOR UPDATE TO authenticated
USING (auth.uid() = owner_id::uuid);
CREATE POLICY "Users can delete their own habits"
ON habits FOR DELETE TO authenticated
USING (auth.uid() = owner_id::uuid);
eas build --profile development --platform android
eas build --profile preview --platform android
eas build --profile production --platform android
The project uses a custom TailwindCSS configuration with the following theme extensions:
-
Brand Colors
- Primary: Emerald (#059669)
- Primary Dark: Light Emerald (#6ee7b7)
- Secondary: Indigo (#6366f1)
- Secondary Dark: Light Indigo (#818cf8)
-
App Background
- Light: #f8fafc
- Dark: #0f172a
-
Card Colors
- Light: #ffffff
- Dark: #1e293b
-
RLS Policy Type Mismatch
- Issue: UUID comparison in RLS policies
- Solution: Cast owner_id to UUID using
owner_id::uuid
-
Theme Persistence
- Using MMKV storage for better performance
- Theme state managed through Zustand store
-
Partner System
- Implement partner invitations
- Add partner streak tracking
- Add partner chat/communication
-
Achievements System
- Track milestones
- Award badges/rewards
- Implement streak rescue system
-
Social Features
- Public habit discovery
- Community challenges
- Social sharing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is private and proprietary.