How scribbleriyad/flutter_all_quran_-hadid_app_restapi works
Project type and purpose
• This is a cross-platform mobile/web application built with Flutter (Dart).
• Its purpose is to display Quran and Hadith content via RESTful API calls, with pages for login, navigation, chapters, hadith lists, and a home screen.
File structure
• Top-level “islamic_book_app” directory contains platform folders (android/, ios/, web/) and the Flutter code in lib/.
• lib/main.dart is the app entry point; lib/pages/ holds UI screens.
• pubspec.yaml lists dependencies and assets.
• test/ contains a sample widget test.
• assets/ and web/manifest files provide static resources.
• No in-repo backend—this is purely a client consuming an external RestAPI.
README
• Very brief, but indicates that the app uses a REST API to fetch all Quran and Hadith content.
Main components
a. Presentation Layer (UI Screens)
• LoginPage
• HomePage
• ChapterPage
• HadithListPage
• NavDrawer
b. Business Logic / State Management
• Controller/ViewModel or setState handlers inside each page
c. Data Layer
• API Service (HTTP client calling external endpoints)
• Data models (e.g., Chapter, Hadith, User)
d. External Systems
• Quran/Hadith REST API server
e. Platform Shells
• Flutter Engine
• Android embed (MainActivity, Gradle build)
• iOS embed (AppDelegate, Xcode project)
• Web host (index.html)
Relationships and interactions
• UI screens send requests to the API service (via HTTP client).
• API service serializes JSON into data models.
• Business logic/state management updates the UI with model data.
• The Flutter Engine houses the entire Dart runtime and renders to each platform.
Architectural patterns and design principles
• Layered architecture (Presentation → Business Logic → Data)
• Dependency inversion: API service should be injected into pages/controllers.
• Single responsibility: each page focuses on one screen’s logic.
• Platform independence: the same Dart code runs on Android, iOS, and Web.
Technologies and frameworks
• Flutter framework (widgets, rendering)
• Dart HTTP or Dio package (for REST calls)
• JSON serialization (built-in or via packages)
• Platform-specific Gradle and Xcode build systems