Skip to main content

Mobile Architecture

The statux-app/ repository is a Flutter application for Statux Alerts.

Structure

lib/
├── main.dart # Entry point
├── config/environment.dart # API URL, Cognito config
├── models/ # Data models
├── services/ # AuthService, ApiService
├── screens/ # UI screens
├── widgets/ # Reusable widgets
└── providers/ # State management

State Management

Uses Provider pattern:

class AlertsProvider extends ChangeNotifier {
List<Alert> _alerts = [];

Future<void> loadAlerts() async {
_alerts = await ApiService.getAlerts();
notifyListeners();
}
}

Configuration

  • API Base URL: https://alerts-api.statux.io/api/v1
  • Cognito Pool: us-east-1_75Rp4zNBg
  • Override with --dart-define: flutter run --dart-define=API_BASE_URL=http://localhost:3001