This app supports a demo mode for testing and demonstrations without requiring real API data.
Create a .env file in the root directory and add:
EXPO_PUBLIC_DEMO_MODE=trueEdit lib/config/app-config.ts and set:
DEMO_MODE: true, // Change from false to trueYou can customize the demo data in lib/config/app-config.ts:
DEMO_DATA: {
// Flood risk (set to > 70 to test notifications)
floodRisk: 75,
// Weather data
weather: {
temperature: 28,
feelsLike: 26,
condition: "Partly Cloudy",
// ... more fields
},
// Precipitation data
precipitation: {
lastHour: 0.2,
last24Hours: 1.5,
next24HoursForecast: 3.2,
},
// Location
location: "Yangon, Hlaing",
}To test push notifications:
- Enable demo mode
- Set
floodRiskto a value > 70 (e.g., 75, 80, 90) - The app will automatically trigger a notification when the risk exceeds 70%
To use real API data:
- Set
EXPO_PUBLIC_DEMO_MODE=falsein.env, or - Set
DEMO_MODE: falseinlib/config/app-config.ts
- When demo mode is enabled, all API calls are bypassed
- Notifications will work in demo mode if flood risk > 70%
- The app will show demo data immediately without waiting for API responses