# nivbuskila/portfolio architecture

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

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

## Overview

##### Main System Components

a) Client-Side Layer
- Next.js App Router (new architecture)
- React Components
- Static Assets

b) Server-Side Layer
- Next.js Server Components
- API Routes (if needed)

c) Build & Deployment
- Static Generation
- Vercel Platform

**┌─────────────────────────────────────────────┐**
- Client Layer                │
- ┬─────────────┬────────────┤
- Pages        │  Components │   Static   │
- (App Router)   │            │   Assets   │
- ┬────────┴──────┬──────┴────────────┘

**┌────────┴───────────────┴──────────────────┐**
- Next.js Server Layer           │
- ┬─────────────────────────┤
- Server Components│     Static Generation   │
- ┴─────────────────────────┘

##### Component Details

a) Page Components (Rectangle, Blue):
- Home (/)
- About (/about)
- Projects (/projects)
- Contact (/contact)

b) Shared Components (Hexagon, Green):
- Layout
- Navbar
- Footer
- FadeIn Animation

- personalInfo.ts
- projects.ts

Following relationships:
- Page components importing shared components
- Components accessing data from data sources
- Server-side to client-side rendering flow

##### Deployment Flow

A separate section showing:
- Build process
- Static generation
- Vercel deployment

Key Elements to Include:

**🔷 Page Component**
**⬢ Shared Component**
**📦 Data Source**
**➡️ Data Flow**
**🔄 Server/Client Boundary**

##### Demonstrate the modular organization of components and data

Remember to include the build and deployment workflow as a separate section, as this is crucial for understanding how the site gets from development to production on Vercel.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client["Client Layer"]
        direction TB
        AppRouter["Next.js App Router"]:::router
        Pages["Pages"]:::pages
        SharedComp["Shared Components"]:::components
        StaticAssets["Static Assets"]:::assets
    end

    subgraph Server["Server Layer"]
        direction TB
        ServerComp["Server Components"]:::server
        StaticGen["Static Generation"]:::build
    end

    subgraph Pages
        direction TB
        Home["Home (/)"]:::page
        About["About (/about)"]:::page
        Projects["Projects (/projects)"]:::page
        Contact["Contact (/contact)"]:::page
    end

    subgraph SharedComp
        direction TB
        Layout["Layout"]:::component
        Navbar["Navbar"]:::component
        Footer["Footer"]:::component
        FadeIn["FadeIn Animation"]:::component
    end

    subgraph Data["Data Sources"]
        direction TB
        PersonalInfo["personalInfo.ts"]:::data
        ProjectsData["projects.ts"]:::data
    end

    subgraph Config["Configuration"]
        direction TB
        SEOConfig["next-seo.config.ts"]:::config
        BuildConfig["next.config.ts"]:::config
        TailwindConfig["tailwind.config.ts"]:::config
        GlobalStyles["globals.css"]:::styles
    end

    AppRouter --> Pages
    Pages --> SharedComp
    Pages --> Data
    SharedComp --> Data
    ServerComp --> StaticGen
    StaticGen --> AppRouter

    %% Component Mappings
    click AppRouter "https://github.com/NivBuskila/portfolio/tree/main/src/app"
    click Home "https://github.com/NivBuskila/portfolio/blob/main/src/app/page.tsx"
    click About "https://github.com/NivBuskila/portfolio/blob/main/src/app/about/page.tsx"
    click Projects "https://github.com/NivBuskila/portfolio/blob/main/src/app/projects/page.tsx"
    click Contact "https://github.com/NivBuskila/portfolio/blob/main/src/app/contact/page.tsx"
    click Layout "https://github.com/NivBuskila/portfolio/blob/main/src/components/layout/Layout.tsx"
    click Navbar "https://github.com/NivBuskila/portfolio/blob/main/src/components/layout/Navbar.tsx"
    click Footer "https://github.com/NivBuskila/portfolio/blob/main/src/components/layout/Footer.tsx"
    click FadeIn "https://github.com/NivBuskila/portfolio/blob/main/src/components/animations/FadeIn.tsx"
    click PersonalInfo "https://github.com/NivBuskila/portfolio/blob/main/src/data/personalInfo.ts"
    click ProjectsData "https://github.com/NivBuskila/portfolio/blob/main/src/data/projects.ts"
    click StaticAssets "https://github.com/NivBuskila/portfolio/tree/main/public"
    click SEOConfig "https://github.com/NivBuskila/portfolio/blob/main/src/next-seo.config.ts"
    click BuildConfig "https://github.com/NivBuskila/portfolio/blob/main/next.config.ts"
    click TailwindConfig "https://github.com/NivBuskila/portfolio/blob/main/tailwind.config.ts"
    click GlobalStyles "https://github.com/NivBuskila/portfolio/blob/main/src/app/globals.css"

    classDef router fill:#2563eb,color:white
    classDef pages fill:#3b82f6,color:white
    classDef components fill:#22c55e,color:white
    classDef assets fill:#eab308,color:white
    classDef server fill:#7c3aed,color:white
    classDef build fill:#9333ea,color:white
    classDef data fill:#f97316,color:white
    classDef config fill:#64748b,color:white
    classDef styles fill:#ec4899,color:white
    classDef page fill:#60a5fa,color:white
    classDef component fill:#34d399,color:white

    %% Legend
    subgraph Legend
        direction TB
        L1["Router"]:::router
        L2["Pages"]:::pages
        L3["Components"]:::components
        L4["Assets"]:::assets
        L5["Server"]:::server
        L6["Build"]:::build
        L7["Data"]:::data
        L8["Config"]:::config
    end
```
