# mohammadatifhossain/portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- This is a static, single-page portfolio website built with HTML5, CSS3, and vanilla JavaScript.
- Its goal is to showcase professional experience, projects, skills, and provide a contact form via EmailJS.

##### File Structure Analysis
- Top-level files:
- index.html – the entry point and main HTML document
- README.md – project description and usage instructions
- assets/ directory:
- css/styles.css – global styles, theming via CSS variables, layout with Grid/Flexbox
- js/main.js – client-side logic, animations (ScrollReveal.js), EmailJS integration
- img/ – images such as profile picture and portfolio screenshots
- pdf/ – downloadable resume file
- No backend code or server-side logic is present.

##### Architecture Overview
- Core components:
A. Client (Web Browser)
B. Static Hosting (Netlify, Vercel, GitHub Pages) + optional CDN layer
C. Asset Store (CSS, JS, Images, PDF)
D. External Service: EmailJS API for contact form emails
- Data Flow:
1. Browser requests index.html from the static host.
2. Browser fetches CSS, JS, images, PDF from the same host or CDN.
3. main.js initializes UI animations (ScrollReveal) and theme toggles, handles section navigation.
4. On contact form submission, main.js calls EmailJS REST API (service ID, template ID, public key) to send email.
5. EmailJS responds directly to the client; form success/failure is handled in the browser.

##### Important Patterns and Technologies
- Static Site Hosting Pattern: no dedicated backend, relies on client-side code and third-party APIs.
- Layout Patterns – CSS Grid and Flexbox for responsive sections.
- Third-Party Integration – EmailJS for contact form.

##### Key Takeaways
- Static-site hosting pattern and EmailJS integration.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Client Browser Component
    Client["Client Browser\n• Renders index.html\n• CSS Grid/Flexbox layout\n• JS logic: ScrollReveal, Theme Toggle, Navigation"]:::client

    %% Static Hosting Infrastructure
    StaticHost["Static Host / CDN\n(Netlify, Vercel, GitHub Pages)"]:::host

    subgraph "Asset Store"
        direction TB
        HTML["Entry Point\nindex.html"]:::host
        CSS["Global Styles\nstyles.css"]:::host
        JS["Client-Side Logic\nmain.js"]:::host
        IMG["Image Assets\n(img/)"]:::host
        PDF["Downloadable Resume\nAtif-Cv.pdf"]:::host
    end

    %% External Services
    EmailJS["EmailJS Service\n(REST API)"]:::external
    EmailProvider["User Email Provider\n(e.g., Gmail SMTP)"]:::external

    %% Documentation
    Doc["Project Documentation\nREADME.md"]:::docs

    %% Connections
    Client -->|"HTTP GET assets (HTML, CSS, JS, images, PDF)"| StaticHost
    StaticHost --> AssetStore
    Client -->|"POST contact data (serviceID,templateID,publicKey)"| EmailJS
    EmailJS -->|"Relay email"| EmailProvider

    %% Click Events
    click Client "https://github.com/mohammadatifhossain/portfolio/blob/main/index.html"
    click HTML "https://github.com/mohammadatifhossain/portfolio/blob/main/index.html"
    click CSS "https://github.com/mohammadatifhossain/portfolio/blob/main/assets/css/styles.css"
    click JS "https://github.com/mohammadatifhossain/portfolio/blob/main/assets/js/main.js"
    click IMG "https://github.com/mohammadatifhossain/portfolio/tree/main/assets/img/"
    click PDF "https://github.com/mohammadatifhossain/portfolio/blob/main/assets/pdf/Atif-Cv.pdf"
    click Doc "https://github.com/mohammadatifhossain/portfolio/blob/main/README.md"

    %% Styles
    classDef client fill:#E0F7FA,stroke:#006064,color:#000;
    classDef host fill:#E8F5E9,stroke:#2E7D32,color:#000;
    classDef external fill:#FFF3E0,stroke:#EF6C00,color:#000;
    classDef docs fill:#ECEFF1,stroke:#546E7A,color:#000;
```
