feat(env): Implement environment configuration and setup script#43
Conversation
- Expanded .env.example with all required variables including: - AI provider keys (Anthropic, OpenAI) - GitHub OAuth integration - EAS/Expo build configuration - App Store submission variables (iOS/Android) - Optional analytics and monitoring - Created app.config.ts dynamic Expo config: - Environment-specific configuration (dev/staging/prod) - Automatic environment detection - Type-safe environment variable access - Different bundle identifiers per environment - Created src/lib/env.ts for runtime environment validation: - Type-safe EnvironmentConfig interface - validateEnvironment() for startup validation - isFeatureEnabled() for feature flags - apiUrls constants for API endpoints - Created scripts/setup.sh for first-time contributors: - Checks for Node.js 18+ and pnpm - Creates .env.local from .env.example - Installs dependencies - Runs type check - Created docs/development/ENVIRONMENT.md: - Comprehensive environment setup guide - EAS secrets management instructions - Security best practices - Troubleshooting section - Added 10 unit tests for env module - Updated package.json with setup and dev scripts - Updated SETUP.md with quick start instructions Closes #7 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@coderabbitai review |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Actions performedReview triggered.
|
|


Summary
Implements comprehensive environment configuration for Issue #7, enabling proper dev/staging/production builds with type-safe environment variable management.
Changes
Expanded
.env.examplewith all required variables:Created
app.config.tsdynamic Expo config:EXPO_PUBLIC_APP_ENVCreated
src/lib/env.tsfor runtime environment validation:EnvironmentConfiginterfacevalidateEnvironment()for startup validationisFeatureEnabled()for feature flagsapiUrlsconstants for API endpointsCreated
scripts/setup.shfor first-time contributors:.env.localfrom.env.exampleCreated
docs/development/ENVIRONMENT.md:Usage
Quick Start
Closes #7
Test plan
pnpm setupscript works correctly🤖 Generated with Claude Code