# asharibali/portfolio architecture

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

## Overview

##### Main System Components

A. Frontend Layer (Client-Side)
- Next.js 14 Application
- React Components Structure
- UI Component Library (Shadcn/UI)
- TailwindCSS Styling System

B. Special Features
- AI Assistant Integration
- Print Functionality
- Command Menu System

##### Component Organization

**┌─ Application Layer ─────────────────────┐**
- Next.js 14 Framework                    │
- ┌─ Pages & Routing ──────────────────┐  │
- App Router (src/app)             │  │
- Layout System                    │  │
- ┘│
- ┌─ Component Layer ─────────────────────┘│
- ┌─ Core Components ─────────────────┐  │
- Chatbot                        │  │
- Command Menu                   │  │
- Print Drawer                   │  │
- Project Card                   │  │
- ┘│
- ┌─ UI Components ──────────────────┐  │
- Shadcn/UI Components          │  │
- Custom UI Elements            │  │
- ┘│
- ┘

**┌─ Data Layer ──────────────────────────┐**
- Resume Data (JSON)                  │
- Personal Data                       │
- ┘

##### Key Relationships to Highlight

- How the AI Assistant integrates with the main application
- Data flow from resume-data.tsx to various components
- Demonstrate the relationship between UI components and core components
- Print system's interaction with the component tree

##### Technical Details

- Next.js 14 App Router architecture
- TailwindCSS styling system integration
- TypeScript type system coverage
- Component composition and hierarchy

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Application
        NextJS["Next.js 14 Framework"]:::nextjs
        click NextJS "https://github.com/AsharibAli/portfolio/tree/main/src/app"
        
        subgraph Pages
            AppRouter["App Router"]:::router
            click AppRouter "https://github.com/AsharibAli/portfolio/tree/main/src/app"
            Layout["Layout System"]:::layout
            click Layout "https://github.com/AsharibAli/portfolio/blob/main/src/app/layout.tsx"
            Styles["Global Styles"]:::styles
            click Styles "https://github.com/AsharibAli/portfolio/blob/main/src/app/globals.css"
        end

        subgraph CoreComponents
            Chatbot["Chatbot (AI Assistant)"]:::feature
            click Chatbot "https://github.com/AsharibAli/portfolio/blob/main/src/components/chatbot.tsx"
            CommandMenu["Command Menu"]:::feature
            click CommandMenu "https://github.com/AsharibAli/portfolio/blob/main/src/components/command-menu.tsx"
            PrintDrawer["Print System"]:::feature
            click PrintDrawer "https://github.com/AsharibAli/portfolio/blob/main/src/components/print-drawer.tsx"
            ProjectCard["Project Card"]:::feature
            click ProjectCard "https://github.com/AsharibAli/portfolio/blob/main/src/components/project-card.tsx"
        end

        subgraph UIComponents
            ShadcnUI["Shadcn/UI Library"]:::ui
            click ShadcnUI "https://github.com/AsharibAli/portfolio/tree/main/src/components/ui"
            Button["Button"]:::ui
            click Button "https://github.com/AsharibAli/portfolio/blob/main/src/components/ui/button.tsx"
            Card["Card"]:::ui
            click Card "https://github.com/AsharibAli/portfolio/blob/main/src/components/ui/card.tsx"
            Dialog["Dialog"]:::ui
            click Dialog "https://github.com/AsharibAli/portfolio/blob/main/src/components/ui/dialog.tsx"
            Drawer["Drawer"]:::ui
            click Drawer "https://github.com/AsharibAli/portfolio/blob/main/src/components/ui/drawer.tsx"
            Command["Command"]:::ui
            click Command "https://github.com/AsharibAli/portfolio/blob/main/src/components/ui/command.tsx"
        end

        subgraph SocialIcons
            Icons["Social Icons"]:::icons
            click Icons "https://github.com/AsharibAli/portfolio/tree/main/src/components/icons"
            GitHub["GitHub"]:::icons
            click GitHub "https://github.com/AsharibAli/portfolio/blob/main/src/components/icons/GitHubIcon.tsx"
            LinkedIn["LinkedIn"]:::icons
            click LinkedIn "https://github.com/AsharibAli/portfolio/blob/main/src/components/icons/LinkedInIcon.tsx"
            Medium["Medium"]:::icons
            click Medium "https://github.com/AsharibAli/portfolio/blob/main/src/components/icons/Medium.tsx"
            Telegram["Telegram"]:::icons
            click Telegram "https://github.com/AsharibAli/portfolio/blob/main/src/components/icons/TelegramIcon.tsx"
            XIcon["X (Twitter)"]:::icons
            click XIcon "https://github.com/AsharibAli/portfolio/blob/main/src/components/icons/XIcon.tsx"
        end
    end

    subgraph DataLayer
        ResumeData["Resume Data"]:::data
        click ResumeData "https://github.com/AsharibAli/portfolio/blob/main/src/data/resume-data.tsx"
        PersonalData["Personal Data"]:::data
        click PersonalData "https://github.com/AsharibAli/portfolio/blob/main/src/data/asharib-data.json"
    end

    subgraph Config
        TailwindConfig["TailwindCSS Config"]:::config
        click TailwindConfig "https://github.com/AsharibAli/portfolio/blob/main/tailwind.config.js"
        TSConfig["TypeScript Config"]:::config
        click TSConfig "https://github.com/AsharibAli/portfolio/blob/main/tsconfig.json"
        NextConfig["Next.js Config"]:::config
        click NextConfig "https://github.com/AsharibAli/portfolio/blob/main/next.config.js"
        Utils["Utility Functions"]:::config
        click Utils "https://github.com/AsharibAli/portfolio/blob/main/src/lib/utils.ts"
        Types["Type Definitions"]:::config
        click Types "https://github.com/AsharibAli/portfolio/blob/main/src/types/global.d.ts"
    end

    %% Relationships
    NextJS --> AppRouter
    AppRouter --> Layout
    Layout --> Styles
    Layout --> CoreComponents
    Layout --> UIComponents
    Layout --> SocialIcons

    CommandMenu --> Command
    PrintDrawer --> Drawer
    ProjectCard --> Card

    ResumeData --> CoreComponents
    PersonalData --> CoreComponents

    %% Styling
    classDef nextjs fill:#1E40AF,color:white
    classDef router fill:#3B82F6,color:white
    classDef layout fill:#60A5FA,color:white
    classDef styles fill:#93C5FD,color:white
    classDef feature fill:#7C3AED,color:white
    classDef ui fill:#10B981,color:white
    classDef icons fill:#6366F1,color:white
    classDef data fill:#F59E0B,color:white
    classDef config fill:#6B7280,color:white
```
