# meetmakwana7396/portfolio architecture

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

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

## Overview

##### Main System Components

a) Frontend Layer (Next.js Application)
- Client-side Components
- Server-side Components
- Static Pages
- Dynamic Routes

b) API Integration Layer
- Apollo Client Integration (noted from lib/apollo-client.ts)
- Hashnode Integration (noted from lib/hashnode.ts)

c) Content Management
- Articles System
- Static Assets

##### Architectural Patterns to Highlight

a) Routing Structure
- Root layout (app/layout.tsx)
- Static pages (app/page.tsx)
- Dynamic routes (/articles/[slug])
- API routes (RSS, Sitemap)

b) Component Organization
- UI Components
- Layout Components
- Page Components

##### Top Level (Client Interaction)
- [Browser/Client] → [Next.js Application]

##### Middle Layer (Application Structure)
- [Pages/Routes] → [Components] → [Layouts]
- ↓
- [API Integrations]

##### Bottom Layer (External Services)
- [Apollo Client] → [Hashnode API]

##### Key Relationships

- How the app/layout.tsx wraps all other components
- Demonstrate the relationship between pages and their corresponding components
- Data flow from Hashnode API through Apollo Client to the Articles section
- Generation of RSS and Sitemap

##### Technical Stack Indicators

A tech stack section showing:
- Next.js
- TypeScript
- Apollo Client
- TailwindCSS
- Radix UI Components

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Browser/Client"]
    end

    subgraph "Next.js Application"
        RootLayout["Root Layout"]
        MainPage["Main Page"]
        ErrorHandler["Error Handler"]
        
        subgraph "Routing Layer"
            StaticPages["Static Pages"]
            DynamicRoutes["Dynamic Routes"]
            APIRoutes["API Routes"]
        end

        subgraph "Core Components"
            Header["Header"]
            Footer["Footer"]
            Navigation["Navigation"]
            Analytics["Analytics"]
        end

        subgraph "Feature Components"
            direction TB
            UI["UI Components"]
            LayoutComps["Layout Components"]
            LandingComps["Landing Page Components"]
            Icons["Icon Components"]
            ArticleComps["Article Components"]
        end

        subgraph "Content Generation"
            RSS["RSS Feed"]
            Sitemap["Sitemap"]
        end
    end

    subgraph "Integration Layer"
        Apollo["Apollo Client"]
        HashnodeInt["Hashnode Integration"]
        GraphQLQueries["GraphQL Queries"]
        Utils["Utility Functions"]
    end

    subgraph "External Services"
        HashnodeAPI["Hashnode API"]
    end

    %% Relationships
    Browser --> RootLayout
    RootLayout --> MainPage
    RootLayout --> ErrorHandler
    RootLayout --> Header
    RootLayout --> Footer
    Header --> Navigation
    MainPage --> LandingComps
    DynamicRoutes --> ArticleComps
    Apollo --> HashnodeInt
    HashnodeInt --> HashnodeAPI
    Apollo --> GraphQLQueries
    ArticleComps --> Apollo

    %% Click Events
    click RootLayout "https://github.com/meetmakwana7396/portfolio/blob/main/app/layout.tsx"
    click MainPage "https://github.com/meetmakwana7396/portfolio/blob/main/app/page.tsx"
    click ErrorHandler "https://github.com/meetmakwana7396/portfolio/blob/main/app/error.tsx"
    click DynamicRoutes "https://github.com/meetmakwana7396/portfolio/blob/main/app/articles/[slug]/page.tsx"
    click Header "https://github.com/meetmakwana7396/portfolio/blob/main/components/header.tsx"
    click Footer "https://github.com/meetmakwana7396/portfolio/blob/main/components/footer.tsx"
    click Navigation "https://github.com/meetmakwana7396/portfolio/blob/main/components/navlink.tsx"
    click Analytics "https://github.com/meetmakwana7396/portfolio/blob/main/components/google-analytics.tsx"
    click UI "https://github.com/meetmakwana7396/portfolio/tree/main/components/ui/"
    click LayoutComps "https://github.com/meetmakwana7396/portfolio/tree/main/components/layout/"
    click LandingComps "https://github.com/meetmakwana7396/portfolio/tree/main/components/landing-page/"
    click Icons "https://github.com/meetmakwana7396/portfolio/tree/main/components/icons/"
    click ArticleComps "https://github.com/meetmakwana7396/portfolio/tree/main/components/article/"
    click RSS "https://github.com/meetmakwana7396/portfolio/blob/main/app/rss.xml/route.ts"
    click Sitemap "https://github.com/meetmakwana7396/portfolio/blob/main/app/sitemap.ts"
    click Apollo "https://github.com/meetmakwana7396/portfolio/blob/main/lib/apollo-client.ts"
    click HashnodeInt "https://github.com/meetmakwana7396/portfolio/blob/main/lib/hashnode.ts"
    click GraphQLQueries "https://github.com/meetmakwana7396/portfolio/blob/main/lib/queries.ts"
    click Utils "https://github.com/meetmakwana7396/portfolio/blob/main/lib/utils.ts"

    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef external fill:#FFA07A,stroke:#333
    classDef integration fill:#90EE90,stroke:#333
    classDef component fill:#87CEEB,stroke:#333
    classDef routing fill:#DDA0DD,stroke:#333

    class Browser default
    class HashnodeAPI external
    class Apollo,HashnodeInt,GraphQLQueries,Utils integration
    class RootLayout,MainPage,Header,Footer,Navigation,Analytics,UI,LayoutComps,LandingComps,Icons,ArticleComps component
    class StaticPages,DynamicRoutes,APIRoutes,RSS,Sitemap routing
```
