# ahmedzein-dev/al-taher-jewellery architecture

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

- Interactive diagram: https://gitdiagram.com/ahmedzein-dev/al-taher-jewellery
- Repository: https://github.com/ahmedzein-dev/al-taher-jewellery

## Overview

##### Project Type & Purpose
- This is a multi‐platform Flutter application (mobile: Android/iOS; desktop: Linux/MacOS; web) named “altaher_jewellery.”
- It follows a modular “clean architecture” approach, with features like home, categories, blogs, currency exchange, search, favorites, contact us, about us, and a welcome/splash flow.
- State management is done with BLoC/Cubit. Data comes from remote sources (REST/Firebase), local cache, and core services (e.g., asset, theme managers).

##### File Structure Analysis
- Top‐level platform folders: android/, ios/, linux/, macos/, web/ – these contain platform build & plugin configuration.
- lib/ – the entire Flutter app code, organized into feature modules (home, categories, etc.) and a core folder.
- Each feature follows a “Data → Domain → Presentation” pattern:
– data/data_sources & models & repositories_impl
– domain/entities, repositories, use_cases
– presentation/blocs, screens, widgets
- lib/core/ – cross‐feature assets: constants, enums, error handling, network config, shared widgets, use_cases, managers, utils.
- pubspec.yaml – Flutter dependencies.
- android/, ios/, web/, linux/, macos/ – platform hosts Flutter engine and native configuration.

##### Key README Insights
- No extra architectural notes, so we infer patterns from file layout and naming.

##### Essential Elements
- Component labels (e.g., “CurrencyFirebaseService”).
- Notes on protocol types (REST/Firebase).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer" 
        direction TB
        MainApp["main.dart"]:::main
        HomeFeature["Home Feature Module"]:::feature
        CategoriesFeature["Categories Feature Module"]:::feature
        BlogsFeature["Blogs Feature Module"]:::feature
        CurrencyFeature["Currency Exchange Feature Module"]:::feature
        SearchFeature["Search Feature Module"]:::feature
        FavoritesFeature["Favorites Feature Module"]:::feature
        ContactFeature["Contact Us Feature Module"]:::feature
        AboutFeature["About Us Feature Module"]:::feature
        WelcomeFeature["Welcome/Splash Feature Module"]:::feature
    end

    %% Domain Layer
    subgraph "Domain Layer"
        direction TB
        Entities["Entities"]:::domain
        RepositoryInterfaces["Repositories (Interfaces)"]:::domain
        UseCases["Use Cases"]:::domain
    end

    %% Data Layer
    subgraph "Data Layer"
        direction TB
        RepoImpl["Repository Implementations"]:::data
        RemoteDS["Remote Data Sources"]:::data
        LocalDS["Local Data Sources"]:::data
        ModelsMappers["Models & Mappers"]:::data
    end

    %% Core Shared Layer
    subgraph "Core Shared Layer"
        direction TB
        ErrorHandling["Error Handling"]:::core
        NetworkConfig["Network Config"]:::core
        ManagersServices["Managers & Services"]:::core
        SharedWidgets["Shared Widgets"]:::core
    end

    %% External Systems & Platform Host
    subgraph "External Systems"
        direction TB
        RESTAPI["REST API"]:::external
        FirebaseSvc["Firebase Service"]:::external
        LocalStorage["Local Storage"]:::external
        subgraph "Platform Hosts"
            direction TB
            AndroidHost["Android"]:::platform
            iOSHost["iOS"]:::platform
            LinuxHost["Linux"]:::platform
            MacOSHost["macOS"]:::platform
            WebHost["Web"]:::platform
        end
    end

    %% Connections
    MainApp -->|"uses" | HomeFeature
    HomeFeature -->|"dispatch events"| RepositoryInterfaces
    CategoriesFeature -->|"dispatch events"| RepositoryInterfaces
    BlogsFeature -->|"dispatch events"| RepositoryInterfaces
    CurrencyFeature -->|"dispatch events"| RepositoryInterfaces
    SearchFeature -->|"dispatch events"| RepositoryInterfaces
    FavoritesFeature -->|"dispatch events"| RepositoryInterfaces
    ContactFeature -->|"dispatch events"| RepositoryInterfaces
    AboutFeature -->|"dispatch events"| RepositoryInterfaces
    WelcomeFeature -->|"dispatch events"| RepositoryInterfaces

    RepositoryInterfaces -->|"called by"| UseCases
    UseCases -->|"delegates to"| RepoImpl
    RepoImpl -->|"fetches from"| RemoteDS
    RepoImpl -->|"fetches from"| LocalDS
    RemoteDS -->|"api calls"| RESTAPI
    RemoteDS -->|"firebase calls"| FirebaseSvc
    LocalDS -->|"reads/writes"| LocalStorage

    HomeFeature -->|"uses"| ManagersServices
    CategoriesFeature -->|"uses"| ManagersServices
    BlogsFeature -->|"uses"| ManagersServices
    CurrencyFeature -->|"uses"| ManagersServices
    SearchFeature -->|"uses"| ManagersServices
    FavoritesFeature -->|"uses"| ManagersServices
    ContactFeature -->|"uses"| ManagersServices
    AboutFeature -->|"uses"| ManagersServices
    WelcomeFeature -->|"uses"| ManagersServices

    HomeFeature -->|"uses"| ErrorHandling
    UseCases -->|"propagates errors through"| ErrorHandling

    MainApp -->|"configured by"| NetworkConfig
    MainApp -->|"provides theme via"| ManagersServices

    PlatformChannels -->|"bridges"| AndroidHost
    PlatformChannels -->|"bridges"| iOSHost
    PlatformChannels -->|"bridges"| LinuxHost
    PlatformChannels -->|"bridges"| MacOSHost
    PlatformChannels -->|"bridges"| WebHost
    MainApp -->|"runs on"| PlatformChannels

    %% Click Events
    click HomeFeature "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/home"
    click CategoriesFeature "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/categories"
    click BlogsFeature "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/blogs"
    click CurrencyFeature "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/currency"
    click SearchFeature "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/search"
    click FavoritesFeature "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/favorites"
    click ContactFeature "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/contact_us"
    click AboutFeature "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/about_us"
    click WelcomeFeature "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/welcome"
    click Core "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/lib/core"
    click MainApp "https://github.com/ahmedzein-dev/al-taher-jewellery/blob/main/lib/main.dart"
    click AndroidHost "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/android/"
    click iOSHost "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/ios/"
    click LinuxHost "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/linux/"
    click MacOSHost "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/macos/"
    click WebHost "https://github.com/ahmedzein-dev/al-taher-jewellery/tree/main/web/"

    %% Styles
    classDef feature fill:#cce5ff,stroke:#3399ff,color:#000;
    classDef domain fill:#d4edda,stroke:#28a745,color:#000;
    classDef data fill:#fff3cd,stroke:#ffc107,color:#000;
    classDef core fill:#e2e3e5,stroke:#6c757d,color:#000;
    classDef external fill:#f8d7da,stroke:#dc3545,color:#000;
    classDef platform fill:#f0f0f0,stroke:#999999,color:#000;
    classDef main fill:#cce5ff,stroke:#007bff,color:#000;
    class MainApp main
```
