A beautiful React Native TypeScript application that guides users through a personalized vitamin recommendation onboarding process.
- Multi-step Onboarding Flow: Guided user experience with progress tracking
- Health Concerns Selection: Select and prioritize up to 5 health concerns with drag-and-drop functionality
- Diet Preferences: Choose dietary preferences with interactive tooltips
- Allergy Management: Select common allergies and add custom allergies
- Lifestyle Assessment: Radio button questionnaire for lifestyle factors
- Data Persistence: Save user preferences using AsyncStorage
- Beautiful UI: Modern design with smooth animations and transitions
- Cross-Platform: Works on both iOS and Android
- Framework: React Native with Expo
- Language: TypeScript
- State Management: Redux Toolkit
- Navigation: React Navigation 6
- Async Operations: Redux Toolkit Query
- Storage: AsyncStorage
- Gestures: React Native Gesture Handler
- Drag & Drop: React Native Draggable FlatList
- Icons: React Native Vector Icons
- Safe Area: React Native Safe Area Context
- Node.js (v16 or higher)
- npm or yarn
- Expo CLI
- iOS Simulator (for iOS development)
- Android Studio & Android Emulator (for Android development)
-
Clone the repository:
git clone https://github.com/yourusername/dailyvita.git cd dailyvita -
Install dependencies:
npm install # or yarn install -
Start the development server:
npm start # or yarn start -
Run on specific platforms:
# iOS npm run ios # Android npm run android # Web npm run web
DailyVita/
βββ src/
β βββ components/ # Reusable UI components
β β βββ CustomButton.tsx # Custom button component
β β βββ ProgressBar.tsx # Progress indicator
β β βββ RadioButton.tsx # Radio button component
β β
β βββ constants/ # App constants
β βββ data/ # Static data files
β β βββ allergies.json # Predefined allergies
β β βββ diets.json # Diet options with tooltips
β β βββ healthconcerns.json # Health concerns data
β βββ hooks/ # Custom React hooks
β βββ navigation/ # Navigation configuration
β β βββ AppNavigator.tsx # Main navigation stack
β βββ screens/ # App screens
β β βββ WelcomeScreen.tsx # Welcome/landing screen
β β βββ HealthConcernsScreen.tsx # Health concerns & prioritization
β β βββ DietsScreen.tsx # Diet selection with tooltips
β β βββ AllergiesScreen.tsx # Allergy selection
β β βββ LifestyleScreen.tsx # Lifestyle questionnaire
β βββ store/ # Redux store configuration
β β βββ index.ts # Store setup
β β βββ slices/ # Redux slices
β β βββ onboardingSlice.ts # Onboarding state management
β βββ types/ # TypeScript type definitions
β β βββ index.ts # Global types
β βββ utils/ # Utility functions
βββ assets/ # Static assets (images, icons)
βββ App.tsx # Root component
βββ app.json # Expo configuration
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ README.md # Project documentation
- Welcome Screen: Introduction to DailyVita
- Health Concerns: Select up to 5 health concerns and prioritize them using drag-and-drop
- Diet Selection: Choose dietary preferences with helpful tooltips
- Allergies: Select common allergies or add custom ones
- Lifestyle: Answer questions about sun exposure, smoking, and alcohol consumption
- Completion: Data is saved and logged to console in the specified format
The app outputs data in the following JSON format:
{
"health_concerns": [
{ "id": 1, "name": "Sleep", "priority": 1 },
{ "id": 2, "name": "Immunity", "priority": 2 }
],
"diets": [{ "id": 1, "name": "Vegan", "tool_tip": "Description..." }],
"is_daily_exposure": true,
"is_smoke": false,
"alcohol": "0-1",
"allergies": [{ "id": 1, "name": "Milk" }],
"custom_allergies": "Custom allergy text",
"timestamp": "2024-01-01T00:00:00.000Z"
}# Development
npm start # Start Expo development server
npm run ios # Run on iOS simulator
npm run android # Run on Android emulator
npm run web # Run on web browser
# Code Quality
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues
npm run format # Format code with Prettier
npm run type-check # Run TypeScript type checking
# Build
npm run build # Build for production- Primary Green:
#2E5D32 - Light Green:
#C8E6C9 - Background Green:
#E8F5E8 - Accent Orange:
#FF6B47 - Text Dark:
#2E5D32 - Text Light:
#666666
- Headings: Bold, 20-32px
- Body Text: Regular/Medium, 14-18px
- Captions: Regular, 12-14px
# Build for iOS
expo build:ios
# Build for Android
expo build:android
# Build for both platforms
expo build:all# Install EAS CLI
npm install -g @expo/eas-cli
# Configure EAS
eas build:configure
# Build for development
eas build --platform all --profile development
# Build for production
eas build --platform all --profile production- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Your Name - Initial work - YourGitHub
- Design inspiration from modern health and wellness apps
- Icons and illustrations from various open-source libraries
- React Native and Expo communities for excellent documentation
If you have any questions or need help with setup, please open an issue or contact us at support@dailyvita.com.
Made with β€οΈ by the DailyVita Team