Skip to content

Phase 6: Operational Features 🗺️🔔

This phase covers the features that interact with the physical world and the ecosystem's reward economy.


🖼️ UI Reference

Map View{: .mobile-frame } Notifications{: .mobile-frame }


🗺️ Kiosk Map (map_screen.dart)

Integrates Google Maps to help users find physical hardware.

Key Logic:

  • API Fetch: Pulls kiosk locations from the Firestore kiosks collection.
  • Marker Color: Changes based on status (available, maintenance, offline).
  • Geo-fencing: Calculates distance from the device current location using the geolocator package.

🔔 Notifications (notifications_screen.dart)

A chronological timeline of system and personal alerts.

  • Types: points_earned, system_announcement, offer_nearby.
  • FCM Integration: Leverages Firebase Cloud Messaging for real-time background delivery.
  • Unread State: Managed locally in Firestore with an isRead flag.

🧧 Rewards Catalog (offers_screen.dart)

The marketplace where points are converted into real-world value.

  • Categories: Groceries, Beauty, Restaurants, etc.
  • Redemption Logic:
    1. Check if user points >= required points.
    2. Subtract points from user profile.
    3. Generate a unique code and store it in user_coupons.