# khushnu/portfolio-waleed architecture

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

- Interactive diagram: https://gitdiagram.com/khushnu/portfolio-waleed
- Repository: https://github.com/khushnu/portfolio-waleed

## Overview

##### Project type and purpose
- This is a cross-platform Flutter application (mobile, web, desktop) that serves as a personal portfolio, showcasing data (education, skills, projects), interactive UI components, responsive layouts, and an Android RTMP streaming service.

##### File structure
- Top-level “android”, “ios”, “web”, “linux”, “macos”, “windows” directories each contain the platform-specific boilerplate and native code.
- The “lib” directory contains:
- Data models in lib/Data (education.dart, exp.dart, skill.dart, etc.)
- UI pages in lib/Waleed Portfolio (ToResponsivePage subfolder, pages subfolders for “about”, “contact”, “projects”)
- Reusable functions/services in lib/functions (Alert_Box.dart, GoogleMap_Integration.dart, Rtmp overlay code in ios_livestream.dart & overlaysteam.dart)
- Styles in lib/styles/styles.dart
- Main entry point in lib/main.dart
- Android’s MainActivity.kt and RtmpService.kt implement the RTMP streaming service via a foreground service.
- Build scripts and configuration files: pubspec.yaml, Gradle files, Xcode project files, CMakeLists for desktop.

##### Insights from README
- It is a starter Flutter project extended into a full-blown portfolio.
- No external backend; all data is local or loaded from assets.
- Uses standard Flutter plugin architecture to register native services.

