A React Native mobile application for health tracking, emotional journaling, and coach appointment scheduling.
- Integrated Calendar: View and manage your health journey with a comprehensive calendar
- Emotional Journal: Track your moods, add notes, and upload photos to document your health journey
- Appointment Scheduling: Book and manage sessions with your health coach
- Content Sharing: Control which journal entries and health data are shared with your coach
- Google Authentication: Secure login with Google account integration
- Frontend: React Native with Expo
- Backend: Firebase (Authentication, Firestore, Storage)
- State Management: React Context API
- Navigation: React Navigation
- UI Components: Custom components with consistent styling
ephra/
├── app/ # Main application code
│ ├── assets/ # Images, fonts, etc.
│ ├── components/ # Reusable UI components
│ │ ├── calendar/ # Calendar components
│ │ ├── journal/ # Journal components
│ │ └── StripeProvider.tsx # Stripe payment provider
│ ├── contexts/ # React context providers
│ │ └── AuthContext.tsx # Authentication context
│ ├── config/ # App configuration
│ │ └── env.ts # Environment configuration
│ ├── hooks/ # Custom React hooks
│ │ └── useAuth.ts # Authentication hook
│ ├── navigation/ # Navigation configuration
│ │ └── AppNavigator.tsx # Main navigation setup
│ ├── screens/ # App screens
│ │ ├── appointments/ # Appointment booking screens
│ │ ├── auth/ # Authentication screens
│ │ ├── calendar/ # Calendar screens
│ │ ├── coach/ # Coach-related screens
│ │ ├── journal/ # Journal screens
│ │ └── profile/ # User profile screens
│ └── services/ # API and service integrations
│ ├── firebase/ # Firebase service functions
│ ├── googleCalendarService.ts # Google Calendar integration
│ └── stripeService.ts # Stripe payment integration
├── assets/ # Global assets
└── [Configuration files] # Various configuration files- Node.js (v18 or later)
- npm or yarn
- Expo CLI
- Firebase account
- Docker and Docker Compose (for development container)
- VS Code with Remote - Containers extension (for development container)
-
Clone the repository
git clone https://github.com/yourusername/ephra.git cd ephra -
Install dependencies
npm install # or yarn install -
Set up environment variables
- Create a
.env.localfile at the root of the project - Fill in your Firebase configuration values
- Add any other required API keys
# Create a .env.local file with the following variables # (see Environment Variables section below for details) touch .env.local # Then edit .env.local with your actual values
- Create a
-
Configure Firebase
- Create a Firebase project
- Enable Authentication (Email/Password and Google)
- Set up Firestore database
- Set up Storage
-
Start the development server
npm start # or yarn start -
Run on a device or emulator
- Press
ifor iOS simulator - Press
afor Android emulator - Press
wfor web browser - Scan the QR code with the Expo Go app on your physical device
- Press
-
Install Docker Desktop
-
Install VS Code and the Remote - Containers extension
-
Clone the repository
git clone https://github.com/yourusername/ephra.git cd ephra -
Open the project in VS Code
code . -
When prompted, click "Reopen in Container" or run the command:
- Press
F1and select "Remote-Containers: Reopen in Container"
- Press
-
VS Code will build the development container (this may take a few minutes the first time)
-
Once inside the container, the project dependencies will be automatically installed
-
Set up environment variables and configure Firebase as described in Option 1, steps 3-4
-
Start the development server
npm start # or yarn start -
Access the application:
- Web version: http://localhost:19006
- Use Expo Go app on your physical device by scanning the QR code
- For iOS/Android emulators, additional configuration may be needed
This project uses a comprehensive environment configuration system to manage different deployment environments and service integrations.
# Interactive environment setup
npm run setup:env
# Or choose specific environment
npm run setup:dev # Development
npm run setup:staging # Staging
npm run setup:prod # Production# Check current environment
npm run env:validate
# Show environment info
npm run env:show
# Test API connection
npm run test:api# Environment
APP_ENV=development # development, staging, production
API_BASE_URL=http://localhost:8000/v1 # Backend API endpoint
DEBUG=true # Enable debug logging
# Feature Flags
FEATURE_STRIPE_PAYMENTS=true # Enable payments
FEATURE_GOOGLE_CALENDAR=true # Enable calendar
FEATURE_PUSH_NOTIFICATIONS=true # Enable notifications
# Third-party Services
STRIPE_PUBLISHABLE_KEY=pk_test_... # Stripe payment key
GOOGLE_API_KEY=your_google_api_key # Google servicesFor complete configuration options, see Environment Configuration Guide.
- Primary color: Deep green (#4CAF50) for a sense of calm and nature
- Secondary color: Pastel yellow (#FFF9C4) for warmth and optimism
- Accent: Deep blue (#3F51B5) for interactive elements and highlights