How shehryar-dev/al_quran works
Main Components
• Frontend (Flutter UI Layer):
• Primary "presentation" layer, which contains screens (home_screen, surat_screen, splash_screen, etc.) and common reusable widgets.
• "lib/presentation" folder and its subdirectories, where UI components, widgets, and screen-specific logic reside.
• Business Logic Layer (State Management with Bloc):
• Blocs under "lib/presentation/blocs" for handling state (e.g., adhan_time_bloc, asma_al_husna_bloc, bookmark_bloc, etc.).
• Data Layer:
• "lib/data" directory that contains models (Freezed models for surahs, bookmarks, etc.), repositories (e.g., quran_repository, adhan_repository), network services (using Dio-based API services), and API response handling.
• How repositories interface with both remote APIs (Quran API, Qibla API, Prayer Time API) and potentially local storages.
• Core Layer (Shared Utilities and Resources):
• Dependency Injection:
• Configuration:
• Routing and configuration files in "lib/config", showing how navigation between screens is managed.
• Platform-Specific Shells:
• Nodes for platform-specific components (android, ios, web, macos, windows, linux directories) to indicate that the same Flutter codebase targets multiple platforms.
Relationships and Interactions
• Data Flow:
• Dependency Injection:
• External Services:
• Shared Resources:
• A central node for "Core Resources" to indicate how constants, themes, and utilities are used by multiple layers.
Architectural Patterns and Design Principles
• Layered/Clean Architecture:
• Separation of concerns by grouping different parts of the application as discussed.
• Use of Bloc and GetIt:
• Bloc pattern to show state management and GetIt for dependency management.
• Scalability and Modularity:
• That the repository pattern in “lib/data/repositories” allows swapping between mock and HTTP API implementations (as noted in file names), illustrating flexibility.
Final Checklist
• All major components should be clearly labeled with their folder/role (UI, Bloc, Data, Core/Utils, DI, Config).
• Annotating components with key technologies (e.g., Flutter, Dart, Bloc, GetIt, Dio) to provide context.