# muhammedsuhaib/my-portfolio architecture

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

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

## Overview

##### Main Components Identification

a) Frontend Layer (Next.js Application)
- Client-side components
- Server-side components
- App Router structure

b) CMS Layer (Sanity)
- Studio
- Content Management
- Schema definitions

c) Integration Layer
- API connections
- Image pipeline
- Live preview functionality

**┌─ Next.js Application ─────────────────┐**
- ┌─ Pages/Routes ─┐ ┌─ Components ──┐ │
- Home        │ │ - Header      │ │
- About       │ │ - Hero        │ │
- Studio      │ │ - Projects    │ │
- ┘ │ - Technologies │ │
- ┘  │
- ┘

**┌─ Sanity CMS ────────────────────────┐**
- ┌─ Schema ─────┐ ┌─ Studio ───────┐ │
- Types      │ │ - Content      │ │
- Structure  │ │ - Live Preview │ │
- ┘ └───────────────┘ │
- ┘

##### Connection Flows

- Data flow between Next.js and Sanity
- Client-side to server-side communication
- Image optimization pipeline
- Live preview data streams

##### Technical Stack Indicators

- Next.js
- Sanity
- TypeScript
- TailwindCSS
- React

##### Implementation Notes

- The app directory structure following Next.js 13+ conventions
- Integration between Next.js and Sanity Studio
- Component hierarchy and reusability
- Data flow patterns

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        AppLayout["App Layout"]
        HomePage["Home Page"]
        AboutPage["About Page"]
        CoPage["Co Page"]
        
        subgraph Components
            Header["Header"]
            Hero["Hero"]
            Projects["Projects"]
            Technologies["Technologies"]
            UI["UI Components"]
        end
    end

    subgraph "Sanity CMS"
        Studio["Studio Route"]
        SchemaTypes["Schema Types"]
        StudioStructure["Studio Structure"]
    end

    subgraph "Integration Layer"
        SanityClient["Sanity Client"]
        ImagePipeline["Image Pipeline"]
        LivePreview["Live Preview"]
        EnvConfig["Environment Config"]
    end

    subgraph "Configuration"
        SanityConfig["Sanity Config"]
        SanityCliConfig["Sanity CLI Config"]
        NextConfig["Next.js Config"]
        TailwindConfig["TailwindCSS Config"]
        Utils["Utilities"]
    end

    %% Relationships
    AppLayout --> Header
    AppLayout --> HomePage
    AppLayout --> AboutPage
    AppLayout --> CoPage
    AppLayout --> Studio

    HomePage --> Hero
    HomePage --> Projects
    HomePage --> Technologies

    SanityClient --> SchemaTypes
    Studio --> StudioStructure
    Studio --> LivePreview
    ImagePipeline --> SanityClient

    %% Click events
    click AppLayout "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/app/layout.tsx"
    click HomePage "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/app/page.tsx"
    click AboutPage "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/app/About/page.tsx"
    click CoPage "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/app/co/page.tsx"
    click Header "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/components/Header.tsx"
    click Hero "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/components/Hero.tsx"
    click Projects "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/components/Projects.tsx"
    click Technologies "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/components/Technologies.tsx"
    click UI "https://github.com/MuhammedSuhaib/my-portfolio/tree/master/components/ui/"
    click Studio "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/app/studio/[[...tool]]/page.tsx"
    click SchemaTypes "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/sanity/schemaTypes/index.ts"
    click StudioStructure "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/sanity/structure.ts"
    click SanityClient "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/sanity/lib/client.ts"
    click ImagePipeline "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/sanity/lib/image.ts"
    click LivePreview "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/sanity/lib/live.ts"
    click EnvConfig "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/sanity/env.ts"
    click SanityConfig "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/sanity.config.ts"
    click SanityCliConfig "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/sanity.cli.ts"
    click NextConfig "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/next.config.mjs"
    click TailwindConfig "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/tailwind.config.ts"
    click Utils "https://github.com/MuhammedSuhaib/my-portfolio/blob/master/lib/utils.ts"

    %% Styling
    classDef frontend fill:#2563eb,color:white
    classDef sanity fill:#22c55e,color:white
    classDef integration fill:#f97316,color:white
    classDef config fill:#64748b,color:white

    class AppLayout,HomePage,AboutPage,CoPage,Header,Hero,Projects,Technologies,UI frontend
    class Studio,SchemaTypes,StudioStructure sanity
    class SanityClient,ImagePipeline,LivePreview,EnvConfig integration
    class SanityConfig,SanityCliConfig,NextConfig,TailwindConfig,Utils config
```
