# amirulirrfaan/iqalqalah architecture

> Architecture diagram of the GitHub repository amirulirrfaan/iqalqalah, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amirulirrfaan/iqalqalah
- Repository: https://github.com/amirulirrfaan/iqalqalah

## Overview

##### Project type and purpose
- This is a cross-platform Flutter application (“iqalqalah”) whose goal is to teach Tajweed via notes, quizzes, and games.
- It targets Android, iOS, Web, Linux, macOS, and Windows (folders: android/, ios/, web/, linux/, macos/, windows/).
- Backend services are provided by Firebase (Firestore, Authentication, etc.).

##### File structure
- Top-level platform runners (android/, ios/, web/, linux/, macos/, windows/) host native shell code and plugin registrants.
- lib/ holds the entire Dart codebase:
– main.dart: app entry point
– firebase_options.dart: auto-generated Firebase config
– screens/: feature modules organized by domain (onboarding, dashboard, game, quiz, note, leaderboard, manage)
– theme/: centralized theming (app_theme.dart)
- assets/images/ and ios/Runner/Assets.xcassets: static resources
- Configuration files: pubspec.yaml, firebase.json, .firebaserc

##### Pull insights from the README
- Core tech stack: Flutter (Dart) + Firebase (Firestore for database, likely Firebase Auth, possibly Cloud Storage or Cloud Functions).
- Primary features: notes viewer, interactive quizzes, gamification (points, leaderboard), user customization.

##### Final reminders
- Every essential component (screens, theming, Firebase config, platform shells).
- Data flows for quizzes, notes retrieval, leaderboard updates, and user profile customization.
- Be precise but avoid unnecessary detail—focus on logical boundaries and interactions.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Native Shells
    subgraph "Native Shells"
        direction TB
        Android["Android Runner"]:::platform
        iOS["iOS Runner"]:::platform
        Web["Web Host"]:::platform
        Linux["Linux Runner"]:::platform
        macOS["macOS Runner"]:::platform
        Windows["Windows Runner"]:::platform
    end

    %% Flutter App
    subgraph "Flutter App"
        direction TB
        Main["main.dart"]:::client
        Config["firebase_options.dart"]:::client
        Theme["app_theme.dart"]:::client

        subgraph "Screens"
            direction TB
            subgraph "Onboarding"
                Welcome["welcome_screen.dart"]:::client
                Character["character_selection_screen.dart"]:::client
            end
            Dashboard["dashboard_screen.dart"]:::client
            Quiz["quiz_screen.dart"]:::client
            subgraph "Game"
                GameMain["game_screen.dart"]:::client
                Memory["memory_game_screen.dart"]:::client
                TicTacToe["tic_tac_toe_screen.dart"]:::client
            end
            subgraph "Notes"
                NotesList["notes_screen.dart"]:::client
                NoteDetail["note_detail_screen.dart"]:::client
            end
            Leaderboard["leaderboard_screen.dart"]:::client
            subgraph "Manage Content"
                ManageNotes["manage_notes_screen.dart"]:::client
                ManageQuiz["manage_quiz_screen.dart"]:::client
            end
        end
    end

    %% Backend Services
    subgraph "Backend Services"
        direction TB
        Auth["Authentication Service"]:::backend
        Firestore["Firestore Database"]:::backend
        Storage["Cloud Storage"]:::backend
        Functions["Cloud Functions"]:::backend
    end

    %% Static Assets
    StaticAssets["Static Assets (assets/images/)"]:::assets

    %% Relationships
    Android -->|hosts| Main
    iOS -->|hosts| Main
    Web -->|hosts| Main
    Linux -->|hosts| Main
    macOS -->|hosts| Main
    Windows -->|hosts| Main

    Main -->|loads| Config
    Main -->|uses| Theme
    Main -->|navigates to| Screens

    Screens -->|Auth flows| Auth
    Screens -->|reads/writes| Firestore
    Screens -->|uploads/downloads| Storage

    Auth -->|secures| Firestore

    Main -->|includes assets| StaticAssets

    %% Click Events
    click Main "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/main.dart"
    click Config "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/firebase_options.dart"
    click Theme "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/theme/app_theme.dart"
    click Welcome "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/onboarding/welcome_screen.dart"
    click Character "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/onboarding/character_selection_screen.dart"
    click Dashboard "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/dashboard/dashboard_screen.dart"
    click Quiz "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/quiz/quiz_screen.dart"
    click GameMain "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/game/game_screen.dart"
    click Memory "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/game/memory_game_screen.dart"
    click TicTacToe "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/game/tic_tac_toe_screen.dart"
    click NotesList "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/note/notes_screen.dart"
    click NoteDetail "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/note/note_detail_screen.dart"
    click Leaderboard "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/leaderboard/leaderboard_screen.dart"
    click ManageNotes "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/manage/manage_notes_screen.dart"
    click ManageQuiz "https://github.com/amirulirrfaan/iqalqalah/blob/main/lib/screens/manage/manage_quiz_screen.dart"
    click Android "https://github.com/amirulirrfaan/iqalqalah/blob/main/android/app/src/main/kotlin/com/example/iqalqalah/MainActivity.kt"
    click iOS "https://github.com/amirulirrfaan/iqalqalah/blob/main/ios/Runner/AppDelegate.swift"
    click iOS "https://github.com/amirulirrfaan/iqalqalah/blob/main/ios/Runner/Info.plist"
    click Web "https://github.com/amirulirrfaan/iqalqalah/blob/main/web/index.html"
    click Linux "https://github.com/amirulirrfaan/iqalqalah/blob/main/linux/main.cc"
    click macOS "https://github.com/amirulirrfaan/iqalqalah/blob/main/macos/Runner/MainFlutterWindow.swift"
    click Windows "https://github.com/amirulirrfaan/iqalqalah/blob/main/windows/runner/main.cpp"
    click StaticAssets "https://github.com/amirulirrfaan/iqalqalah/tree/main/assets/images/"
    click firebase "https://github.com/amirulirrfaan/iqalqalah/blob/main/firebase.json"
    click firerc "https://github.com/amirulirrfaan/iqalqalah/blob/main/.firebaserc"
    click pubspec "https://github.com/amirulirrfaan/iqalqalah/blob/main/pubspec.yaml"

    %% Styles
    classDef client fill:#90CAF9,stroke:#1E88E5,color:#0D47A1,stroke-width:1px;
    classDef platform fill:#A5D6A7,stroke:#388E3C,color:#1B5E20,stroke-width:1px;
    classDef backend fill:#FFCC80,stroke:#F57C00,color:#E65100,stroke-width:1px;
    classDef assets fill:#E0E0E0,stroke:#9E9E9E,color:#424242,stroke-width:1px;
```
