Skip to content

Polymath-Saksh/ZENITH-Frontend

Repository files navigation

ZENITH — Flutter mobile app

ZENITH is a cross-platform Flutter app for environmental risk monitoring and personal safety. The app integrates Microsoft Entra (CIAM) authentication and communicates with the ZENITH Python backend for personalized alerts and data.

Quick overview

  • Features: Home dashboard, SOS, Alerts, Leaderboard, Profile, and AI onboarding.
  • Backend: Python FastAPI service in ZENITH-Backend/ (run locally or use hosted endpoint).

Prerequisites

  • Flutter (stable) installed — check with flutter --version (recommended: latest stable release).
  • Android/iOS tooling configured for your target platforms (Android Studio / Xcode).
  • Node or other dev tools only if you add custom dev scripts.

Setup (local development)

  1. Get dependencies:

    flutter pub get
  2. Create a .env file in the project root containing keys used by the app and backend. Example keys:

TENANT_ID=your-tenant-id
CLIENT_ID=your-client-id
REDIRECT_URI=com.example.zenith://auth
DISCOVERY_URL=https://<tenant>.ciamlogin.com/<tenant-id>/v2.0/.well-known/openid-configuration
BACKEND_BASE=http://127.0.0.1:8000/
BACKEND_CLIENT_ID=your-backend-client-id

Tip: When developing locally, set BACKEND_BASE to the running backend (e.g. http://127.0.0.1:8000/).

Running the app

  • Run on a connected device or emulator:
flutter run
  • Run on a specific device (Android/iOS): flutter run -d <device_id>

Building release

  • Android (release): flutter build apk --release or build app bundle flutter build appbundle
  • iOS (release): flutter build ios --release (requires Xcode and proper signing)

Firebase & platform setup

  • Android: place google-services.json into android/app/.
  • iOS: add GoogleService-Info.plist to ios/Runner/ and configure signing.

Testing

  • Run widget/unit tests:
flutter test

Localization

  • Strings and translations follow l10n/ and l10n.yaml. Use Flutter's built-in localization tooling for updates.

Development tips

  • Use flutter analyze and dart format to keep code style consistent.
  • For authentication flows, ensure REDIRECT_URI matches your Entra app registration.
  • When testing Entra flows together with the backend locally, ensure the backend is running and BACKEND_BASE points to it.

Postman and API testing

  • The backend Postman collections live in ZENITH-Backend/.postman/collections/ and ZENITH-Backend/postman/collections/ — use these to explore endpoints.

Contributing

  • Create a feature branch, add tests, and open a PR against main. CI workflows are in .github/workflows/.

Where to look

  • App entry: lib/main.dart
  • Screens: lib/screens/
  • Services & utils: lib/services/, lib/utils/
  • Assets: assets/ and fonts/

If you'd like, I can also add a short developer HOWTO that shows how to start the backend and the app together for an integrated local flow.

About

ZENITH is a personalised health alerts application that provides forecasted alerts based on your health conditions and surrounding weather & Air quality.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors