# shahariar50/personal-portfolio architecture

> Architecture diagram of the GitHub repository shahariar50/personal-portfolio, 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/shahariar50/personal-portfolio
- Repository: https://github.com/shahariar50/personal-portfolio

## Overview

##### Main Components Structure

a. Client Layer
- Browser/User Interface
- Next.js Runtime Environment

b. Application Layer
- Pages/Routing Structure
- Component Architecture
- Asset Management
- Styling System

##### Detailed Component Breakdown

a. Core Application Structure
- Layout System (layout.tsx)
- Page Components (page.tsx)
- Global Styles (globals.css)

b. Component Architecture (Create a hierarchical structure):
- Layout Components
- Header
- Container
- Page Components
- Home Page Sections
- Banner Section
- About Section
- Technology Section
- Common Components
- Buttons
- Cards

c. Asset Management
- Public Assets
- Images

##### Data Flow and State Management
- Component Data Flow (data.ts files → respective components)
- Type Definitions (Show how types are shared across components)

##### Build & Optimization Layer
A section showing:
- Next.js Configuration
- PostCSS/Tailwind Processing
- TypeScript Compilation
- ESLint Validation

Use these specific styling guidelines:

- Blue tones for Next.js/React components
- Green for static assets and public files
- Purple for configuration files
- Orange for data flow paths

- Rectangles for components
- Hexagons for configuration elements

##### Build Configuration Layer (Bottom)

Important Considerations:
##### App router architecture as this is a Next.js 13+ project
2. Component hierarchy clearly, especially the relationship between layout and page components
3. Separation of concerns between common components and page-specific components

Additional Notes:
- Annotations for key architectural decisions
- Relationship between TypeScript types and their implementing components
- Build and deployment pipeline

Remember to maintain a balance between showing the Next.js framework conventions and the custom application architecture specific to this project.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Browser/User Interface"]
        NextRuntime["Next.js Runtime"]
    end

    subgraph AppRouter["Application Router"]
        Layout["Layout System"]:::layout
        Page["Page Components"]:::page
        Globals["Global Styles"]:::styles
    end

    subgraph Components["Component Layer"]
        direction TB
        subgraph LayoutComponents["Layout Components"]
            Header["Header"]:::component
            Container["Container"]:::component
            LayoutData["Layout Data"]:::data
            LayoutTypes["Layout Types"]:::types
        end

        subgraph CommonComponents["Common Components"]
            Buttons["Buttons"]:::component
            Cards["Cards"]:::component
        end

        subgraph PageSections["Home Page Sections"]
            Banner["Banner Section"]:::component
            About["About Section"]:::component
            Tech["Technology Section"]:::component
            SectionData["Section Data"]:::data
        end
    end

    subgraph Assets["Asset Management"]
        PublicImages["Public Images"]:::asset
        AnimatedIcons["Animated Icons"]:::asset
        NavMenu["Navigation Menu Animation"]:::asset
        ThemeToggle["Theme Toggle Animation"]:::asset
    end

    subgraph BuildConfig["Build & Configuration"]
        NextConfig["Next.js Config"]:::config
        TSConfig["TypeScript Config"]:::config
        TailwindConfig["Tailwind Config"]:::config
        PostCSSConfig["PostCSS Config"]:::config
        ESLintConfig["ESLint Config"]:::config
    end

    Browser --> NextRuntime
    NextRuntime --> AppRouter
    Layout --> Components
    Page --> PageSections
    LayoutData --> LayoutComponents
    LayoutTypes --> LayoutComponents
    SectionData --> PageSections
    Components --> Assets

    %% Click Events
    click Layout "https://github.com/shahariar50/personal-portfolio/blob/main/src/app/layout.tsx"
    click Page "https://github.com/shahariar50/personal-portfolio/blob/main/src/app/page.tsx"
    click Globals "https://github.com/shahariar50/personal-portfolio/blob/main/src/app/globals.css"
    click Header "https://github.com/shahariar50/personal-portfolio/blob/main/src/components/layout/Header.tsx"
    click Container "https://github.com/shahariar50/personal-portfolio/blob/main/src/components/layout/Container.tsx"
    click LayoutData "https://github.com/shahariar50/personal-portfolio/blob/main/src/components/layout/data.ts"
    click LayoutTypes "https://github.com/shahariar50/personal-portfolio/blob/main/src/components/layout/layoutTypes.ts"
    click Buttons "https://github.com/shahariar50/personal-portfolio/tree/main/src/components/common/buttons/"
    click Cards "https://github.com/shahariar50/personal-portfolio/tree/main/src/components/common/cards/"
    click Banner "https://github.com/shahariar50/personal-portfolio/blob/main/src/components/pages/homePage/BannerSection.tsx"
    click About "https://github.com/shahariar50/personal-portfolio/blob/main/src/components/pages/homePage/AboutSection.tsx"
    click Tech "https://github.com/shahariar50/personal-portfolio/blob/main/src/components/pages/homePage/TechnologySection.tsx"
    click SectionData "https://github.com/shahariar50/personal-portfolio/blob/main/src/components/pages/homePage/data.ts"
    click PublicImages "https://github.com/shahariar50/personal-portfolio/tree/main/public/images/"
    click AnimatedIcons "https://github.com/shahariar50/personal-portfolio/tree/main/src/assets/icons/animated/"
    click NavMenu "https://github.com/shahariar50/personal-portfolio/blob/main/src/assets/icons/animated/navigation-menu.json"
    click ThemeToggle "https://github.com/shahariar50/personal-portfolio/blob/main/src/assets/icons/animated/toggle-dark-mode-light-mode.json"
    click NextConfig "https://github.com/shahariar50/personal-portfolio/blob/main/next.config.js"
    click TSConfig "https://github.com/shahariar50/personal-portfolio/blob/main/tsconfig.json"
    click TailwindConfig "https://github.com/shahariar50/personal-portfolio/blob/main/tailwind.config.js"
    click PostCSSConfig "https://github.com/shahariar50/personal-portfolio/blob/main/postcss.config.js"
    click ESLintConfig "https://github.com/shahariar50/personal-portfolio/blob/main/.eslintrc.json"

    %% Styling
    classDef component fill:#4a9eff,stroke:#333,stroke-width:2px
    classDef config fill:#b66dff,stroke:#333,stroke-width:2px
    classDef asset fill:#6dbf9e,stroke:#333,stroke-width:2px
    classDef data fill:#ff9e4a,stroke:#333,stroke-width:2px
    classDef types fill:#bf6d9e,stroke:#333,stroke-width:2px
    classDef layout fill:#4a72ff,stroke:#333,stroke-width:2px
    classDef page fill:#4a72ff,stroke:#333,stroke-width:2px
    classDef styles fill:#ff6d9e,stroke:#333,stroke-width:2px
```
