# 0xpranav/myportfolio architecture

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

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

## Overview

##### Project Type Analysis
This is a frontend-focused web application built with Next.js, primarily serving as a portfolio website template. The architecture should reflect a modern React-based single-page application (SPA) with server-side rendering (SSR) capabilities.

##### Main Components

A. Client-Side Layer:
- Components (Presentational)
- Containers (Business Logic)
- Routing System
- Static Assets

B. Next.js Framework Layer:
- SSR Engine
- Page Router
- Asset Optimization

C. External Services/Integrations:
- Lottie Animations
- CDN for Assets

##### Core Architecture Representation

**┌─ Client Browser ─────────────────────────────┐**

- ┌─ UI Layer ──────────────────────────┐    │
- Navigation                        │    │
- Cards (Certification, Education)  │    │
- Social Links                      │    │

- ┌─ Container Layer ───────────────────┐    │
- Greetings                        │    │
- Skills                           │    │
- Projects                         │    │

- ┘
- ↕
**┌─ Next.js Server ──────────────────────────┐**
- ┌─ Pages Router ─┐  ┌─ Static Assets ─┐   │
- index.js     │  │ - Images        │   │
- _app.js      │  │ - Fonts         │   │
- ContactUs.js │  │ - Lottie Files  │   │
- ┘  └────────────────────  │
- ┘

##### Important Elements to Highlight

a. Component Architecture:
- Hierarchy between components and containers
- Flow of data from containers to presentational components

b. Asset Management:
- How static assets (images, fonts, Lottie animations) are served
- Optimization paths for different asset types

c. Routing Layer:
- Demonstrate the Next.js page-based routing system
- Relationship between pages and components

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
        
        subgraph UILayer["UI Components Layer"]
            Nav["Navigation"]:::component
            Cards["Card Components"]:::component
            Social["Social Links"]:::component
            Lottie["Display Lottie"]:::component
            SEO["SEO Component"]:::component
        end
        
        subgraph ContainerLayer["Container Layer"]
            Greetings["Greetings"]:::container
            Skills["Skills"]:::container
            Projects["Projects"]:::container
            Education["Education"]:::container
            Certification["Certification"]:::container
        end
    end
    
    subgraph NextServer["Next.js Server"]
        subgraph Pages["Pages Router"]
            Index["index.js"]:::page
            App["_app.js"]:::page
            Contact["ContactUs.js"]:::page
        end
        
        subgraph Assets["Static Assets"]
            LottieFiles["Lottie Animations"]:::asset
            Images["Images"]:::asset
            Fonts["Fonts"]:::asset
            Styles["CSS Styles"]:::asset
        end
    end
    
    Browser --> NextServer
    
    %% Component Relationships
    Nav --> Cards
    Nav --> Social
    Cards --> Greetings
    Cards --> Skills
    Cards --> Projects
    Cards --> Education
    Cards --> Certification
    
    %% Asset Relationships
    LottieFiles --> Lottie
    Styles --> UILayer
    Images --> UILayer
    Fonts --> UILayer
    
    %% Page Routing
    Index --> UILayer
    App --> UILayer
    Contact --> UILayer
    
    %% Click Events
    click Nav "https://github.com/0xpranav/myportfolio/blob/main/components/Navigation.jsx"
    click Social "https://github.com/0xpranav/myportfolio/blob/main/components/SocialLinks.jsx"
    click Lottie "https://github.com/0xpranav/myportfolio/blob/main/components/DisplayLottie.jsx"
    click SEO "https://github.com/0xpranav/myportfolio/blob/main/components/SEO.jsx"
    click Greetings "https://github.com/0xpranav/myportfolio/blob/main/containers/Greetings.jsx"
    click Skills "https://github.com/0xpranav/myportfolio/blob/main/containers/Skills.jsx"
    click Projects "https://github.com/0xpranav/myportfolio/blob/main/containers/Projects.jsx"
    click Education "https://github.com/0xpranav/myportfolio/blob/main/containers/Education.jsx"
    click Certification "https://github.com/0xpranav/myportfolio/blob/main/containers/Certification.jsx"
    click Index "https://github.com/0xpranav/myportfolio/blob/main/pages/index.js"
    click App "https://github.com/0xpranav/myportfolio/blob/main/pages/_app.js"
    click Contact "https://github.com/0xpranav/myportfolio/blob/main/pages/ContactUs.js"
    click LottieFiles "https://github.com/0xpranav/myportfolio/tree/main/public/lottie"
    click Images "https://github.com/0xpranav/myportfolio/tree/main/public/img"
    click Fonts "https://github.com/0xpranav/myportfolio/tree/main/public/fonts"
    click Styles "https://github.com/0xpranav/myportfolio/tree/main/styles"
    
    classDef component fill:#3498db,stroke:#2980b9,color:white
    classDef container fill:#2ecc71,stroke:#27ae60,color:white
    classDef page fill:#e67e22,stroke:#d35400,color:white
    classDef asset fill:#9b59b6,stroke:#8e44ad,color:white
    
    %% Legend
    subgraph Legend
        C1["UI Component"]:::component
        C2["Container"]:::container
        C3["Page"]:::page
        C4["Asset"]:::asset
    end
```
