# mazen-sharaf/myportfolio architecture

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

- Interactive diagram: https://gitdiagram.com/mazen-sharaf/myportfolio
- Repository: https://github.com/mazen-sharaf/myportfolio

## Overview

This is a personal portfolio website. A visitor opens the page, and the application composes a single-page portfolio with hero, about, skills, projects, experience, contact, and footer content. Language and theme preferences shape the rendered page and persist in browser storage. The graph covers the sampled React components and state/content modules; the README identifies the site but does not document further runtime integrations.

Main entry points: [`myPortfolio/src/App.tsx`](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/App.tsx) (Page composition), [`myPortfolio/src/components/SectionHeading.tsx`](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/SectionHeading.tsx) (Section heading), [`myPortfolio/src/components/PortfolioSections.tsx`](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx) (Hero section), [`myPortfolio/src/components/Icon.tsx`](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/Icon.tsx) (Icon renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Page composition"]
  node_entry["React entry<br/>[main.tsx]"]
  node_app["Page composition<br/>[App.tsx]"]
  node_header["Navigation header<br/>[Header.tsx]"]
  node_hero["Hero section"]
  node_about["About section"]
  node_skills["Skills section"]
  node_projects["Projects section"]
  node_experience["Experience section"]
  node_contact["Contact section"]
  node_footer["Page footer<br/>[Footer.tsx]"]
  node_icons["Icon renderer<br/>[Icon.tsx]"]
  node_heading["Section heading<br/>[SectionHeading.tsx]"]
end

subgraph group_content["Portfolio content"]
  node_portfolio_data["Skills and projects<br/>[portfolio.ts]"]
  node_translations["Language copy<br/>[translations.ts]"]
  node_age["Age calculation<br/>[calculateAge.ts]"]
  node_logo["Logo source<br/>[logo.ts]"]
end

subgraph group_preferences["User preferences"]
  node_language_hook["Language preference<br/>[useLanguage.ts]"]
  node_theme_hook["Theme preference<br/>[useTheme.ts]"]
  node_storage[("Browser local storage")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_header
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_about
node_app -->|"renders"| node_skills
node_app -->|"renders"| node_projects
node_app -->|"renders"| node_experience
node_app -->|"renders"| node_contact
node_app -->|"renders"| node_footer
node_app -->|"passes content"| node_portfolio_data
node_app -->|"selects copy"| node_translations
node_app -->|"uses preference"| node_language_hook
node_app -->|"uses preference"| node_theme_hook
node_header -->|"renders icons"| node_icons
node_hero -->|"renders icons"| node_icons
node_hero -->|"renders heading"| node_heading
node_about -->|"renders heading"| node_heading
node_skills -->|"renders heading"| node_heading
node_projects -->|"renders heading"| node_heading
node_experience -->|"renders heading"| node_heading
node_contact -->|"renders heading"| node_heading
node_projects -->|"renders icons"| node_icons
node_contact -->|"renders icons"| node_icons
node_projects -->|"renders projects"| node_portfolio_data
node_skills -->|"renders skills"| node_portfolio_data
node_footer -->|"uses logo"| node_logo
node_hero -->|"uses logo"| node_logo
node_translations -->|"calculates age"| node_age
node_language_hook -->|"reads and writes"| node_storage
node_theme_hook -->|"reads and writes"| node_storage

click node_entry "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/main.tsx"
click node_app "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/App.tsx"
click node_header "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/Header.tsx"
click node_hero "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx"
click node_about "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx"
click node_skills "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx"
click node_projects "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx"
click node_experience "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx"
click node_contact "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx"
click node_footer "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/Footer.tsx"
click node_icons "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/Icon.tsx"
click node_heading "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/SectionHeading.tsx"
click node_portfolio_data "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/data/portfolio.ts"
click node_translations "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/i18n/translations.ts"
click node_age "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/utils/calculateAge.ts"
click node_logo "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/utils/logo.ts"
click node_language_hook "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/hooks/useLanguage.ts"
click node_theme_hook "https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/hooks/useTheme.ts"

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_entry,node_app,node_header,node_hero,node_about,node_skills,node_projects,node_experience,node_contact,node_footer,node_icons,node_heading toneBlue
class node_portfolio_data,node_translations,node_age,node_logo toneAmber
class node_language_hook,node_theme_hook,node_storage toneMint
class node_visitor toneIndigo
```

## Components

### Page composition

- [React entry](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/main.tsx): `myPortfolio/src/main.tsx`
- [Page composition](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/App.tsx): `myPortfolio/src/App.tsx`
- [Navigation header](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/Header.tsx): `myPortfolio/src/components/Header.tsx`
- [Hero section](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx): `myPortfolio/src/components/PortfolioSections.tsx`
- [About section](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx): `myPortfolio/src/components/PortfolioSections.tsx`
- [Skills section](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx): `myPortfolio/src/components/PortfolioSections.tsx`
- [Projects section](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx): `myPortfolio/src/components/PortfolioSections.tsx`
- [Experience section](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx): `myPortfolio/src/components/PortfolioSections.tsx`
- [Contact section](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/PortfolioSections.tsx): `myPortfolio/src/components/PortfolioSections.tsx`
- [Page footer](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/Footer.tsx): `myPortfolio/src/components/Footer.tsx`
- [Icon renderer](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/Icon.tsx): `myPortfolio/src/components/Icon.tsx`
- [Section heading](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/components/SectionHeading.tsx): `myPortfolio/src/components/SectionHeading.tsx`

### Portfolio content

- [Skills and projects](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/data/portfolio.ts): `myPortfolio/src/data/portfolio.ts`
- [Language copy](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/i18n/translations.ts): `myPortfolio/src/i18n/translations.ts`
- [Age calculation](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/utils/calculateAge.ts): `myPortfolio/src/utils/calculateAge.ts`
- [Logo source](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/utils/logo.ts): `myPortfolio/src/utils/logo.ts`

### User preferences

- [Language preference](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/hooks/useLanguage.ts): `myPortfolio/src/hooks/useLanguage.ts`
- [Theme preference](https://github.com/mazen-sharaf/myportfolio/blob/main/myPortfolio/src/hooks/useTheme.ts): `myPortfolio/src/hooks/useTheme.ts`
- **Browser local storage**

### Other components

- **Visitor**

## Connections

- Visitor → React entry: opens site (evidence: `README.md`)
- React entry → Page composition: renders (evidence: `myPortfolio/src/main.tsx`)
- Page composition → Navigation header: renders (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Hero section: renders (evidence: `myPortfolio/src/App.tsx`)
- Page composition → About section: renders (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Skills section: renders (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Projects section: renders (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Experience section: renders (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Contact section: renders (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Page footer: renders (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Skills and projects: passes content (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Language copy: selects copy (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Language preference: uses preference (evidence: `myPortfolio/src/App.tsx`)
- Page composition → Theme preference: uses preference (evidence: `myPortfolio/src/App.tsx`)
- Navigation header → Icon renderer: renders icons (evidence: `myPortfolio/src/components/Header.tsx`)
- Hero section → Icon renderer: renders icons (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- Hero section → Section heading: renders heading (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- About section → Section heading: renders heading (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- Skills section → Section heading: renders heading (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- Projects section → Section heading: renders heading (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- Experience section → Section heading: renders heading (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- Contact section → Section heading: renders heading (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- Projects section → Icon renderer: renders icons (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- Contact section → Icon renderer: renders icons (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- Projects section → Skills and projects: renders projects (evidence: `myPortfolio/src/App.tsx`)
- Skills section → Skills and projects: renders skills (evidence: `myPortfolio/src/App.tsx`)
- Page footer → Logo source: uses logo (evidence: `myPortfolio/src/components/Footer.tsx`)
- Hero section → Logo source: uses logo (evidence: `myPortfolio/src/components/PortfolioSections.tsx`)
- Language copy → Age calculation: calculates age (evidence: `myPortfolio/src/i18n/translations.ts`)
- Language preference → Browser local storage: reads and writes (evidence: `myPortfolio/src/hooks/useLanguage.ts`)
- Theme preference → Browser local storage: reads and writes (evidence: `myPortfolio/src/hooks/useTheme.ts`)
