# theashggl/portfolio architecture

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

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

## Overview

1. **Project shape**
   - This is a **Flutter portfolio app** with a strong **web-first** intent, but it also includes the standard **Android, iOS, and Web** Flutter host folders.
   - Architecturally, it is a **client-side UI application**: there is no visible backend, database, or network-service layer in the repo tree.

2. **Primary runtime entry**
   - `lib/main.dart` is the application entrypoint.
   - From there, Flutter bootstraps the widget tree and renders the portfolio UI through the normal Flutter engine/runtime.

3. **Top-level UI composition**
   - `lib/UI/home_page.dart` appears to be the main screen container.
   - The home page delegates to a focused section hierarchy under `lib/UI/SectionsOfHomePage/...`, suggesting the app is composed as a set of reusable page sections rather than one large screen file.

4. **Key feature area: Top Section**
   - The main visible feature in the tree is `TopSection`, located at `lib/UI/SectionsOfHomePage/TopSection/top_section.dart`.
   - This section is split into smaller leaf widgets in `TopSection/Components`, which is a clean boundary for reusable UI parts.

5. **Leaf component boundaries**
   - `bio_text.dart` likely renders the portfolio summary/bio text.
   - `person_pic.dart` likely renders the profile image/avatar.
   - `menu.dart` likely renders navigation or section switching controls.
   - This separation suggests a diagram should show **one container section** composed of **small, presentation-focused widgets**.

6. **Data / behavior layer**
   - `lib/Data/menu_functionality.dart` indicates some logic for menu interaction or menu content is centralized outside the widgets themselves.
   - The architecture therefore has a small but distinct **data/helper layer** that supports UI behavior, rather than embedding all logic directly in presentation widgets.

7. **Content and assets**
   - The repo includes an `assets` folder, which implies the portfolio UI likely depends on bundled static resources such as images or icons.
   - Since the app is a portfolio, most content is probably **static or locally defined** in Dart files and assets, not fetched from an API.

8. **Platform shells**
   - `android/` and `ios/` are standard Flutter platform wrappers.
   - On Android, `MainActivity.kt` is the native host entrypoint; on iOS, `AppDelegate.swift` is the native host entrypoint.
   - These layers are mostly thin launch/configuration shells around the shared Flutter app.

9. **Web target**
   - `web/` contains the browser entry scaffold: `index.html`, `manifest.json`, and web icons.
   - Because the README explicitly says “Portfolio app especially for web,” the web target is likely the most important deployment surface in the architecture.

10. **Testing boundary**
   - Tests live under `test/widgetTests/...` and are organized by UI component.
   - There are widget tests for the app and for the top-section components, showing a **component-level testing strategy** rather than broad end-to-end coverage.

11. **Build and tooling**
   - `pubspec.yaml` and `pubspec.lock` define Flutter/Dart dependencies and asset bundling.
   - `analysis_options.yaml` indicates static analysis/linting is part of the development workflow.
   - `.github/workflows/workflows.yaml` suggests CI automation exists for validation/building, though the repo tree alone does not show the exact pipeline.

12. **How to draw the architecture**
   - The clearest diagram is: **platform entry shells (web/android/ios) → Flutter app entry (`main.dart`) → page container (`home_page.dart`) → section widget (`TopSection`) → leaf components (`bio_text`, `menu`, `person_pic`)**, with `menu_functionality.dart` as supporting logic and `assets` as static content.
   - The dominant boundary is between **shared Dart UI code** and the **platform-specific wrappers**.