##### Elements
- Clear labels: “UI Layer”, “Service Layer”, “Data Layer”, “Platform Channel”, “Android Native Service”, etc.
- UI → Services → Data / Assets
- Services ↔ Platform Channels → Native Layer
- Flutter Engine between Dart VM and Native Embedder
- Blue rectangles for Dart layers (UI, Services, Data)
- Green for Platform Channels
- Orange for Native code per platform

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Dart Layer
    subgraph "Dart VM & Flutter Framework"
        direction TB
        Main["Main Application Entry Point"]:::dart
        UI["UI Layer (Widgets / Responsive Layout)"]:::ui
        Services["Service Layer"]:::service
        Data["Data Layer (Models)"]:::data
        Styles["Styles / Theme Definitions"]:::dart
    end

    %% UI Layer details
    subgraph "Responsive Layout"
        direction TB
        Responsive["Responsive Layout Switcher"]:::ui
        Mobile["Mobile UI Entry Point"]:::ui
        Tablet["Tablet UI Entry Point"]:::ui
        Desktop["Desktop UI Entry Point"]:::ui
    end

    subgraph "Pages"
        direction TB
        About["About Page Widgets"]:::ui
        Projects["Projects Page Widgets"]:::ui
        Contact["Contact Page Widgets"]:::ui
    end

    %% Service Layer details
    subgraph "Service Layer"
        direction TB
        Utils["General Utilities"]:::service
        Maps["Google Maps Integration"]:::service
        Theme["Theme Switching"]:::service
        Nav["Navigation Helpers"]:::service
        Streaming["RTMP Overlay / Streaming Controllers"]:::service
    end

    %% Assets and Pubspec
    Assets["Asset Store"]:::asset
    Pubspec["Build Configurations (pubspec.yaml)"]:::config

    %% Platform Channels
    Channel["Platform Channel"]:::platform

    %% Native Layers
    subgraph "Android Native Layer" 
        direction TB
        MainAct["MainActivity.kt"]:::native
        RtmpSvc["RtmpService.kt"]:::native
    end

    subgraph "iOS Native Layer"
        direction TB
        AppDel["AppDelegate.swift"]:::native
        PluginRegi_iOS["GeneratedPluginRegistrant"]:::native
    end

    subgraph "macOS Native Layer"
        direction TB
        AppDel_mac["AppDelegate.swift"]:::native
        MainWin["MainFlutterWindow.swift"]:::native
        PluginRegi_mac["GeneratedPluginRegistrant.swift"]:::native
    end

    subgraph "Linux Native Layer"
        direction TB
        LinuxMain["main.cc"]:::native
        LinuxApp["my_application.cc/.h"]:::native
        PluginRegi_linux["generated_plugin_registrant.cc/.h"]:::native
    end

    subgraph "Windows Native Layer"
        direction TB
        WinMain["main.cpp"]:::native
        WinWin["flutter_window.cpp"]:::native
        PluginRegi_win["generated_plugin_registrant.cc/.h"]:::native
    end

    %% Connections
    Main -->|launches| UI
    Main -->|loads| Services
    Main -->|initializes| Data
    Main -->|applies| Styles

    UI -->|uses| Responsive
    Responsive --> Mobile
    Responsive --> Tablet
    Responsive --> Desktop

    Mobile -->|renders| About
    Tablet -->|renders| About
    Desktop -->|renders| About

    Mobile -->|renders| Projects
    Tablet -->|renders| Projects
    Desktop -->|renders| Projects

    Mobile -->|renders| Contact
    Tablet -->|renders| Contact
    Desktop -->|renders| Contact

    Services -->|fetches| Data
    Services -->|loads| Assets
    Services -->|config via| Pubspec

    Services -->|invokes| Channel
    Channel -->|bridges to| MainAct
    Channel -->|bridges to| RtmpSvc
    Channel -->|bridges to| AppDel
    Channel -->|bridges to| AppDel_mac
    Channel -->|bridges to| LinuxMain
    Channel -->|bridges to| WinMain

    Assets --> UI
    Pubspec -->|bundles| Assets

    %% Click Events
    click UI "https://github.com/khushnu/portfolio-waleed/tree/main/lib/Waleed Portfolio"
    click Responsive "https://github.com/khushnu/portfolio-waleed/blob/main/lib/Waleed Portfolio/ToResponsivePage/toResponsiveLayout_Main.dart"
    click Mobile "https://github.com/khushnu/portfolio-waleed/blob/main/lib/Waleed Portfolio/mobile.dart"
    click Tablet "https://github.com/khushnu/portfolio-waleed/blob/main/lib/Waleed Portfolio/tablet.dart"
    click Desktop "https://github.com/khushnu/portfolio-waleed/blob/main/lib/Waleed Portfolio/desktop.dart"
    click About "https://github.com/khushnu/portfolio-waleed/tree/main/lib/Waleed Portfolio/pages/about_page_T_M_D"
    click Projects "https://github.com/khushnu/portfolio-waleed/tree/main/lib/Waleed Portfolio/pages/project_page_T_M_D"
    click Contact "https://github.com/khushnu/portfolio-waleed/tree/main/lib/Waleed Portfolio/pages/contact_page_T_M_D"
    click Data "https://github.com/khushnu/portfolio-waleed/tree/main/lib/Data"
    click Services "https://github.com/khushnu/portfolio-waleed/tree/main/lib/functions"
    click Maps "https://github.com/khushnu/portfolio-waleed/blob/main/lib/functions/GoogleMap_Integration.dart"
    click Theme "https://github.com/khushnu/portfolio-waleed/blob/main/lib/functions/Theme_Switcher.dart"
    click Nav "https://github.com/khushnu/portfolio-waleed/blob/main/lib/functions/navigate.dart"
    click Streaming "https://github.com/khushnu/portfolio-waleed/blob/main/lib/ios_livestream.dart"
    click Streaming "https://github.com/khushnu/portfolio-waleed/blob/main/lib/overlaysteam.dart"
    click Styles "https://github.com/khushnu/portfolio-waleed/blob/main/lib/styles/styles.dart"
    click Main "https://github.com/khushnu/portfolio-waleed/blob/main/lib/main.dart"
    click Assets "https://github.com/khushnu/portfolio-waleed/tree/main/assets/"
    click PluginRegi_iOS "https://github.com/khushnu/portfolio-waleed/blob/main/ios/Flutter/GeneratedPluginRegistrant.h"
    click PluginRegi_iOS "https://github.com/khushnu/portfolio-waleed/blob/main/ios/Flutter/GeneratedPluginRegistrant.m"
    click PluginRegi_iOS "https://github.com/khushnu/portfolio-waleed/blob/main/ios/Runner/Runner-Bridging-Header.h"
    click PluginRegi_mac "https://github.com/khushnu/portfolio-waleed/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift"
    click PluginRegi_linux "https://github.com/khushnu/portfolio-waleed/blob/main/linux/flutter/generated_plugin_registrant.cc"
    click PluginRegi_linux "https://github.com/khushnu/portfolio-waleed/blob/main/linux/flutter/generated_plugin_registrant.h"
    click PluginRegi_win "https://github.com/khushnu/portfolio-waleed/blob/main/windows/flutter/generated_plugin_registrant.cc"
    click PluginRegi_win "https://github.com/khushnu/portfolio-waleed/blob/main/windows/flutter/generated_plugin_registrant.h"
    click MainAct "https://github.com/khushnu/portfolio-waleed/blob/main/android/app/src/main/kotlin/com/example/flutter_application_2/MainActivity.kt"
    click RtmpSvc "https://github.com/khushnu/portfolio-waleed/blob/main/android/app/src/main/kotlin/com/example/flutter_application_2/RtmpService.kt"
    click AppDel "https://github.com/khushnu/portfolio-waleed/blob/main/ios/Runner/AppDelegate.swift"
    click AppDel_mac "https://github.com/khushnu/portfolio-waleed/blob/main/macos/Runner/AppDelegate.swift"
    click MainWin "https://github.com/khushnu/portfolio-waleed/blob/main/macos/Runner/MainFlutterWindow.swift"
    click LinuxMain "https://github.com/khushnu/portfolio-waleed/blob/main/linux/main.cc"
    click LinuxApp "https://github.com/khushnu/portfolio-waleed/blob/main/linux/my_application.cc/my_application.h"
    click WinMain "https://github.com/khushnu/portfolio-waleed/blob/main/windows/runner/main.cpp"
    click WinWin "https://github.com/khushnu/portfolio-waleed/blob/main/windows/runner/flutter_window.cpp"

    %% Styles
    classDef ui fill:#D0E8FF,stroke:#0366D6,color:#0366D6
    classDef service fill:#E0F7FA,stroke:#0097A7,color:#006064
    classDef data fill:#F0F0F0,stroke:#B0B0B0,color:#333
    classDef dart fill:#E8EAF6,stroke:#3949AB,color:#1A237E
    classDef platform fill:#E8F5E9,stroke:#43A047,color:#1B5E20
    classDef native fill:#FFF3E0,stroke:#FB8C00,color:#E65100
    classDef asset fill:#ECEFF1,stroke:#607D8B,color:#263238
    classDef config fill:#F3E5F5,stroke:#8E24AA,color:#4A148C
```
