How hi5sutex/service_provider works
Main Components
• Mobile Frontend – Represent the Flutter app at its center. This includes:
• Admin Panel: All screens and functionalities for administrators (analytics, dashboard, category & service management).
• Provider Panel: All screens for service providers (service management, earnings, live tracking, chat, booking details).
• User Panel: All screens intended for end users (booking, profile management, service details, search and list views).
• Shared Services and Utilities – These include common resources such as:
• Authentication and OTP services (lib/services/otp_service.dart and auth_provider.dart).
• Notification Services (lib/notification_service.dart).
• Utility Functions (location_service.dart, map_utils.dart and global configuration files).
• External Dependencies & Back-end Integrations:
• Firebase: As indicated by firebase.json, firebase_options.dart and google-services.json.
• Possibly third-party integrations (e.g., chat services, payment gateways if further explored).
Relationships and Interaction Flow
• The Flutter Application (lib/main.dart) acts as the entry point that directs user flow based on role using routing and navigation.
• Each panel (Admin, Provider, User) functions as a self-contained module, but they may share common services for cross-platform tasks (authentication, OTP verification, notifications).
• Mobile UI components interact with Firebase and any external APIs for data storage, real-time notifications, and analytics.
• The communications within the screens (e.g., chat functionality in both Provider Panel and User Panel) should be modeled to show two-way interactions.
Architectural Patterns and Design Principles
• Modular Organization – The file tree’s segregation by roles indicates a modular design where each user type is developed as an independent module within the same Flutter project.
• Clear Separation of Concerns – UI (in each panel’s screens) is separated from service logic (in lib/services, lib/utils, etc.).
• Reusability – Common functionalities (like CustomSnackBar and global configurations) are shared across modules.
• Integration with third-party services (Firebase) hints at leveraging cloud capabilities for back-end services.