# swanand33/my-portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a static, front-end personal portfolio website.
- Its goal is to showcase professional journey, skills, and projects in a responsive, modern UI/UX.
- It uses only HTML, CSS, JavaScript, image assets, and is hosted on Netlify (with form-submission support).

##### File structure
- Top-level files:
- index.html – entry point, main markup
- styles.css – all styling
- script.js – any interactive behavior
- img/ – folder of image assets
- netlify.toml – Netlify configuration (forms, redirects)
- package.json – (optional) metadata, local dev scripts
- No backend code, no server. It’s fully static and delivered via CDN.

##### README for additional insights
- Highlights ‘Responsive Web Design’, ‘Netlify (Hosting & Form Submissions)’
- Emphasizes contact form and social-media integrations.
- No mention of build tools beyond package.json; assume direct deploy.

##### Main components and interactions to capture
a. User’s web browser (client)
– Fetches HTML/CSS/JS & images
– Renders the site; runs script.js
– Submits contact form via Netlify’s form endpoint
– May click out to external social media sites
b. Static hosting environment (Netlify CDN)
– Hosts all static assets
– Serves index.html, CSS, JS, images over HTTPS
– Provides Form-Submission API (serverless form handling)
c. External services
– Social media platforms (GitHub, LinkedIn, Twitter)
– Analytics if any (not currently included but could be added)

##### Relationships / data flows
- Browser → CDN: GET index.html, styles.css, script.js, image assets
- Browser (script.js) → CDN: GET any additional assets
- Browser → Netlify Form API (POST) → Netlify backend
- Browser → External service URLs (social media links)

##### Architectural patterns / design principles
- Static-site architecture (JAMstack style)
- Separation of concerns: HTML for structure, CSS for style, JS for behavior
- CDN for global distribution and performance
- Serverless-enabled form handling (no custom backend)

## Diagram (Mermaid)

```mermaid
flowchart LR
    Browser["Browser\n(User)"]:::client

    subgraph "Netlify CDN & Serverless"
        CDN["Netlify CDN"] 
        subgraph "Static Assets"
            HTML["index.html"]
            CSS["styles.css"]
            JS["script.js"]
            Img["img/*"]
        end
        Forms["Netlify Forms\n(Serverless Function)"]
        NetlifyConfig["netlify.toml"]
        Package["package.json"]
    end

    subgraph "External Social Media"
        GitHub["GitHub"]
        LinkedIn["LinkedIn"]
        Twitter["Twitter"]
    end

    Browser -->|"GET assets (HTML, CSS, JS, Images)\n(HTTPS)"| CDN
    CDN --> HTML
    CDN --> CSS
    CDN --> JS
    CDN --> Img

    Browser -->|"POST Contact Form\n(HTTPS)"| Forms

    Browser -->|"Click Links"| GitHub
    Browser -->|"Click Links"| LinkedIn
    Browser -->|"Click Links"| Twitter

    click HTML "https://github.com/swanand33/my-portfolio/blob/main/index.html"
    click CSS "https://github.com/swanand33/my-portfolio/blob/main/styles.css"
    click JS "https://github.com/swanand33/my-portfolio/blob/main/script.js"
    click Img "https://github.com/swanand33/my-portfolio/tree/main/img/"
    click NetlifyConfig "https://github.com/swanand33/my-portfolio/blob/main/netlify.toml"
    click Package "https://github.com/swanand33/my-portfolio/blob/main/package.json"

    classDef client fill:#e0f7fa,stroke:#0277bd,stroke-width:2px
    classDef hosting fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px
    classDef asset fill:#fff3e0,stroke:#ef6c00,stroke-width:2px
    classDef external fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px

    class Browser client
    class CDN,Forms,NetlifyConfig,Package hosting
    class HTML,CSS,JS,Img asset
    class GitHub,LinkedIn,Twitter external
```