Main entry points: [`test/widgetTests`](https://github.com/theashggl/portfolio/tree/main/test/widgetTests) (Widget tests), [`lib/main.dart`](https://github.com/theashggl/portfolio/blob/main/lib/main.dart) (App entry), [`lib/UI/SectionsOfHomePage/TopSection/top_section.dart`](https://github.com/theashggl/portfolio/blob/main/lib/UI/SectionsOfHomePage/TopSection/top_section.dart) (Top section), [`assets`](https://github.com/theashggl/portfolio/tree/main/assets) (Assets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platforms["Platform shells"]
  node_web_index["Web shell<br/>host entry<br/>[index.html]"]
  node_web_manifest["Web manifest<br/>pwa metadata<br/>[manifest.json]"]
  node_android_main["Android entry<br/>native host<br/>[MainActivity.kt]"]
  node_ios_appdelegate["iOS entry<br/>native host<br/>[AppDelegate.swift]"]
end

subgraph group_app["Flutter app"]
  node_main_dart["App entry<br/>flutter bootstrap<br/>[main.dart]"]
  node_home_page["Home page<br/>screen shell<br/>[home_page.dart]"]
  node_top_section["Top section<br/>section widget<br/>[top_section.dart]"]
  node_bio_text["Bio text<br/>presentation widget<br/>[bio_text.dart]"]
  node_menu_widget["Menu<br/>presentation widget<br/>[menu.dart]"]
  node_person_pic["Profile pic<br/>presentation widget<br/>[person_pic.dart]"]
end

subgraph group_support["Support"]
  node_menu_logic["Menu logic<br/>ui helper"]
  node_assets[("Assets<br/>static content")]
  node_widget_tests["Widget tests<br/>test suite"]
  node_app_test["App test<br/>widget test"]
  node_bio_test["Bio test<br/>widget test"]
  node_menu_test["Menu test<br/>widget test"]
  node_person_test["Pic test<br/>widget test"]
  node_pubspec["Pubspec<br/>dependency config<br/>[pubspec.yaml]"]
  node_analysis["Lint config<br/>analysis config"]
  node_ci_workflow["CI workflow<br/>automation<br/>[workflows.yaml]"]
end

node_web_index -->|"boots"| node_main_dart
node_web_manifest -->|"configures"| node_web_index
node_android_main -->|"launches"| node_main_dart
node_ios_appdelegate -->|"launches"| node_main_dart
node_main_dart -->|"builds"| node_home_page
node_home_page -->|"composes"| node_top_section
node_top_section -->|"contains"| node_bio_text
node_top_section -->|"contains"| node_menu_widget
node_top_section -->|"contains"| node_person_pic
node_menu_widget -->|"uses"| node_menu_logic
node_bio_text -.->|"uses"| node_assets
node_person_pic -.->|"uses"| node_assets
node_widget_tests -->|"includes"| node_app_test
node_widget_tests -->|"includes"| node_bio_test
node_widget_tests -->|"includes"| node_menu_test
node_widget_tests -->|"includes"| node_person_test
node_ci_workflow -.->|"runs"| node_widget_tests
node_ci_workflow -.->|"runs"| node_analysis
node_pubspec -->|"bundles"| node_assets
node_analysis -.->|"checks"| node_main_dart

click node_web_index "https://github.com/theashggl/portfolio/blob/main/web/index.html"
click node_web_manifest "https://github.com/theashggl/portfolio/blob/main/web/manifest.json"
click node_android_main "https://github.com/theashggl/portfolio/blob/main/android/app/src/main/kotlin/com/example/portfolio/MainActivity.kt"
click node_ios_appdelegate "https://github.com/theashggl/portfolio/blob/main/ios/Runner/AppDelegate.swift"
click node_main_dart "https://github.com/theashggl/portfolio/blob/main/lib/main.dart"
click node_home_page "https://github.com/theashggl/portfolio/blob/main/lib/UI/home_page.dart"
click node_top_section "https://github.com/theashggl/portfolio/blob/main/lib/UI/SectionsOfHomePage/TopSection/top_section.dart"
click node_bio_text "https://github.com/theashggl/portfolio/blob/main/lib/UI/SectionsOfHomePage/TopSection/Components/bio_text.dart"
click node_menu_widget "https://github.com/theashggl/portfolio/blob/main/lib/UI/SectionsOfHomePage/TopSection/Components/menu.dart"
click node_person_pic "https://github.com/theashggl/portfolio/blob/main/lib/UI/SectionsOfHomePage/TopSection/Components/person_pic.dart"
click node_menu_logic "https://github.com/theashggl/portfolio/blob/main/lib/Data/menu_functionality.dart"
click node_assets "https://github.com/theashggl/portfolio/tree/main/assets"
click node_widget_tests "https://github.com/theashggl/portfolio/tree/main/test/widgetTests"
click node_app_test "https://github.com/theashggl/portfolio/blob/main/test/widgetTests/portfolio_app_widget_test.dart"
click node_bio_test "https://github.com/theashggl/portfolio/blob/main/test/widgetTests/topSection/bio_text_widget_test.dart"
click node_menu_test "https://github.com/theashggl/portfolio/blob/main/test/widgetTests/topSection/menu_widget_test.dart"
click node_person_test "https://github.com/theashggl/portfolio/blob/main/test/widgetTests/topSection/person_pic_widget_test.dart"
click node_pubspec "https://github.com/theashggl/portfolio/blob/main/pubspec.yaml"
click node_analysis "https://github.com/theashggl/portfolio/blob/main/analysis_options.yaml"
click node_ci_workflow "https://github.com/theashggl/portfolio/blob/main/.github/workflows/workflows.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web_index,node_web_manifest,node_android_main,node_ios_appdelegate toneBlue
class node_main_dart,node_home_page,node_top_section,node_bio_text,node_menu_widget,node_person_pic toneAmber
class node_menu_logic,node_assets,node_widget_tests,node_app_test,node_bio_test,node_menu_test,node_person_test,node_pubspec,node_analysis,node_ci_workflow toneMint
```

## Components

### Platform shells

Thin host wrappers for Flutter on each target platform.

- [Web shell](https://github.com/theashggl/portfolio/blob/main/web/index.html): host entry · Browser bootstrap and manifest for the web target. · `web/index.html`
- [Web manifest](https://github.com/theashggl/portfolio/blob/main/web/manifest.json): pwa metadata · Web app metadata and icon configuration. · `web/manifest.json`
- [Android entry](https://github.com/theashggl/portfolio/blob/main/android/app/src/main/kotlin/com/example/portfolio/MainActivity.kt): native host · Android application host and launch configuration. · `android/app/src/main/kotlin/com/example/portfolio/MainActivity.kt`
- [iOS entry](https://github.com/theashggl/portfolio/blob/main/ios/Runner/AppDelegate.swift): native host · iOS application host and launch configuration. · `ios/Runner/AppDelegate.swift`

### Flutter app

Shared Dart application code and UI composition.

- [App entry](https://github.com/theashggl/portfolio/blob/main/lib/main.dart): flutter bootstrap · Dart entrypoint that starts the Flutter app. · `lib/main.dart`
- [Home page](https://github.com/theashggl/portfolio/blob/main/lib/UI/home_page.dart): screen shell · Primary page container for the portfolio UI. · `lib/UI/home_page.dart`
- [Top section](https://github.com/theashggl/portfolio/blob/main/lib/UI/SectionsOfHomePage/TopSection/top_section.dart): section widget · Main visible section composed from smaller presentation widgets. · `lib/UI/SectionsOfHomePage/TopSection/top_section.dart`
- [Bio text](https://github.com/theashggl/portfolio/blob/main/lib/UI/SectionsOfHomePage/TopSection/Components/bio_text.dart): presentation widget · Renders the portfolio summary or biography text. · `lib/UI/SectionsOfHomePage/TopSection/Components/bio_text.dart`
- [Menu](https://github.com/theashggl/portfolio/blob/main/lib/UI/SectionsOfHomePage/TopSection/Components/menu.dart): presentation widget · Renders navigation or section-switching controls. · `lib/UI/SectionsOfHomePage/TopSection/Components/menu.dart`
- [Profile pic](https://github.com/theashggl/portfolio/blob/main/lib/UI/SectionsOfHomePage/TopSection/Components/person_pic.dart): presentation widget · Renders the profile image or avatar. · `lib/UI/SectionsOfHomePage/TopSection/Components/person_pic.dart`

### Support

Local data, assets, tests, and project tooling.

- [Menu logic](https://github.com/theashggl/portfolio/blob/main/lib/Data/menu_functionality.dart): ui helper · Centralized behavior or content support for menu interactions. · `lib/Data/menu_functionality.dart`
- [Assets](https://github.com/theashggl/portfolio/tree/main/assets): static content · Bundled images, icons, and other local resources. · `assets`
- [Widget tests](https://github.com/theashggl/portfolio/tree/main/test/widgetTests): test suite · Component-level Flutter widget tests. · `test/widgetTests`
- [App test](https://github.com/theashggl/portfolio/blob/main/test/widgetTests/portfolio_app_widget_test.dart): widget test · Test coverage for the application shell. · `test/widgetTests/portfolio_app_widget_test.dart`
- [Bio test](https://github.com/theashggl/portfolio/blob/main/test/widgetTests/topSection/bio_text_widget_test.dart): widget test · Test coverage for the bio text component. · `test/widgetTests/topSection/bio_text_widget_test.dart`
- [Menu test](https://github.com/theashggl/portfolio/blob/main/test/widgetTests/topSection/menu_widget_test.dart): widget test · Test coverage for the menu component. · `test/widgetTests/topSection/menu_widget_test.dart`
- [Pic test](https://github.com/theashggl/portfolio/blob/main/test/widgetTests/topSection/person_pic_widget_test.dart): widget test · Test coverage for the profile picture component. · `test/widgetTests/topSection/person_pic_widget_test.dart`
- [Pubspec](https://github.com/theashggl/portfolio/blob/main/pubspec.yaml): dependency config · Flutter dependencies, asset bundling, and package metadata. · `pubspec.yaml`
- [Lint config](https://github.com/theashggl/portfolio/blob/main/analysis_options.yaml): analysis config · Static analysis and linting rules. · `analysis_options.yaml`
- [CI workflow](https://github.com/theashggl/portfolio/blob/main/.github/workflows/workflows.yaml): automation · GitHub Actions workflow for validation and build automation. · `.github/workflows/workflows.yaml`

## Connections

- Web shell → App entry: boots · The web shell loads the Flutter app.
- Web manifest → Web shell: configures · Manifest metadata supports the web entry page.
- Android entry → App entry: launches · Android host starts the shared Flutter application.
- iOS entry → App entry: launches · iOS host starts the shared Flutter application.
- App entry → Home page: builds · The app entrypoint creates the main page widget.
- Home page → Top section: composes · The home page delegates visible content to the top section.
- Top section → Bio text: contains · Top section includes the bio text component.
- Top section → Menu: contains · Top section includes the menu component.
- Top section → Profile pic: contains · Top section includes the profile picture component.
- Menu → Menu logic: uses · The menu widget relies on shared menu behavior or data.
- Bio text → Assets: uses · Bio presentation may draw from bundled assets.
- Profile pic → Assets: uses · Profile picture rendering depends on bundled assets.
- Widget tests → App test: includes · The test suite includes the app shell test.
- Widget tests → Bio test: includes · The test suite includes the bio component test.
- Widget tests → Menu test: includes · The test suite includes the menu component test.
- Widget tests → Pic test: includes · The test suite includes the profile picture component test.
- CI workflow → Widget tests: runs · CI likely validates the test suite.
- CI workflow → Lint config: runs · CI likely enforces analysis and lint checks.
- Pubspec → Assets: bundles · Pubspec defines app assets and package dependencies.
- Lint config → App entry: checks · Static analysis applies to the Dart application code.
