# priyankabedwal777/myportfolio architecture

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

- Interactive diagram: https://gitdiagram.com/priyankabedwal777/myportfolio
- Repository: https://github.com/priyankabedwal777/myportfolio

## Overview

##### Project type and purpose
- This is a Next.js full-stack web application using the App Router (“app/” folder) to render pages and a single serverless API endpoint under “app/api/send.”
- Purpose: a static/SSR portfolio or marketing site (hero, about, projects, achievements, contact sections) with a “send” endpoint to deliver emails (likely via an external mail service).

##### File structure
- Top-level “app/” directory follows Next.js App Router conventions:
- layout.js – global layout
- page.js – main entry page
- globals.css – global styles
- api/send/route.js & send.js – serverless function for form submissions
- “components/” holds UI widgets (hero, navbar, project cards, email section, footer, etc.)
- “public/” serves static assets (images, project screenshots)
- Config files: next.config.mjs, tailwind.config.js, postcss.config.js, jsconfig.json, ESLint/.gitignore, package.json
- No databases or internal data stores—only an external email service integration

##### README for additional insights
- Built with create-next-app, uses next/font for Inter Google Font optimization
- No mention of a database or other external systems beyond standard Next.js & Vercel deployment

##### Detail
- SSR vs. SSG behavior if pages are pre-rendered vs. server-rendered
- Don’t hesitate to break the UI layer into its key components (Navbar, Hero, EmailSection) to show how they compose the page

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Nodes and Subgraphs
    subgraph "Client Side"
        Client["Client Browser"]:::frontend
    end

    subgraph "Static Asset CDN" 
        ImgAssets["General Images"]:::frontend
        ProjAssets["Project Assets"]:::frontend
    end

    Client -->|"HTTP GET Page (HTTP GET)"| NextServer["Next.js Server (Vercel Runtime)"]:::backend
    NextServer -->|"HTML (SSR/SSG)"| Client
    Client -->|"GET Assets (CSS, JS, Images)"| ImgAssets
    Client -->|"GET Assets (CSS, JS, Images)"| ProjAssets

    subgraph "Next.js App Router"
        AR["App Router (SSR/SSG layer)"]:::backend
        GL["Global Layout"]:::backend
        PG["Main Entry Page"]:::backend
        GS["Global Stylesheet"]:::backend
        AR --> GL --> PG
        PG --> GS
    end
    NextServer --> AR

    subgraph "React Components"
        Hero["Hero Section"]:::frontend
        Navbar["Navbar"]:::frontend
        NavLink["NavLink"]:::frontend
        Menu["MenuOverlay"]:::frontend
        Tab["TabButton"]:::frontend
        About["About Section"]:::frontend
        ProjectsSec["Project Section"]:::frontend
        ProjectTag["Project Tag"]:::frontend
        Achievements["Achievements Section"]:::frontend
        EmailSection["Email Section"]:::frontend
        Footer["Footer"]:::frontend
        PG --> Hero
        PG --> Navbar
        Navbar --> NavLink
        Navbar --> Menu
        PG --> Tab
        PG --> About
        PG --> ProjectsSec
        ProjectsSec --> ProjectTag
        PG --> Achievements
        PG --> EmailSection
        PG --> Footer
    end

    subgraph "Serverless API"
        API["/api/send (serverless)"]:::backend
        Route["route.js"]:::backend
        Handler["send.js"]:::backend
        API --> Route --> Handler
        Client -->|"HTTP POST (JSON)"| API
        Handler -->|"Send Email (SMTP/API)"| EmailSrv["External Email Service"]:::external
        API -->|"Response (JSON)"| Client
    end

    subgraph "Config & Tooling"
        NextConfig["next.config.mjs"]:::backend
        TailwindConfig["tailwind.config.js"]:::backend
        PostCSS["postcss.config.js"]:::backend
        JSConfig["jsconfig.json"]:::backend
        ESLint[".eslintrc.json"]:::backend
        Package1["package.json"]:::backend
        PackageLock["package-lock.json"]:::backend
    end

    %% Click Events
    click AR "https://github.com/priyankabedwal777/myportfolio/tree/main/app/"
    click GL "https://github.com/priyankabedwal777/myportfolio/blob/main/app/layout.js"
    click PG "https://github.com/priyankabedwal777/myportfolio/blob/main/app/page.js"
    click GS "https://github.com/priyankabedwal777/myportfolio/blob/main/app/globals.css"
    click Route "https://github.com/priyankabedwal777/myportfolio/blob/main/app/api/send/route.js"
    click Handler "https://github.com/priyankabedwal777/myportfolio/blob/main/app/api/send/send.js"
    click Hero "https://github.com/priyankabedwal777/myportfolio/blob/main/components/hero.jsx"
    click Navbar "https://github.com/priyankabedwal777/myportfolio/blob/main/components/navbar.jsx"
    click NavLink "https://github.com/priyankabedwal777/myportfolio/blob/main/components/navlink.jsx"
    click Menu "https://github.com/priyankabedwal777/myportfolio/blob/main/components/menuoverlay.jsx"
    click Tab "https://github.com/priyankabedwal777/myportfolio/blob/main/components/tabbutton.jsx"
    click About "https://github.com/priyankabedwal777/myportfolio/blob/main/components/aboutsection.jsx"
    click ProjectsSec "https://github.com/priyankabedwal777/myportfolio/blob/main/components/projectsection.jsx"
    click ProjectTag "https://github.com/priyankabedwal777/myportfolio/blob/main/components/projecttag.jsx"
    click Achievements "https://github.com/priyankabedwal777/myportfolio/blob/main/components/achievements.jsx"
    click EmailSection "https://github.com/priyankabedwal777/myportfolio/blob/main/components/emailsection.jsx"
    click Footer "https://github.com/priyankabedwal777/myportfolio/blob/main/components/footer.jsx"
    click ImgAssets "https://github.com/priyankabedwal777/myportfolio/tree/main/public/images/"
    click ProjAssets "https://github.com/priyankabedwal777/myportfolio/tree/main/public/projects/"
    click NextConfig "https://github.com/priyankabedwal777/myportfolio/blob/main/next.config.mjs"
    click TailwindConfig "https://github.com/priyankabedwal777/myportfolio/blob/main/tailwind.config.js"
    click PostCSS "https://github.com/priyankabedwal777/myportfolio/blob/main/postcss.config.js"
    click JSConfig "https://github.com/priyankabedwal777/myportfolio/blob/main/jsconfig.json"
    click ESLint "https://github.com/priyankabedwal777/myportfolio/blob/main/.eslintrc.json"
    click Package1 "https://github.com/priyankabedwal777/myportfolio/blob/main/package.json"
    click PackageLock "https://github.com/priyankabedwal777/myportfolio/blob/main/package-lock.json"

    %% Styles
    classDef frontend fill:#CFE2F3,stroke:#08519C,stroke-width:1px
    classDef backend fill:#D4E9D7,stroke:#2E7D32,stroke-width:1px
    classDef external fill:#FFE4B2,stroke:#E65100,stroke-width:1px
    classDef dataflow stroke:#000,stroke-width:1px
```
