Environment Configuration
Environments
| Env | Base URL | Contoh |
|---|---|---|
| Development | https://dev-api.bitgroup.asia | Local testing |
| Staging | https://staging-api.bitgroup.asia | QA testing |
| Production | https://api.bitgroup.asia | Live users |
Implementasi per Platform
| Platform | Mekanisme |
|---|---|
| Android | Build Variants (productFlavors) |
| iOS | Xcode Schemes + xcconfig |
| Flutter | --dart-define atau --dart-define-from-file |
| RN CLI | .env files + react-native-config |
| RN Expo | app.config.ts + EXPO_PUBLIC_* env vars |
Rules
- Jangan hardcode base URL atau environment-specific values.
- Jangan commit
.envfile ke repository (masukkan ke.gitignore). - Sediakan
.env.examplesebagai template. - Environment variable yang berbeda per env:
- API Base URL
- API Keys (3rd party)
- Feature flags
- Analytics/crash reporting config
- Log level