PrepAI is a comprehensive health and fitness application that combines AI-powered meal planning, workout tracking, and progress monitoring. The app provides personalized health insights, workout routines, and nutrition tracking to help users achieve their fitness goals.
PrepAI revolutionizes personal health and fitness management by combining cutting-edge technology with user-friendly design. The application serves as your complete health companion, offering comprehensive workout tracking, detailed progress analytics, and intelligent meal planning capabilities.
The app features a robust workout library with 100+ pre-built routines across strength training, cardio, yoga, pilates, and functional fitness categories. Users can log detailed workout sessions, track exercises with sets, reps, weights, and rest periods, and monitor their progress over time with visual charts and analytics.
For nutrition and meal planning, PrepAI integrates with the Edamam recipe database to provide thousands of healthy meal options. The app includes comprehensive food logging, nutrition tracking with detailed macro and micronutrient analysis, and personalized meal suggestions based on user preferences and dietary restrictions.
Health monitoring is a core feature, allowing users to track weight entries with photo support, monitor daily water intake, log sleep quality and duration, and record mood and wellness indicators. The app provides insightful progress charts and goal tracking to keep users motivated and on track.
Built with React Native and Expo, PrepAI offers a seamless cross-platform experience across iOS, Android, and Web. The app features an offline-first architecture with local SQLite database and cloud synchronization, ensuring data is always accessible and secure.
The application includes advanced features like device integration for health data import/export and personalized goal setting. PrepAI is intended to ship as a paid iOS app with a $4.99 App Store price and no separate in-app subscription tiers. Whether you're a fitness beginner or an experienced athlete, PrepAI adapts to your skill level and provides the tools needed to achieve your health and fitness objectives.
- Comprehensive Fitness Tracking: Workout logging, exercise library, progress analytics
- Health Monitoring: Weight, water, sleep, and nutrition tracking with detailed insights
- Recipe Integration: Access to thousands of recipes via Edamam API
- Cross-Platform: React Native with Expo for iOS, Android, and Web
- Offline-First: Local SQLite database with cloud sync
- Advanced Analytics: Visual charts, progress tracking, and goal monitoring
- App Store Ready: Paid iOS app release path with $4.99 pricing target
- Device Integration: Health app data import/export capabilities
graph TB
subgraph "Client Layer"
A[Mobile App - React Native]
B[Web App - React Native Web]
C[Expo Router Navigation]
end
subgraph "State Management"
D[Zustand Stores]
E[React Context Providers]
F[Redux Toolkit]
end
subgraph "Data Layer"
G[SQLite Database]
H[Prisma ORM]
I[Cloud Sync Service]
end
subgraph "API Layer"
J[Expo Router API Routes]
K[Kroger API Integration]
L[Edamam Recipe API]
M[OpenAI Vision API]
end
subgraph "Authentication"
N[Clerk Auth]
O[Token Management]
end
subgraph "External Services"
P[PostgreSQL Database]
Q[EAS Build & Deploy]
R[Expo Updates]
end
A --> D
B --> D
C --> E
D --> G
E --> H
F --> I
G --> J
H --> K
I --> L
J --> M
N --> O
O --> P
Q --> R
erDiagram
User {
string id PK
string clerkId UK
string name
string email
datetime createdAt
datetime updatedAt
}
HealthProfile {
string id PK
string userId FK
float height
float weight
int age
string gender
datetime birthday
float targetWeight
int targetCalories
float targetWaterL
string activityLevel
string fitnessGoal
string heightUnit
string weightUnit
datetime syncedAt
boolean isDeleted
}
Workout {
string id PK
string userId FK
string title
string category
int durationMin
int calories
datetime date
string notes
boolean isCompleted
int totalTime
int restTime
datetime syncedAt
boolean isDeleted
}
Exercise {
string id PK
string workoutId FK
string name
int sets
int reps
float weightKg
int duration
float distance
int restTime
int order
boolean isCompleted
datetime syncedAt
boolean isDeleted
}
Meal {
string id PK
string userId FK
string name
string mealType
int calories
float protein
float carbs
float fat
datetime date
string notes
datetime syncedAt
boolean isDeleted
}
MealItem {
string id PK
string mealId FK
string userId FK
string name
int calories
float protein
float carbs
float fat
float quantity
string unit
boolean isHighInProtein
datetime syncedAt
boolean isDeleted
}
ProgressLog {
string id PK
string userId FK
datetime date
float waterL
float sleepHrs
string mood
float weightKg
int steps
int activeMinutes
datetime syncedAt
boolean isDeleted
}
WeightEntry {
string id PK
string userId FK
float weightKg
datetime date
string photo
string notes
float bodyFatPercentage
float muscleMassKg
datetime syncedAt
boolean isDeleted
}
WaterIntake {
string id PK
string userId FK
int amountMl
datetime date
datetime time
datetime syncedAt
boolean isDeleted
}
SleepEntry {
string id PK
string userId FK
float hours
string quality
datetime date
datetime bedtime
datetime wakeTime
string notes
datetime syncedAt
boolean isDeleted
}
Goal {
string id PK
string userId FK
string type
float target
float current
string unit
datetime startDate
datetime endDate
boolean isActive
string notes
datetime syncedAt
boolean isDeleted
}
User ||--o{ HealthProfile : "has"
User ||--o{ Workout : "creates"
User ||--o{ Meal : "logs"
User ||--o{ MealItem : "consumes"
User ||--o{ ProgressLog : "tracks"
User ||--o{ WeightEntry : "records"
User ||--o{ WaterIntake : "drinks"
User ||--o{ SleepEntry : "sleeps"
User ||--o{ Goal : "sets"
Workout ||--o{ Exercise : "contains"
Meal ||--o{ MealItem : "includes"
### Application Flow
```mermaid
flowchart TD
A[User Opens App] --> B{Authenticated?}
B -->|No| C[Onboarding Flow]
B -->|Yes| D{First Time User?}
C --> E[Welcome Screen]
E --> F[Personal Info Collection]
F --> G[Goals Selection]
G --> H[Health Profile Setup]
H --> I[Complete Onboarding]
D -->|Yes| C
D -->|No| J[Main App]
J --> K[Home Dashboard]
K --> L{User Action}
L -->|Meal Planning| M[AI Meal Generator]
L -->|Workout Tracking| N[Workout Library]
L -->|Progress View| O[Analytics Dashboard]
L -->|Profile| P[User Settings]
M --> Q[Image Upload]
Q --> R[Computer Vision Analysis]
R --> S[Recipe Generation]
S --> T[Shopping List]
N --> U[Exercise Selection]
U --> V[Workout Logging]
V --> W[Progress Tracking]
O --> X[Charts & Insights]
X --> Y[Goal Progress]
P --> Z[Health Profile]
Z --> AA[Device Sync]
AA --> BB[Data Export]
- Computer Vision: Upload photos of ingredients for automatic recognition
- GPT-4 Integration: Generate personalized meal plans based on preferences
- Recipe Database: Access to thousands of recipes via Edamam API
- Shopping Lists: Automated grocery lists with Kroger pricing
- Nutrition Tracking: Detailed macro and micronutrient analysis
- Workout Library: 100+ pre-built workouts across categories
- Exercise Tracking: Log sets, reps, weights, and rest periods
- Progress Analytics: Visual charts and progress indicators
- Goal Setting: Personalized fitness targets and milestones
- Weight Tracking: Daily weight entries with photo support
- Water Intake: Hydration monitoring with reminders
- Sleep Tracking: Sleep quality and duration logging
- Mood Tracking: Daily mood and wellness indicators
- Offline Support: Full functionality without internet
- Cloud Sync: Automatic data synchronization
- Device Integration: Health app data import/export
- Personalization: AI-driven recommendations
- React Native: Native performance on mobile
- Expo: Rapid development and deployment
- Web Support: Full web application
- TypeScript: Type-safe development
- SQLite: Local database for offline functionality
- Prisma ORM: Type-safe database operations
- Zustand: Lightweight state management
- Redux Toolkit: Advanced state management
- Kroger API: Real-time grocery pricing
- Edamam API: Recipe database access
- OpenAI API: AI vision and structured ingredient extraction
- Clerk Auth: Secure authentication
- Paid App Pricing: $4.99 iOS App Store target
- HealthKit Permissions: iOS health data sync disclosures
- Release Workflows: EAS build and submit automation
- Analytics: Product usage and retention tracking
graph TD
A[App Root] --> B[Authentication]
A --> C[Onboarding]
A --> D[Main App]
B --> E[Login]
B --> F[Signup]
B --> G[Forgot Password]
C --> H[Welcome]
C --> I[Personal Info]
C --> J[Goals Selection]
C --> K[Complete]
D --> L[Drawer Navigation]
L --> M[Home Tab]
L --> N[Workouts Tab]
L --> O[Meals Tab]
L --> P[Progress Tab]
L --> Q[Profile]
M --> R[Dashboard]
M --> S[Quick Actions]
N --> T[Workout Library]
N --> U[Add Workout]
N --> V[Workout History]
O --> W[Meal Planning]
O --> X[Food Logging]
O --> Y[Recipe Search]
P --> Z[Analytics]
P --> AA[Charts]
P --> BB[Goals]
Q --> CC[Settings]
Q --> DD[App Access]
Q --> EE[Help]
- Welcome/Introduction screens
- Personal information collection
- Goals and preferences setup
- Health profile configuration
- Home dashboard with overview
- Workout tracking and library
- Meal planning and logging
- Progress analytics and charts
- User profile management
- App access status
- Device connections
- Data export/import
- React Native: 0.79.5
- Expo: 53.0.22
- TypeScript: 5.8.3
- NativeWind: 4.1.23 (Tailwind CSS for React Native)
- React Navigation: Drawer and Tab navigation
- Reanimated: 3.17.5 for animations
- Expo Router: File-based routing with API routes
- Prisma: Database ORM with PostgreSQL
- Clerk: Authentication and user management
- Kroger API: Grocery store integration
- Edamam API: Recipe database
- OpenAI API: Computer vision services
- Zustand: Lightweight state management
- Redux Toolkit: Advanced state management
- React Context: Theme and database providers
- SQLite: Local mobile database
- PostgreSQL: Cloud database
- Prisma Accelerate: Database connection pooling
- ESLint: Code linting
- Prettier: Code formatting
- Jest: Testing framework
- EAS Build: App building and deployment
sequenceDiagram
participant U as User
participant A as App
participant L as Local DB
participant S as Sync Store
participant API as API Routes
participant C as Cloud DB
U->>A: Perform Action
A->>L: Save to Local DB
A->>S: Add Sync Operation
S->>API: Send Sync Request
API->>C: Update Cloud DB
C->>API: Confirm Update
API->>S: Mark as Synced
S->>L: Update Local Record
A->>U: Show Success
sequenceDiagram
participant C as Client
participant R as Router
participant A as Auth
participant S as Service
participant E as External API
participant D as Database
C->>R: API Request
R->>A: Validate Token
A->>R: User ID
R->>S: Process Request
S->>E: External API Call
E->>S: Response Data
S->>D: Save/Update Data
D->>S: Confirmation
S->>R: Formatted Response
R->>C: JSON Response
- Core app architecture setup
- Authentication system (Clerk)
- Basic database schema
- Onboarding flow
- Home dashboard
- Basic navigation structure
- Workout tracking system
- Meal logging functionality
- Progress tracking
- Local database implementation
- Basic sync functionality
- UI/UX improvements
- Computer vision for ingredient recognition
- GPT-4 meal plan generation
- Recipe recommendation engine
- Smart shopping list generation
- Nutritional analysis improvements
- Advanced analytics and insights
- Social features and sharing
- Wearable device integration
- Meal prep scheduling
- Advanced goal tracking
- OpenAI-powered planning
- HealthKit sync integration
- Paid iOS app pricing at $4.99
- App Store Connect listing
- TestFlight review and release
- Performance optimization
- Advanced sync capabilities
- Multi-language support
- Advanced personalization
- Enterprise features
Goals: Complete user authentication and onboarding flow
- Clerk authentication setup
- Welcome screens
- Personal information collection
- Goals selection
- Health profile setup
- Onboarding completion
Goals: Establish main app navigation and home dashboard
- Drawer navigation setup
- Tab navigation implementation
- Home dashboard design
- Quick action buttons
- Basic data display
Goals: Implement local database and state management
- SQLite database setup
- Prisma schema implementation
- Zustand store creation
- Data persistence
- Basic CRUD operations
Goals: Complete workout tracking functionality
- Workout library
- Exercise tracking
- Workout logging
- Progress visualization
- Workout history
Goals: Basic meal planning and logging
- Meal logging interface
- Food database integration
- Nutrition tracking
- Meal history
- Basic meal suggestions
Goals: Comprehensive progress monitoring
- Weight tracking
- Water intake logging
- Sleep tracking
- Progress charts
- Goal setting
Goals: Implement cloud synchronization
- Sync service setup
- API routes implementation
- Conflict resolution
- Offline support
- Data backup
Goals: Implement AI-powered features
- Computer vision setup
- GPT-4 integration
- Recipe generation
- Smart recommendations
- Image analysis
Goals: Shopping list and recipe features
- Kroger API integration
- Shopping list generation
- Recipe database
- Meal prep planning
- Cost optimization
Goals: Enhanced analytics and insights
- Advanced charts
- Trend analysis
- Predictive insights
- Performance metrics
- Goal progress tracking
Goals: Prepare paid iOS release
- Set $4.99 pricing target
- Remove subscription-only product surfaces
- Integrate useful HealthKit sync data
- Complete App Store Connect metadata
- Submit production build for review
Goals: Final polish and launch preparation
- Performance optimization
- Bug fixes
- UI/UX improvements
- Testing and QA
- App store preparation
- Node.js 18+
- Bun (recommended) or npm
- Expo CLI
- iOS Simulator (for iOS development)
- Android Studio (for Android development)
-
Clone the repository
git clone https://github.com/jongan69/prepai.git cd prepai -
Install dependencies
bun install # or npm install -
Environment Setup
# Copy environment template cp .env.example .env # Configure environment variables EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_key DATABASE_URL=your_postgresql_url KROGER_CLIENT_ID=your_kroger_client_id KROGER_CLIENT_SECRET=your_kroger_client_secret EDAMAM_APP_ID=your_edamam_app_id EDAMAM_APP_KEY=your_edamam_app_key OPENAI_API_KEY=your_openai_api_key
-
Database Setup
# Generate Prisma client bun run db:generate # Run migrations bun run db:migrate
-
Start Development Server
# Start Expo development server bun run dev # Start with tunnel for device testing bun run dev:tunnel # Platform-specific development bun run dev:ios bun run dev:android bun run dev:web
# Development
bun run dev # Start development server
bun run dev:web # Web development
bun run dev:tunnel # Tunnel for device testing
# Building
bun run prebuild # Prebuild for native platforms
bun run build:all # Build for all platforms
bun run export:web # Export web build
# Database
bun run db:migrate # Run database migrations
bun run db:generate # Generate Prisma client
# Code Quality
bun run lint # Run ESLint
bun run lint:fix # Fix linting issues
bun run format # Format code with Prettier
# Deployment
bun run deploy:web:dev # Deploy web to development
bun run deploy:web:prod # Deploy web to productionPrepAI/
βββ src/
β βββ app/ # Expo Router app directory
β β βββ (root)/ # Mobile-specific routes
β β β βββ (index)/ # Main tab navigation
β β β βββ (onboarding)/ # Onboarding flow
β β β βββ (profile)/ # Profile and settings
β β β βββ (workout)/ # Workout screens
β β β βββ (modals)/ # Modal screens
β β βββ api/ # API routes
β βββ components/ # Reusable components
β β βββ forms/ # Form components
β β βββ layout/ # Layout components
β β βββ screens/ # Screen components
β βββ contexts/ # React contexts
β βββ hooks/ # Custom hooks
β βββ lib/ # Utility libraries
β βββ services/ # Service layer
β βββ stores/ # State management
β βββ utils/ # Utility functions
βββ prisma/ # Database schema and migrations
βββ assets/ # Static assets
βββ dist/ # Build output
βββ docs/ # Documentation
# Authentication
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_key
# Database
DATABASE_URL=postgresql://user:password@host:port/database
# External APIs
KROGER_CLIENT_ID=your_kroger_client_id
KROGER_CLIENT_SECRET=your_kroger_client_secret
EDAMAM_APP_ID=your_edamam_app_id
EDAMAM_APP_KEY=your_edamam_app_key
OPENAI_API_KEY=your_openai_api_key
# App Configuration
EXPO_PUBLIC_APP_ENV=development
EXPO_PUBLIC_API_URL=https://your-api-url.comThe app uses EAS Build for cross-platform builds:
{
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
}
}- Unit Tests: Jest for component and utility testing
- Integration Tests: API route testing
- E2E Tests: Detox for end-to-end testing (planned)
# Run all tests
bun run test -- --runInBand
# Run tests in watch mode
bun run test -- --watch
# Run specific test file
bun run test -- src/components/Button.test.tsx- EAS Build: Automated builds for iOS and Android
- App Store: iOS App Store and Google Play Store
- TestFlight: Beta testing for iOS
- Internal Testing: Android internal testing
- Vercel: Automatic deployments from main branch
- Netlify: Alternative deployment option
- Custom Domain: Configure custom domain
# Validate production readiness
bunx expo-doctor
./node_modules/.bin/tsc --noEmit --pretty false
bun run lint
bun run test -- --runInBand
# Deploy web
bun run deploy:web:prod
# Build and submit iOS
eas build --platform ios --profile production --non-interactive
eas submit --platform ios --latestSee docs/ios-app-store-release.md for the iOS App Store checklist, required production secrets, HealthKit review notes, and the required $4.99 App Store Connect price.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- TypeScript: Strict type checking enabled
- ESLint: Code linting with custom rules
- Prettier: Code formatting
- Conventional Commits: Standard commit message format
- Description: Clear description of changes
- Testing: Include tests for new features
- Documentation: Update docs if needed
- Review: Code review required
- Merge: Squash and merge to main
This project is licensed under the MIT License - see the LICENSE file for details.
- Metro bundler issues: Clear cache with
expo start -c - Database connection: Check DATABASE_URL in .env
- Authentication: Verify Clerk configuration
- Build failures: Check EAS build logs
- Image optimization: Use appropriate image formats and sizes
- Bundle size: Monitor with
expo doctor - Database queries: Optimize with Prisma query analysis
- Memory usage: Monitor with React Native Debugger
PrepAI - Revolutionizing health and fitness with AI-powered insights and personalized recommendations.