# khalidlh/portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a static, client-side portfolio website built to showcase a Full-Stack developer’s profile, work samples and blog links.
- There is no monolithic backend in this repo—everything is delivered as static HTML, CSS and JavaScript. PHP/Laravel and MySQL are only referenced for external case studies, not part of this codebase.

##### File structure
- Top-level files:
- index.html – the single-page entry point
- mycv.pdf – downloadable resume
- assets – all static resources (css, js, images, scss source)
- The SCSS folder is subdivided into abstracts (variables, mixins, utilities), base, components, layout and vendor overrides, indicating a modular, “SMACSS”-style styling architecture.
- No server or API directories—this is purely client-rendered.

##### Key insights from README
- Functionality: personal info, services section, interactive portfolio, blog links, contact form (likely via third-party or static form handler), responsive behavior.

##### Main components
a. Client Browser
– Loads index.html from web host (e.g., GitHub Pages or other static host)
– Requests CSS/JS assets and images from CDN or same host
b. Asset Pipeline (build stage, optional)
– SCSS compiler (node-sass, gulp, webpack, etc.) converts .scss → steller.css
– Bundler/minifier packages JS (steller.js + vendors)
c. Static File Host / CDN
– Serves index.html, assets/css, assets/js, assets/imgs, vendors
– Optionally uses a CDN for faster global delivery
d. Third-party Services (if applicable)
– Contact form handler (e.g., Formspree, Netlify Forms, custom PHP endpoint)
– Analytics or tracking (Google Analytics snippet in steller.js)
– Font Awesome (if linked via CDN)

##### Relationships and interactions
- Browser → HTTP GET → Static Host (index.html)
- Browser parses HTML → issues concurrent GETs for CSS, JS, fonts, images
- JS binds UI behavior (carousel, navbar toggles)
- Contact form → POST → Third-party form endpoint or server script
- (Build stage) SCSS compiler reads /assets/scss/** → outputs /assets/css/steller.css

##### Architectural patterns and principles
- Separation of Concerns:
- HTML structure (index.html)
- Presentation (SCSS → CSS)
- Behavior (JS + jQuery plugins)
- Modular SCSS organization following SMACSS/BEM ideas
- Progressive enhancement: basic HTML + CSS, then JS interactivity
- Static hosting & CDN for high availability and performance

##### Technologies and frameworks to annotate
- SCSS (sass) compiler, Gulp/Webpack (if used)
- Bootstrap 4.3.1 CSS & JS
- jQuery 3.4.1
- Hosting platform (GitHub Pages, Netlify, AWS S3+CloudFront, etc.)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Client Browser"
        Browser["Client Browser"]:::client
        Index["index.html"]:::client
        Resume["mycv.pdf"]:::client
    end
    Browser -->|"HTTP GET index.html"| Index
    Browser -->|"HTTP GET mycv.pdf"| Resume

    subgraph "Asset Pipeline (Build Stage)"
        SCSS["assets/scss (Styling Module)"]:::build
        SCSS_Abstracts["abstracts"]:::build
        SCSS_Base["base"]:::build
        SCSS_Components["components"]:::build
        SCSS_Layout["layout"]:::build
        SCSS_Vendors["vendors/bootstrap-4.3.1"]:::build
        SCSS_Main["steller.scss"]:::build
        Compiler["SCSS Compiler (node-sass)"]:::build
        Bundler["JS Bundler"]:::build
        SCSS --> SCSS_Abstracts
        SCSS --> SCSS_Base
        SCSS --> SCSS_Components
        SCSS --> SCSS_Layout
        SCSS --> SCSS_Vendors
        SCSS --> SCSS_Main
        SCSS_Main --> Compiler
        Compiler --> CSS
        Bundler --> JSModule
    end

    CSS["assets/css/steller.css"]:::host
    JSModule["assets/js/steller.js"]:::host

    Compiler -->|"Deploy CSS"| Host
    Bundler -->|"Deploy JS"| Host

    subgraph "Static File Host / CDN"
        Host["Static Host / CDN"]:::host
        CSS
        JSModule
        IMAGES["assets/imgs"]:::host
        VendorBS["assets/vendors/bootstrap"]:::host
        VendorJQ["assets/vendors/jquery"]:::host
        VendorThemify["assets/vendors/themify-icons"]:::host
        README["README.md"]:::host
    end

    Index -->|"Served by Host"| Host
    Browser -->|"HTTP GET CSS"| CSS
    Browser -->|"HTTP GET JS"| JSModule
    Browser -->|"HTTP GET images/fonts"| IMAGES
    Browser -->|"HTTP GET vendor assets"| VendorBS
    Browser -->|"HTTP GET vendor assets"| VendorJQ
    Browser -->|"HTTP GET vendor assets"| VendorThemify

    subgraph "Third-party Services"
        FormService["Form Handler (Formspree/Netlify)"]:::external
        Analytics["Google Analytics"]:::external
    end

    Browser -->|"HTTP POST form data"| FormService
    JSModule -->|"Analytics snippet"| Analytics

    click Index "https://github.com/khalidlh/portfolio/blob/main/index.html"
    click Resume "https://github.com/khalidlh/portfolio/blob/main/mycv.pdf"
    click CSS "https://github.com/khalidlh/portfolio/blob/main/assets/css/steller.css"
    click SCSS "https://github.com/khalidlh/portfolio/tree/main/assets/scss"
    click SCSS_Abstracts "https://github.com/khalidlh/portfolio/tree/main/assets/scss/abstracts"
    click SCSS_Base "https://github.com/khalidlh/portfolio/tree/main/assets/scss/base"
    click SCSS_Components "https://github.com/khalidlh/portfolio/tree/main/assets/scss/components"
    click SCSS_Layout "https://github.com/khalidlh/portfolio/tree/main/assets/scss/layout"
    click SCSS_Vendors "https://github.com/khalidlh/portfolio/blob/main/assets/scss/vendors/bootstrap-4.3.1"
    click SCSS_Main "https://github.com/khalidlh/portfolio/blob/main/assets/scss/steller.scss"
    click JSModule "https://github.com/khalidlh/portfolio/blob/main/assets/js/steller.js"
    click IMAGES "https://github.com/khalidlh/portfolio/tree/main/assets/imgs"
    click VendorBS "https://github.com/khalidlh/portfolio/tree/main/assets/vendors/bootstrap"
    click VendorJQ "https://github.com/khalidlh/portfolio/tree/main/assets/vendors/jquery"
    click VendorThemify "https://github.com/khalidlh/portfolio/tree/main/assets/vendors/themify-icons"
    click README "https://github.com/khalidlh/portfolio/blob/main/README.md"

    classDef client fill:#ADD8E6,stroke:#000
    classDef build fill:#90EE90,stroke:#000
    classDef host fill:#FFA500,stroke:#000
    classDef external fill:#DDA0DD,stroke:#000
```
