# mahadhsn/portfolio architecture

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

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

## Overview

##### Main Components

A. Frontend Layer (React):
- Pages Module (Home, About, Projects, Resume, Contact)
- Components Module (Navbar, Footer, PDFViewer, etc.)
- State Management (indicated by consts.jsx)

B. Backend Layer (Node.js):
- Serverless Functions (Netlify Functions)
- Contact Handler
- Quote Generator

C. Static Assets:
- Images
- PDF (Resume)

D. External Services:
- Netlify for hosting and serverless function execution

##### Component Relationships

- Client Browser → Frontend
- Frontend → Netlify Functions
- Frontend → Static Assets
- Netlify Functions → External Services (if any)

##### Specific Implementation Details

A. Frontend Architecture:
- Frontend (React)
- Pages
- Components
- Styling (TailwindCSS)
- State Management

B. Backend Architecture:
- Netlify Functions
- contact.js
- quote.js

##### Technical Stack Indicators

Technology badges or labels for:
- React
- Node.js
- TailwindCSS
- Netlify
- Vite (build tool)

##### Important Notes

- JAMstack architecture
- Separation between static and dynamic content
- Serverless nature of the backend
- Build/deployment pipeline
- How TailwindCSS integrates with the frontend

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
    end

    subgraph "Frontend Layer"
        App["App Component"]:::frontend
        Pages["Pages Module"]:::frontend
        Components["Components Module"]:::frontend
        State["State Management"]:::frontend
        
        subgraph "Pages"
            Home["Home Page"]:::frontend
            About["About Page"]:::frontend
            Projects["Projects Page"]:::frontend
            Resume["Resume Page"]:::frontend
            Contact["Contact Page"]:::frontend
        end
        
        subgraph "Components"
            Navbar["Navigation Bar"]:::frontend
            Footer["Footer"]:::frontend
            PDFViewer["PDF Viewer"]:::frontend
            Quotes["Quotes Component"]:::frontend
        end
    end

    subgraph "Backend Layer"
        subgraph "Netlify Functions"
            ContactHandler["Contact Handler"]:::backend
            QuoteGen["Quote Generator"]:::backend
        end
    end

    subgraph "Static Assets"
        Images["Images"]:::static
        PDF["Resume PDF"]:::static
    end

    subgraph "Infrastructure"
        Netlify["Netlify Platform"]:::infra
        Build["Build System"]:::infra
    end

    Browser --> App
    App --> Pages
    App --> Components
    App --> State
    Contact --> ContactHandler
    Quotes --> QuoteGen
    Resume --> PDFViewer
    PDFViewer --> PDF
    Components --> Images
    Build --> Netlify

    classDef frontend fill:#3b82f6,color:white
    classDef backend fill:#22c55e,color:white
    classDef static fill:#eab308,color:white
    classDef infra fill:#6b7280,color:white

    click App "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/App.jsx"
    click Pages "https://github.com/mahadhsn/Portfolio/tree/main/src/frontend/pages/"
    click Home "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/pages/Home.jsx"
    click About "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/pages/About.jsx"
    click Projects "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/pages/Projects.jsx"
    click Resume "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/pages/Resume.jsx"
    click Contact "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/pages/Contact.jsx"
    click Components "https://github.com/mahadhsn/Portfolio/tree/main/src/frontend/components/"
    click Navbar "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/components/Navbar.jsx"
    click Footer "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/components/Footer.jsx"
    click PDFViewer "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/components/PDFViewer.jsx"
    click Quotes "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/components/Quotes.jsx"
    click State "https://github.com/mahadhsn/Portfolio/blob/main/src/frontend/consts.jsx"
    click ContactHandler "https://github.com/mahadhsn/Portfolio/blob/main/src/netlify/functions/contact.js"
    click QuoteGen "https://github.com/mahadhsn/Portfolio/blob/main/src/netlify/functions/quote.js"
    click Images "https://github.com/mahadhsn/Portfolio/tree/main/public/images/"
    click PDF "https://github.com/mahadhsn/Portfolio/blob/main/public/mahadresume.pdf"
    click Build "https://github.com/mahadhsn/Portfolio/blob/main/vite.config.js"
    click Netlify "https://github.com/mahadhsn/Portfolio/blob/main/netlify.toml"
```
