# salahfathy25/tourify architecture

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

- Interactive diagram: https://gitdiagram.com/salahfathy25/tourify
- Repository: https://github.com/salahfathy25/tourify

## Overview

##### Project type and purpose
- This is a cross-platform Flutter “Tourify” mobile/desktop/web application.
- Purpose: allow users to browse tour packages (ancient wonders, modern Egypt, cultural tourism), view details, add to a cart, book tickets, and manage profiles.

##### File structure
- Top-level directories:
- android, ios, macos, linux, windows, web – native platform bindings and build files
- lib – Dart code: app entrypoint, UI screens/pages, state management, models, utilities, assets
- assets/images – static image assets
- pubspec.yaml/pubspec.lock – dependencies and resource declarations
- test – widget tests
- Inside lib:
- lib/app/screens – all UI screens (home_page.dart, details_page.dart, cart_page.dart, register screens)
- lib/app/widgets – reusable UI components
- lib/app/provider – state management (CartModel)
- lib/app/models – data classes (CartItem)
- entrypoint: main.dart

##### README
- Standard Flutter starter README with no extra architectural notes.
- Confirms a client-only Flutter app.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Top-level user
    User["User Device"]:::external

    %% Platform Embedding
    Platform["Platform Embedding\n(Android, iOS, Web, macOS, Windows, Linux)"]:::native
    click Platform "https://github.com/salahfathy25/tourify/tree/main/android/"

    %% Flutter Engine & Framework
    Engine["Flutter Engine & Framework"]:::dartLayer

    %% Presentation Layer
    subgraph "Presentation Layer" 
        direction TB
        subgraph Screens
            direction TB
            Home["home_page.dart"]:::dartLayer
            Details["details_page.dart"]:::dartLayer
            CartPage["cart_page.dart"]:::dartLayer
            BookTickets["book_tickets_page.dart"]:::dartLayer
            Profile["profile_page.dart"]:::dartLayer
            Search["search_page.dart"]:::dartLayer
            Ancient["ancient_wonders_page.dart"]:::dartLayer
            Modern["modern_egypt_page.dart"]:::dartLayer
            Cultural["cultural_tourism_data.dart"]:::dartLayer
            StorePage["store_page.dart"]:::dartLayer
            Videos["videos_page.dart"]:::dartLayer
            subgraph RegisterScreens
                direction TB
                SignUp["signup_page.dart"]:::dartLayer
                SignIn["signin_page.dart"]:::dartLayer
            end
        end
        subgraph Widgets
            direction TB
            WidgetsDir["lib/app/widgets"]:::dartLayer
        end
    end

    %% State Management
    CartModel["CartModel\n(lib/app/provider/cart_model.dart)"]:::dartLayer

    %% Data & Models
    subgraph "Data & Models"
        direction TB
        CartItem["CartItem\n(lib/app/models/cart_item.dart)"]:::dartLayer
        StoreItems["store_items\n(lib/app/lists/store_items.dart)"]:::dartLayer
    end

    %% Asset Layer
    subgraph "Asset Layer"
        direction TB
        Images["assets/images"]:::asset
        Localization["en.json"]:::asset
    end

    %% Constants / Utilities
    subgraph "Constants & Utilities"
        direction TB
        ConstantsDir["lib/core/utils/constants"]:::dartLayer
        Colors["colors.dart"]:::dartLayer
        Sizes["sizes.dart"]:::dartLayer
        Strings["strings.dart"]:::dartLayer
    end

    %% Optional External API
    ExternalAPI["External API (future)"]:::optional

    %% Entrypoint
    Entrypoint["main.dart"]:::dartLayer

    %% Connections
    User --> Platform
    Platform --> Engine
    Engine --> Entrypoint
    Entrypoint --> Home
    Home --> CartPage
    Home --> Details
    Home --> StorePage
    Home --> Search
    Home --> Profile
    Screens --> Widgets
    Home --> Widgets
    Details --> Widgets
    CartPage --> Widgets
    BookTickets --> Widgets
    Entrypoint --> CartModel
    CartModel --> CartItem
    CartModel --> StoreItems
    Home --> CartModel
    CartPage --> CartModel
    BookTickets --> CartModel
    Screens --> Images
    Widgets --> Images
    Entrypoint --> Localization
    Screens --> Localization
    Screens --> ConstantsDir
    Widgets --> ConstantsDir
    ConstantsDir --> Colors
    ConstantsDir --> Sizes
    ConstantsDir --> Strings
    CartModel --> ExternalAPI
    StoreItems --> ExternalAPI

    %% Click events
    click Home "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/home_page.dart"
    click Details "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/details_page.dart"
    click CartPage "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/cart_page.dart"
    click BookTickets "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/book_tickets_page.dart"
    click Profile "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/profile_page.dart"
    click Search "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/search_page.dart"
    click Ancient "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/ancient_wonders_page.dart"
    click Modern "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/modern_egypt_page.dart"
    click Cultural "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/cultural_tourism_data.dart"
    click StorePage "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/store_page.dart"
    click Videos "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/videos_page.dart"
    click SignUp "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/register/signup_page.dart"
    click SignIn "https://github.com/salahfathy25/tourify/blob/main/lib/app/screens/register/signin_page.dart"
    click WidgetsDir "https://github.com/salahfathy25/tourify/tree/main/lib/app/widgets"
    click CartModel "https://github.com/salahfathy25/tourify/blob/main/lib/app/provider/cart_model.dart"
    click CartItem "https://github.com/salahfathy25/tourify/blob/main/lib/app/models/cart_item.dart"
    click StoreItems "https://github.com/salahfathy25/tourify/blob/main/lib/app/lists/store_items.dart"
    click Images "https://github.com/salahfathy25/tourify/tree/main/assets/images"
    click Localization "https://github.com/salahfathy25/tourify/blob/main/lib/en.json"
    click ConstantsDir "https://github.com/salahfathy25/tourify/tree/main/lib/core/utils/constants"
    click Colors "https://github.com/salahfathy25/tourify/blob/main/lib/core/utils/constants/colors.dart"
    click Sizes "https://github.com/salahfathy25/tourify/blob/main/lib/core/utils/constants/sizes.dart"
    click Strings "https://github.com/salahfathy25/tourify/blob/main/lib/core/utils/constants/strings.dart"

    %% Styles
    classDef dartLayer fill:#bbdefb,stroke:#0d47a1,color:#0d47a1
    classDef native fill:#c8e6c9,stroke:#1b5e20,color:#1b5e20
    classDef asset fill:#fff9c4,stroke:#f9a825,color:#f9a825
    classDef external fill:#ffe0b2,stroke:#e65100,color:#e65100
    classDef optional stroke-dasharray: 5 5,fill:#eeeeee,stroke:#616161,color:#424242
```
