How fariaislam04/safeguardher-women-safety-app works
Main Components
• Mobile Frontend – Represent the Flutter UI components found in the lib directory. This includes the various screens like authentication, panic button, map, safety tips, record screen, tracking, etc. Also include the custom widgets, navigation (app bar, bottom navbar), and state management (providers).
• Business Logic & Models – Highlight the models (alert_model, user_model, etc.) and provider files that drive the state and data flow across the UI.
• Services Layer – Group the service files:
• Background services: location tracking, camera service, SMS sender, permissions, storage, etc.
• Firebase Services: Firebase messaging, Firestore service, and related configuration from firebase_options.dart.
• Utility modules that help with constants, formatting, logging, and validation.
• Backend & Cloud Functions – Include the Firebase Cloud Functions folder (functions directory) that supplies additional server-side logic on Firebase.
• External Integrations – Denote Firebase (authentication, Firestore, messaging) along with external messaging/SMS services.
• Platform-specific Configurations – Represent the Android and iOS native project folders which handle platform-specific setups and deployment configurations.
Relationships and Data Flow
• Data flow from the user interacting with the Flutter-based UI (screens and widgets) which then communicates with the service layer (e.g., user taps on panic button, triggering background services for SMS, location, and media recording).
• How the providers and models sit in between the UI and service layers to manage state.
• Integration points where Flutter communicates with Firebase services (e.g., using Firestore for storing incident reports, messaging for push notifications) and how Firebase Cloud Functions may process data on the backend.
• Flow of background services (permission, camera, SMS, storage) which operate asynchronously to support the real-time tracking and incident recording features.
Architectural Patterns and Technologies
• The architecture follows a typical Flutter “separation of concerns” approach where UI components (screens/widgets) are separated from business logic (providers/models) and from service integrations.
• Use of asynchronous background services—a critical aspect for real-time tracking, emergency response, and media capture.
• Usage of Firebase connects mobile frontend with cloud storage, messaging, and serverless functions.
• Make a note that although the project is built in Flutter, native code exists in the android and ios folders for platform-specific implementations.