Skip to content

myatthiri98/DailyVita

Repository files navigation

DailyVita - Personalized Vitamin Onboarding App

A beautiful React Native TypeScript application that guides users through a personalized vitamin recommendation onboarding process.

DailyVita App TypeScript Expo

πŸ“± Features

  • 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

πŸ›  Tech Stack

  • 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

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Expo CLI
  • iOS Simulator (for iOS development)
  • Android Studio & Android Emulator (for Android development)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/dailyvita.git
    cd dailyvita
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Start the development server:

    npm start
    # or
    yarn start
  4. Run on specific platforms:

    # iOS
    npm run ios
    
    # Android
    npm run android
    
    # Web
    npm run web

πŸ“ Project Structure

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

🎯 Usage

Onboarding Flow

  1. Welcome Screen: Introduction to DailyVita
  2. Health Concerns: Select up to 5 health concerns and prioritize them using drag-and-drop
  3. Diet Selection: Choose dietary preferences with helpful tooltips
  4. Allergies: Select common allergies or add custom ones
  5. Lifestyle: Answer questions about sun exposure, smoking, and alcohol consumption
  6. Completion: Data is saved and logged to console in the specified format

Final Data 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"
}

πŸ§ͺ Available Scripts

# 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

🎨 Design System

Colors

  • Primary Green: #2E5D32
  • Light Green: #C8E6C9
  • Background Green: #E8F5E8
  • Accent Orange: #FF6B47
  • Text Dark: #2E5D32
  • Text Light: #666666

Typography

  • Headings: Bold, 20-32px
  • Body Text: Regular/Medium, 14-18px
  • Captions: Regular, 12-14px

πŸš€ Deployment

Expo Build

# Build for iOS
expo build:ios

# Build for Android
expo build:android

# Build for both platforms
expo build:all

EAS Build (Recommended)

# 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

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘₯ Authors

πŸ™ Acknowledgments

  • Design inspiration from modern health and wellness apps
  • Icons and illustrations from various open-source libraries
  • React Native and Expo communities for excellent documentation

πŸ“ž Support

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors