# dawoodmdbr/mdbr-portfolio architecture

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

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

## Overview

1. **Overall shape**
   - This is a **single-page frontend portfolio** built as a **static React app**. There is no backend, database, or API layer in this repo; the app is entirely driven by local content files and static assets.

2. **Bootstrapping and runtime**
   - `index.html` is the Vite entry shell, `src/main.tsx` mounts the React tree, and `src/App.tsx` is the top-level app composition point.
   - The app is authored in **TypeScript**, built with **Vite**, styled with **Tailwind CSS/PostCSS**, and animated with **Framer Motion**.

3. **Page-level boundaries**
   - The repo has three page-level views in `src/pages`:  
     - `HomePage.tsx` — main portfolio landing page  
     - `PhotosGallery.tsx` — photography/gallery experience  
     - `MobileBlock.tsx` — alternate or blocked experience for mobile devices
   - This suggests the app branches by route or device context rather than being a single uniform page.

4. **Home page composition**
   - `HomePage` is assembled from section components under `src/components/sections`:  
     - `HeroSection`  
     - `AboutSection`  
     - `ExperienceSection`  
     - `SkillsSection`  
     - `ProjectsSection`  
     - `ContactSection`
   - This is the core information architecture of the portfolio: a vertically structured, section-based landing page.

5. **Navigation and section awareness**
   - `src/components/ui/TopNav.tsx` and `SectionNav.tsx` provide navigation between sections.
   - `src/hooks/useActiveSection.ts` likely tracks scroll position / viewport intersection to highlight the active section in the nav, so navigation is tightly coupled to the one-page scroll layout.

6. **Responsive behavior**
   - `src/hooks/useMobile.ts` and `MobileBlock.tsx` indicate a deliberate split between desktop and mobile behavior.
   - That means responsive handling is not just CSS; there is likely a runtime decision that changes the page experience on small screens.

7. **Data-driven content layer**
   - Most portfolio content is stored outside the UI in `src/data`:
     - `nav.ts` for navigation items
     - `projects.ts` for project metadata
     - `skills.ts` for skill categories
     - `quotes.json` for text snippets/quotes
   - The sections consume these data modules, which keeps the presentation layer separate from the portfolio content.

8. **Reusable UI primitives**
   - `src/components/ui` contains shared building blocks:
     - `ProjectCard.tsx` for project display
     - `Cursor.tsx` for custom pointer behavior
     - `TopNav.tsx` and `SectionNav.tsx` for navigation UI
   - These are reused by the section components, reducing duplication and keeping section files focused on layout and content assembly.

9. **Animation subsystem**
   - `src/animations/variants.ts` centralizes motion presets used by Framer Motion.
   - This creates a small animation boundary: the sections and UI components consume shared motion variants rather than defining animations ad hoc.

10. **Static asset boundary**
   - Images and downloadable assets live in `public/`, including `public/resume.pdf` and image assets under `public/images`.
   - The gallery page and project cards likely reference these assets directly by path, so media is served as static files rather than loaded from an external service.

11. **Types and styling**
   - `src/types/index.ts` defines shared TypeScript models for content structures like projects, skills, or nav items.
   - `src/styles/globals.css` plus Tailwind config provide the global visual system, while component files contain the actual layout and content semantics.

12. **Deployment and hosting**
   - `vercel.json` shows the app is intended for **Vercel** hosting as a static frontend deployment.
   - The architecture is therefore: local content + static assets + React UI, deployed as a host-served SPA with no server-side runtime in this repository.

Main entry points: [`src/pages/HomePage.tsx`](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/pages/HomePage.tsx) (Home page), [`src/App.tsx`](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/App.tsx) (App), [`src/components/sections/ProjectsSection.tsx`](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/ProjectsSection.tsx) (Projects), [`src/components/ui/TopNav.tsx`](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/ui/TopNav.tsx) (Top nav)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_root["App shell"]
  node_node_index_html["index.html<br/>Vite shell<br/>[index.html]"]
  node_node_main_tsx["main.tsx<br/>React bootstrap<br/>[main.tsx]"]
  node_node_app_tsx["App<br/>composition root<br/>[App.tsx]"]
end

subgraph group_group_pages["Pages"]
  node_node_home_page["Home page<br/>landing page<br/>[HomePage.tsx]"]
  node_node_photos_gallery["Gallery<br/>[PhotosGallery.tsx]"]
  node_node_mobile_block["Mobile block<br/>device gate<br/>[MobileBlock.tsx]"]
end

subgraph group_group_sections["Sections"]
  node_node_hero_section["Hero<br/>section<br/>[HeroSection.tsx]"]
  node_node_about_section["About<br/>section<br/>[AboutSection.tsx]"]
  node_node_experience_section["Experience<br/>section"]
  node_node_skills_section["Skills<br/>section<br/>[SkillsSection.tsx]"]
  node_node_projects_section["Projects<br/>section"]
  node_node_contact_section["Contact<br/>section<br/>[ContactSection.tsx]"]
end

subgraph group_group_ui["UI components"]
  node_node_topnav["Top nav<br/>navigation ui<br/>[TopNav.tsx]"]
  node_node_sectionnav["Section nav<br/>[SectionNav.tsx]"]
  node_node_projectcard["Project card<br/>content card<br/>[ProjectCard.tsx]"]
  node_node_cursor(("Cursor<br/>pointer ui<br/>[Cursor.tsx]"))
end

subgraph group_group_data["Content data"]
  node_node_nav_data["Nav data<br/>content model<br/>[nav.ts]"]
  node_node_projects_data["Projects data<br/>content model<br/>[projects.ts]"]
  node_node_skills_data["Skills data<br/>content model<br/>[skills.ts]"]
  node_node_quotes_data["Quotes<br/>text content<br/>[quotes.json]"]
end

subgraph group_group_behavior["Behavior"]
  node_node_use_active_section{{"Active section<br/>scroll hook"}}
  node_node_use_mobile{{"Mobile check<br/>responsive hook<br/>[useMobile.ts]"}}
  node_node_variants{{"Variants<br/>motion presets<br/>[variants.ts]"}}
end

subgraph group_group_assets["Assets"]
  node_node_public_assets[("Public assets<br/>static media")]
  node_node_gallery_assets[("Gallery media<br/>image assets")]
end

subgraph group_group_styles["Styling"]
  node_node_globals_css["Globals<br/>global styles<br/>[globals.css]"]
end

subgraph group_group_types["Types"]
  node_node_types["Types<br/>ts models<br/>[index.ts]"]
end

node_node_index_html -->|"loads"| node_node_main_tsx
node_node_main_tsx -->|"renders"| node_node_app_tsx
node_node_app_tsx -->|"composes"| node_node_home_page
node_node_app_tsx -->|"routes to"| node_node_photos_gallery
node_node_app_tsx -->|"gates"| node_node_mobile_block
node_node_home_page -->|"includes"| node_node_hero_section
node_node_home_page -->|"includes"| node_node_about_section
node_node_home_page -->|"includes"| node_node_experience_section
node_node_home_page -->|"includes"| node_node_skills_section
node_node_home_page -->|"includes"| node_node_projects_section
node_node_home_page -->|"includes"| node_node_contact_section
node_node_topnav -->|"reads"| node_node_nav_data
node_node_sectionnav -->|"uses"| node_node_use_active_section
node_node_topnav -->|"uses"| node_node_use_active_section
node_node_projects_section -->|"uses"| node_node_projectcard
node_node_projects_section -->|"reads"| node_node_projects_data
node_node_skills_section -->|"reads"| node_node_skills_data
node_node_about_section -->|"reads"| node_node_quotes_data
node_node_home_page -->|"uses"| node_node_topnav
node_node_home_page -->|"uses"| node_node_sectionnav
node_node_home_page -->|"uses"| node_node_cursor
node_node_home_page -->|"animates with"| node_node_variants
node_node_mobile_block -->|"uses"| node_node_use_mobile
node_node_photos_gallery -->|"loads"| node_node_gallery_assets
node_node_projects_section -->|"loads"| node_node_public_assets
node_node_app_tsx -->|"imports"| node_node_globals_css
node_node_app_tsx -->|"shares"| node_node_types

click node_node_index_html "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/index.html"
click node_node_main_tsx "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/main.tsx"
click node_node_app_tsx "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/App.tsx"
click node_node_home_page "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/pages/HomePage.tsx"
click node_node_photos_gallery "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/pages/PhotosGallery.tsx"
click node_node_mobile_block "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/pages/MobileBlock.tsx"
click node_node_hero_section "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/HeroSection.tsx"
click node_node_about_section "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/AboutSection.tsx"
click node_node_experience_section "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/ExperienceSection.tsx"
click node_node_skills_section "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/SkillsSection.tsx"
click node_node_projects_section "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/ProjectsSection.tsx"
click node_node_contact_section "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/ContactSection.tsx"
click node_node_topnav "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/ui/TopNav.tsx"
click node_node_sectionnav "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/ui/SectionNav.tsx"
click node_node_projectcard "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/ui/ProjectCard.tsx"
click node_node_cursor "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/ui/Cursor.tsx"
click node_node_use_active_section "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/hooks/useActiveSection.ts"
click node_node_use_mobile "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/hooks/useMobile.ts"
click node_node_variants "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/animations/variants.ts"
click node_node_nav_data "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/data/nav.ts"
click node_node_projects_data "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/data/projects.ts"
click node_node_skills_data "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/data/skills.ts"
click node_node_quotes_data "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/data/quotes.json"
click node_node_public_assets "https://github.com/dawoodmdbr/mdbr-portfolio/tree/main/public"
click node_node_gallery_assets "https://github.com/dawoodmdbr/mdbr-portfolio/tree/main/src/assets/gallery"
click node_node_globals_css "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/styles/globals.css"
click node_node_types "https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/types/index.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_node_index_html,node_node_main_tsx,node_node_app_tsx,node_node_public_assets,node_node_gallery_assets toneBlue
class node_node_home_page,node_node_photos_gallery,node_node_mobile_block,node_node_globals_css toneAmber
class node_node_hero_section,node_node_about_section,node_node_experience_section,node_node_skills_section,node_node_projects_section,node_node_contact_section,node_node_types toneMint
class node_node_topnav,node_node_sectionnav,node_node_projectcard,node_node_cursor toneRose
class node_node_nav_data,node_node_projects_data,node_node_skills_data,node_node_quotes_data toneIndigo
class node_node_use_active_section,node_node_use_mobile,node_node_variants toneTeal
```

## Components

### App shell

Vite entrypoint, React bootstrap, and top-level composition.

- [index.html](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/index.html): Vite shell · HTML entry shell used by Vite to mount the SPA. · `index.html`
- [main.tsx](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/main.tsx): React bootstrap · App entrypoint that mounts the React tree. · `src/main.tsx`
- [App](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/App.tsx): composition root · Top-level React composition point. · `src/App.tsx`

### Pages

Route- or context-level screens for the portfolio experience.

- [Home page](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/pages/HomePage.tsx): landing page · Main portfolio landing experience. · `src/pages/HomePage.tsx`
- [Gallery](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/pages/PhotosGallery.tsx): gallery page · Photography or image gallery experience. · `src/pages/PhotosGallery.tsx`
- [Mobile block](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/pages/MobileBlock.tsx): device gate · Alternate experience shown for mobile or blocked contexts. · `src/pages/MobileBlock.tsx`

### Sections

Home page content sections assembled into the landing page.

- [Hero](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/HeroSection.tsx): section · Opening portfolio introduction section. · `src/components/sections/HeroSection.tsx`
- [About](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/AboutSection.tsx): section · Background and personal summary section. · `src/components/sections/AboutSection.tsx`
- [Experience](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/ExperienceSection.tsx): section · Work history or timeline section. · `src/components/sections/ExperienceSection.tsx`
- [Skills](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/SkillsSection.tsx): section · Capabilities and categories section. · `src/components/sections/SkillsSection.tsx`
- [Projects](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/ProjectsSection.tsx): section · Featured project showcase section. · `src/components/sections/ProjectsSection.tsx`
- [Contact](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/sections/ContactSection.tsx): section · Contact and call-to-action section. · `src/components/sections/ContactSection.tsx`

### UI components

Reusable presentation primitives shared across pages and sections.

- [Top nav](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/ui/TopNav.tsx): navigation ui · Primary navigation for the portfolio layout. · `src/components/ui/TopNav.tsx`
- [Section nav](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/ui/SectionNav.tsx): section nav · Section-aware navigation for the one-page scroll layout. · `src/components/ui/SectionNav.tsx`
- [Project card](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/ui/ProjectCard.tsx): content card · Reusable card for displaying project metadata. · `src/components/ui/ProjectCard.tsx`
- [Cursor](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/components/ui/Cursor.tsx): pointer ui · Custom cursor or pointer interaction layer. · `src/components/ui/Cursor.tsx`

### Content data

Static content modules consumed by the UI.

- [Nav data](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/data/nav.ts): content model · Navigation item definitions. · `src/data/nav.ts`
- [Projects data](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/data/projects.ts): content model · Project metadata used by the projects section and cards. · `src/data/projects.ts`
- [Skills data](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/data/skills.ts): content model · Skill categories and related portfolio content. · `src/data/skills.ts`
- [Quotes](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/data/quotes.json): text content · Static quote or snippet content. · `src/data/quotes.json`

### Behavior

Scroll, responsiveness, and animation concerns.

- [Active section](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/hooks/useActiveSection.ts): scroll hook · Tracks visible section state for navigation highlighting. · `src/hooks/useActiveSection.ts`
- [Mobile check](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/hooks/useMobile.ts): responsive hook · Runtime detection for mobile-specific behavior. · `src/hooks/useMobile.ts`
- [Variants](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/animations/variants.ts): motion presets · Shared Framer Motion animation variants. · `src/animations/variants.ts`

### Assets

Static media and downloadable files served from the public and asset folders.

- [Public assets](https://github.com/dawoodmdbr/mdbr-portfolio/tree/main/public): static media · Images and downloadable files served statically. · `public`
- [Gallery media](https://github.com/dawoodmdbr/mdbr-portfolio/tree/main/src/assets/gallery): image assets · Gallery images stored in the source asset tree. · `src/assets/gallery`

### Styling

Global stylesheet and design system configuration.

- [Globals](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/styles/globals.css): global styles · App-wide stylesheet entry. · `src/styles/globals.css`

### Types

Shared TypeScript models.

- [Types](https://github.com/dawoodmdbr/mdbr-portfolio/blob/main/src/types/index.ts): ts models · Shared TypeScript interfaces and types. · `src/types/index.ts`

## Connections

- index.html → main.tsx: loads · Vite mounts the React runtime from the HTML shell.
- main.tsx → App: renders · Bootstrap code renders the application root.
- App → Home page: composes · Top-level app composes the landing page experience.
- App → Gallery: routes to · App can branch into the gallery experience.
- App → Mobile block: gates · App can switch to the mobile-specific experience.
- Home page → Hero: includes · Landing page starts with the hero section.
- Home page → About: includes · Landing page includes about content.
- Home page → Experience: includes · Landing page includes experience content.
- Home page → Skills: includes · Landing page includes skills content.
- Home page → Projects: includes · Landing page includes project showcase content.
- Home page → Contact: includes · Landing page ends with contact content.
- Top nav → Nav data: reads · Navigation UI is driven by static nav data.
- Section nav → Active section: uses · Section navigation depends on active-section tracking.
- Top nav → Active section: uses · Top navigation highlights the current section.
- Projects → Project card: uses · Projects section renders reusable project cards.
- Projects → Projects data: reads · Project showcase is driven by project metadata.
- Skills → Skills data: reads · Skills section uses structured skill data.
- About → Quotes: reads · About content can incorporate static quotes.
- Home page → Top nav: uses · Home page includes the main navigation UI.
- Home page → Section nav: uses · Home page includes section-aware navigation.
- Home page → Cursor: uses · Home page can apply custom pointer behavior.
- Home page → Variants: animates with · Sections and UI share motion presets.
- Mobile block → Mobile check: uses · Mobile experience is driven by runtime detection.
- Gallery → Gallery media: loads · Gallery renders source images from the asset tree.
- Projects → Public assets: loads · Projects and downloads reference static public assets.
- App → Globals: imports · App pulls in the global visual system.
- App → Types: shares · App-level components rely on shared TypeScript models.
