How muhammadtalhasultan/sirat-e-mustaqeem works
Major Components
• Mobile Application: Represent the overall Flutter app that spans both Android and iOS.
• Presentation Layer (UI): This is handled by Flutter widgets, screens, and layouts found in directories like lib/src/features/[feature]/screen and lib/src/features/[feature]/widget.
• Business Logic Layer: Emphasize the BLoC pattern being used. Each major feature (e.g., Allah Names, Quran, Bookmark, Prayer Timing, Tasbih, etc.) has its dedicated BLoC subfolder managing events, states, and business logic.
• Data & Network Layer: Identify services for API interactions (lib/src/core/network), local databases (lib/src/core/database), and error handling (lib/src/core/error). These modules are responsible for fetching data from external sources or local storage.
• Controllers and Utilities: Mark the role of controllers (located in lib/src/core/util/controller and lib/src/features/[feature]/controller) and utility models that help connect UI and BLoCs.
• Assets and Resources: Include the folder for assets (images, fonts, sound) and configuration files that support the UI (design and theming in lib/src/core/theme, assets folder etc.).
Relationships and Interactions
• The UI (Screens/Widgets) initiates user interactions, sending events to the corresponding BLoC.
• The BLoC layer processes events using business logic, fetching or updating data via the Data/Network layer or through local controllers.
• Data is retrieved from services such as the API service (lib/src/core/network/api_service.dart) or the local database service (lib/src/core/database/database_service.dart) and then stream updates back to the UI.
• Error handling and notification modules sit alongside, catching failures and informing the UI (via BLoC state updates) to render error dialogs or notifications.
• You might also include a “Feature Modules” compartment that visually separates key functionalities (e.g., Quran, Dua, Tasbih, Prayer Timing, Qibla, etc.), each of which follows the same general pattern of UI → BLoC → Data Services.
Architectural Patterns & Design Principles
• Use of the BLoC pattern for state management.
• Modular approach where each feature is self-contained (with its own BLoC, UI, and sometimes controllers), which allows for better separation of concerns.
• Recognize the layered architecture: presentation (UI), business logic (BLoC and controllers), and data (network/database/error handling).
Relevant Technologies & Frameworks
• Flutter as the development framework supporting both Android and iOS (the android/ and ios/ directories give context).
• Dart as the programming language.
• BLoC library/pattern (evident in many directories under lib/src/core/util/bloc and lib/src/features/[feature]/bloc).
• Other Flutter plugins responsible for notifications, location, permissions, etc. (these might be referenced in the dependency configuration in pubspec.yaml).
• Under the app, delineate:
• UI Layer: Show components like “Splash Screen”, “Home Screen”, “Quran Screen”, “Dua Screen”, “Tasbih Screen”, etc.
• Utility/Controller Layer: Show “Location Controller”, “Notification Controller”, etc., often used by both BLoCs and UI components.
• Enclose static assets usage by referencing the Assets directory (images, fonts, sounds) used by the UI.