# pranshuverma601/pranshu.portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a frontend-focused web application built with Next.js (React framework)
- It serves a multi-page site (About, Projects, Contact, Resume) with static assets (PDF resume, fonts)
- No custom backend or database is present—content is pre-rendered at build time or served server-side

##### File structure
- src/app – Next.js App Router directory containing route folders (about, contact, projects, resume) and root layouts
- src/components – Reusable UI pieces (Navbar, Footer)
- public – Static assets (resume.pdf, any images or favicon)
- Configuration files (next.config.ts, tsconfig.json, ESLint, PostCSS) define build, lint, and styling pipelines

##### README insights
- Uses Next.js 13+ App Router and next/font for optimized font loading
- Built with Create-Next-App, deployed via Vercel (SSG/SSR, CDN)

##### Main components
- User’s Browser
- Next.js Server/Edge Functions (Vercel Edge Runtime)
- File-based Router (src/app → route handlers & layouts)
- React Components (Navbar, Footer, Page Templates)
- next/font Optimization Service
- Build Pipeline (npm script → Next.js compiler → pre-rendering)
- CDN / Vercel Hosting

##### Relationships and interactions
- Browser → HTTP GET → Vercel CDN edge
- Edge Function (SSR) or CDN cache (SSG) serves pre-rendered HTML
- React hydration on the client uses src/components
- Font optimization: next/font fetches Geist font from Vercel CDN
- Static assets (resume.pdf) delivered directly from public bucket

##### Architectural patterns & design principles
- File-based routing (App Router)
- Hybrid Rendering:
– Static Site Generation (SSG) for truly static pages (resume, projects list)
– Server-Side Rendering (SSR) or Incremental Static Regeneration where dynamic content is needed
- Component-driven UI (atomic design)
- Edge-first deployment (Vercel edge functions + global CDN)

## Diagram (Mermaid)

```mermaid
graph TD
    User["User/Browser"]:::client
    Build["Build Pipeline"]:::build
    CDN["CDN (Vercel Edge Cache)"]:::server
    Edge["Edge Function (SSR)"]:::server
    StaticCache["Static Asset Cache"]:::static
    FontService["next/font Optimization Service"]:::server

    User -->|"HTTP GET /pages"| CDN
    Build -->|"build & deploy"| CDN
    CDN -->|"SSR request"| Edge
    CDN -->|"SSG & Assets"| StaticCache
    Edge --> AppRouterGroup
    FontService -->|"Font Fetch"| CDN

    subgraph "App Router (src/app)"
        RootLayout["layout.tsx"]:::server
        HomePage["page.tsx"]:::server
        AboutPage["about/page.tsx"]:::server
        ContactPage["contact/page.tsx"]:::server
        ProjectsPage["projects/page.tsx"]:::server
        ResumePage["resume/page.tsx"]:::server
        GlobalCSS["globals.css"]:::static
        RootLayout --> HomePage
        HomePage --> AboutPage
        HomePage --> ContactPage
        HomePage --> ProjectsPage
        HomePage --> ResumePage
    end

    subgraph "React Components (src/components)"
        Navbar["Navbar.tsx"]:::server
        Footer["Footer.tsx"]:::server
        HomePage --> Navbar
        HomePage --> Footer
    end

    subgraph "Static Assets (public)"
        ResumePDF["resume.pdf"]:::static
    end

    StaticCache --> ResumePDF

    subgraph "Build & Config"
        NextConfig["next.config.ts"]:::build
        PackageJSON["package.json"]:::build
        TSConfig["tsconfig.json"]:::build
        PostCSS["postcss.config.mjs"]:::build
        ESLint["eslint.config.mjs"]:::build
        README["README.md"]:::build
        NextConfig --> Build
        PackageJSON --> Build
        TSConfig --> Build
        PostCSS --> Build
        ESLint --> Build
        README --> Build
    end

    classDef client fill:#e0f7e9,stroke:#2ecc71,stroke-width:2px
    classDef server fill:#e1f0ff,stroke:#3498db,stroke-width:2px
    classDef build fill:#fff4e6,stroke:#e67e22,stroke-width:2px
    classDef static fill:#f2f2f2,stroke:#7f8c8d,stroke-width:2px

    click RootLayout "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/src/app/layout.tsx"
    click HomePage "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/src/app/page.tsx"
    click AboutPage "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/src/app/about/page.tsx"
    click ContactPage "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/src/app/contact/page.tsx"
    click ProjectsPage "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/src/app/projects/page.tsx"
    click ResumePage "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/src/app/resume/page.tsx"
    click GlobalCSS "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/src/app/globals.css"
    click Navbar "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/src/components/Navbar.tsx"
    click Footer "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/src/components/Footer.tsx"
    click ResumePDF "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/public/resume.pdf"
    click NextConfig "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/next.config.ts"
    click PackageJSON "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/package.json"
    click TSConfig "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/tsconfig.json"
    click PostCSS "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/postcss.config.mjs"
    click ESLint "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/eslint.config.mjs"
    click README "https://github.com/pranshuverma601/pranshu.portfolio/blob/main/README.md"
```
