The application uses environment variables to manage configuration across different environments (Development, Production, etc.).
- Copy
.env.example to create your local .env file:
- Fill in the values for each variable.
- DO NOT COMMIT your
.env file to version control.
| Variable |
Required |
Description |
Example |
EXPO_PUBLIC_API_URL |
Yes |
The base URL for the backend API. |
https://api.coffeshop.com |
EXPO_PUBLIC_APP_ENV |
Yes |
Current environment (dev, staging, prod). |
development |
| Variable |
Required |
Description |
Example |
EXPO_PUBLIC_ANALYTICS_ID |
No |
ID for tracking analytics (e.g., Google Analytics). |
UA-XXXX-Y |
| Variable |
Required |
Description |
Example |
SENTRY_DSN |
No |
DSN for error reporting. |
https://example@sentry.io/123 |
In Expo, variables prefixed with EXPO_PUBLIC_ are automatically available in your JavaScript code via process.env. Ideally, do not store sensitive secrets (like private API keys) in the client-side code manifest.