# goktugyalcin/next-portfolio-sample architecture

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

- Interactive diagram: https://gitdiagram.com/goktugyalcin/next-portfolio-sample
- Repository: https://github.com/goktugyalcin/next-portfolio-sample

## Overview

##### Main System Components

A. Frontend Layer (Client-Side)
- Next.js App Router Structure
- Theme Provider
- UI Components
- Page Components

B. Integration Layer
- API Integrations
- Data Fetchers

C. External Services
- Last.fm API
- Medium API
- Unsplash API

##### Detailed Component Breakdown

A. Frontend Architecture (Top Level):
- App Router (app/)
- Pages (blog, photos, projects, last-listened)
- Layout Components

B. Component Layer (Middle Level):
- Generated Components
- UI Components (Cards, Navigation, Theme)
- Feature Components (Blog, Photos, Projects)

C. Integration Layer (Bottom Level):
- External Services
- Last.fm Integration
- Medium Integration
- Unsplash Integration

Use the following visual elements:

- Blue: Next.js core components
- Green: External API integrations
- Purple: UI components
- Orange: Feature components

- Double lines: API calls

##### Component Relationships

Following interactions:
- App Router → Page Components
- Page Components → Generated Components
- Generated Components → UI Components
- Fetchers → External Services

##### Technical Stack Highlights

- Next.js App Router
- Tailwind CSS
- Framer Motion
- shadcn/ui
- TypeScript

##### Data Flow Visualization

Illustrate:
- API calls to external services
- Data transformation flow
- State management
- Theme switching mechanism

Key Recommendations:

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Frontend Layer"
        AppRouter["Next.js App Router"]:::nextjs
        Layout["Layout Component"]:::layout
        SEO["SEO Component"]:::seo
        ThemeProvider["Theme Provider"]:::theme
        
        subgraph "Page Components"
            Home["Home Page"]:::page
            Blog["Blog Page"]:::page
            Photos["Photos Page"]:::page
            Projects["Projects Page"]:::page
            LastListened["Last Listened Page"]:::page
        end

        subgraph "UI Components"
            NavMenu["Navigation Menu"]:::ui
            Footer["Footer"]:::ui
            UILib["UI Component Library"]:::ui
        end

        subgraph "Feature Components"
            BlogComp["Blog Component"]:::feature
            PhotosComp["Photos Component"]:::feature
            ProjectsComp["Project Card"]:::feature
            NowListening["Now Listening Card"]:::feature
        end
    end

    subgraph "Integration Layer"
        subgraph "Data Fetchers"
            LastFM["Last.fm Fetcher"]:::fetcher
            Medium["Medium Fetcher"]:::fetcher
            Unsplash["Unsplash Fetcher"]:::fetcher
            Airtable["Airtable Fetcher"]:::fetcher
        end

        subgraph "Type Definitions"
            SpotifyTypes["Spotify Types"]:::types
            AirtableTypes["Airtable Types"]:::types
            CommonTypes["Common Types"]:::types
        end
    end

    subgraph "External Services"
        LastFMAPI["Last.fm API"]:::external
        MediumAPI["Medium API"]:::external
        UnsplashAPI["Unsplash API"]:::external
        AirtableAPI["Airtable API"]:::external
    end

    AppRouter --> Layout
    Layout --> ThemeProvider
    Layout --> NavMenu
    Layout --> Footer
    Layout --> SEO

    AppRouter --> Home & Blog & Photos & Projects & LastListened

    Blog --> BlogComp
    Photos --> PhotosComp
    Projects --> ProjectsComp
    LastListened --> NowListening

    BlogComp --> Medium
    PhotosComp --> Unsplash
    ProjectsComp --> Airtable
    NowListening --> LastFM

    LastFM --> LastFMAPI
    Medium --> MediumAPI
    Unsplash --> UnsplashAPI
    Airtable --> AirtableAPI

    LastFM --> SpotifyTypes
    Airtable --> AirtableTypes
    LastFM & Medium & Unsplash & Airtable --> CommonTypes

    classDef nextjs fill:#1E40AF,color:white
    classDef layout fill:#3B82F6,color:white
    classDef seo fill:#60A5FA,color:white
    classDef theme fill:#93C5FD,color:white
    classDef page fill:#2563EB,color:white
    classDef ui fill:#7C3AED,color:white
    classDef feature fill:#F97316,color:white
    classDef fetcher fill:#22C55E,color:white
    classDef types fill:#A855F7,color:white
    classDef external fill:#DC2626,color:white

    click AppRouter "https://github.com/GoktugYalcin/next-portfolio-sample/tree/main/app"
    click ThemeProvider "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/components/generated/ThemeProvider/index.tsx"
    click UILib "https://github.com/GoktugYalcin/next-portfolio-sample/tree/main/components/ui"
    click Blog "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/app/blog/page.tsx"
    click LastListened "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/app/last-listened/page.tsx"
    click Photos "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/app/photos/page.tsx"
    click Projects "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/app/projects/page.tsx"
    click Home "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/app/page.tsx"
    click BlogComp "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/components/generated/Blog/Blogs.tsx"
    click PhotosComp "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/components/generated/Photos/index.tsx"
    click ProjectsComp "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/components/generated/ProjectCard/index.tsx"
    click NowListening "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/components/generated/NowListeningCard/index.tsx"
    click LastFM "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/lib/fetchers/spotify.ts"
    click Medium "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/lib/fetchers/medium.ts"
    click Unsplash "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/lib/fetchers/unsplash.ts"
    click Airtable "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/lib/fetchers/airtable.ts"
    click SpotifyTypes "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/types/spotify.ts"
    click AirtableTypes "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/types/air.ts"
    click CommonTypes "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/types/index.ts"
    click NavMenu "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/components/generated/NavMenu/NavMenu.tsx"
    click Footer "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/components/generated/Footer/index.tsx"
    click SEO "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/app/seo.tsx"
    click Layout "https://github.com/GoktugYalcin/next-portfolio-sample/blob/main/app/layout.tsx"
```
