# ozgurozalp/my-website architecture

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

- Interactive diagram: https://gitdiagram.com/ozgurozalp/my-website
- Repository: https://github.com/ozgurozalp/my-website

## Overview

##### Project type and purpose
- This is a Jamstack‑style, Next.js (v13+) website built with the App Router, MDX blog posts, Tailwind CSS, and TypeScript.
- Its purpose is to serve a personal/professional website with static and dynamic pages (home, about, blog listing, blog detail, custom pages).

##### File structure
- Top‑level config: next.config.ts, tsconfig.json, tailwind.config.ts, postcss.config.mjs, .eslintrc.json, .prettierrc. These indicate a modern React/Next.js toolchain with linting, formatting, and CSS-in-JS.
- public/: Static assets (images, PDF resume) and metadata (robots.txt, manifest.json, sitemap.ts).
- src/app/: The Next.js App Router directory driving routing and page layouts. Contains server and client components (page.tsx, layout.tsx) for each route (/, /about, /ben-kimim, /blog, /blog/[slug], /blog/category/[slug]).
- src/components/: Shared UI components (typography, buttons, dropdowns) and page‑specific components (BlogList, BlogCard).
- src/posts/: MDX files for blog content.
- src/lib/ and src/utils/: Helper functions and constants.
- src/actions/: Potential server actions or API handlers.

##### Detailed breakdown of components
- Build Server
- Tailwind/PostCSS module
- MDX parser
- Next.js SSG/SSR engine
- pnpm install/build scripts
- CDN/Edge
- Caches static HTML, CSS, JS
- Runs SSR via serverless/Edge Functions when cache misses
- File System
- src/app (routes & layouts)
- src/components (UI library)
- src/posts (content)
- public (images, PDF, robots.txt, manifest.json)
- Client Browser
- Hydrates server-rendered pages
- Executes client components (e.g., page.client.tsx)
- Interacts with UI (dropdowns, tooltips)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% CI/CD and Build Phase
    subgraph "CI/CD Pipeline"
        Git["Git Repository"]:::blue
        CI["CI/CD (pnpm build)"]:::blue
    end
    subgraph "Build Server"
        TW["Tailwind/PostCSS"]:::blue
        MDXP["MDX Parser"]:::blue
        NextBuild["Next.js SSG/SSR Engine"]:::blue
    end
    subgraph "Configuration" 
        NX["next.config.ts"]:::gray
        TS["tsconfig.json"]:::gray
        ESL[".eslintrc.json"]:::gray
        Prettier[".prettierrc"]:::gray
        Package["package.json / pnpm-lock.yaml"]:::gray
    end

    Git --> CI
    CI --> TW
    CI --> MDXP
    CI --> NX
    CI --> TS
    CI --> ESL
    CI --> Prettier
    CI --> Package
    TW --> NextBuild
    MDXP --> NextBuild

    %% File System and Content
    subgraph "Content & Assets"
        subgraph "src/app (Next.js App Router)" 
            Home["Home Page"]:::blue
            About["About Page"]:::blue
            Bio["Personal Bio Page"]:::blue
            BlogList["Blog Listing & Layout"]:::blue
            BlogDetail["Blog Detail Page"]:::blue
            BlogCat["Blog Category Page"]:::blue
            GlobalsCSS["globals.css"]:::blue
            Robots["robots.txt (route)"]:::blue
            Sitemap["sitemap.ts"]:::blue
            Manifest["manifest.json"]:::blue
        end
        subgraph "src/components (Shared UI Components)"
            Header["AppHeader"]:::content
            Logo["AppLogo"]:::content
            BlogListComp["BlogList"]:::content
            BlogCard["BlogCard"]:::content
            NotFoundUI["Not Found UI"]:::content
            Typography["Typography Components"]:::content
            UIPrimitives["UI Primitives (button, dropdown, tooltip)"]:::content
        end
        Posts["src/posts (MDX Content Source)"]:::content
        Public["public (Static Assets)"]:::content
    end

    NextBuild -->|"deploy static & SSR bundles"| CDN["CDN / Edge"]:::green

    %% Runtime Phase
    CDN -->|"cache hit"| Browser["Client Browser"]:::orange
    Browser -->|"hydrate + CSR"| UIPrimitives
    CDN -->|"cache miss triggers"| EdgeFunc["Edge / Serverless Function"]:::green
    EdgeFunc --> NextBuild

    %% Build Phase Content Flow
    MDXP --> Posts
    TW --> GlobalsCSS
    TW --> NX

    %% Click Events
    click Home "https://github.com/ozgurozalp/my-website/blob/main/src/app/page.tsx"
    click Home "https://github.com/ozgurozalp/my-website/blob/main/src/app/page.client.tsx"
    click Home "https://github.com/ozgurozalp/my-website/blob/main/src/app/layout.tsx"
    click About "https://github.com/ozgurozalp/my-website/blob/main/src/app/about/page.tsx"
    click Bio "https://github.com/ozgurozalp/my-website/blob/main/src/app/ben-kimim/page.tsx"
    click BlogList "https://github.com/ozgurozalp/my-website/blob/main/src/app/blog/page.tsx"
    click BlogList "https://github.com/ozgurozalp/my-website/blob/main/src/app/blog/layout.tsx"
    click BlogDetail "https://github.com/ozgurozalp/my-website/blob/main/src/app/blog/[slug]/page.tsx"
    click BlogDetail "https://github.com/ozgurozalp/my-website/blob/main/src/app/blog/[slug]/not-found.tsx"
    click BlogCat "https://github.com/ozgurozalp/my-website/blob/main/src/app/blog/category/[slug]/page.tsx"
    click GlobalsCSS "https://github.com/ozgurozalp/my-website/blob/main/src/app/globals.css"
    click Robots "https://github.com/ozgurozalp/my-website/blob/main/src/app/robots.txt"
    click Sitemap "https://github.com/ozgurozalp/my-website/blob/main/src/app/sitemap.ts"
    click Manifest "https://github.com/ozgurozalp/my-website/blob/main/src/app/manifest.json"
    click Posts "https://github.com/ozgurozalp/my-website/tree/main/src/posts/"
    click Header "https://github.com/ozgurozalp/my-website/blob/main/src/components/shared/AppHeader.tsx"
    click Logo "https://github.com/ozgurozalp/my-website/blob/main/src/components/shared/AppLogo.tsx"
    click BlogListComp "https://github.com/ozgurozalp/my-website/blob/main/src/components/shared/BlogList.tsx"
    click BlogCard "https://github.com/ozgurozalp/my-website/blob/main/src/components/shared/blog-card/BlogCard.tsx"
    click NotFoundUI "https://github.com/ozgurozalp/my-website/blob/main/src/components/shared/not-found.tsx"
    click Typography "https://github.com/ozgurozalp/my-website/blob/main/src/components/typography/TypographyH1.tsx"
    click UIPrimitives "https://github.com/ozgurozalp/my-website/blob/main/src/components/ui/button.tsx"
    click UIPrimitives "https://github.com/ozgurozalp/my-website/blob/main/src/components/ui/dropdown-menu.tsx"
    click UIPrimitives "https://github.com/ozgurozalp/my-website/blob/main/src/components/ui/popover.tsx"
    click UIPrimitives "https://github.com/ozgurozalp/my-website/blob/main/src/components/ui/tooltip.tsx"
    click NX "https://github.com/ozgurozalp/my-website/blob/main/next.config.ts"
    click TS "https://github.com/ozgurozalp/my-website/blob/main/tsconfig.json"
    click ESL "https://github.com/ozgurozalp/my-website/blob/main/.eslintrc.json"
    click Prettier "https://github.com/ozgurozalp/my-website/blob/main/.prettierrc"
    click Package "https://github.com/ozgurozalp/my-website/blob/main/package.json"
    click Public "https://github.com/ozgurozalp/my-website/tree/main/public/"

    %% Styles
    classDef blue fill:#D0E8FF,stroke:#0366d6,color:#0366d6;
    classDef green fill:#DFFFE0,stroke:#28a745,color:#28a745;
    classDef orange fill:#FFEFD5,stroke:#FF8C00,color:#FF8C00;
    classDef gray fill:#F0F0F0,stroke:#666666,color:#666666;
    classDef content fill:#FFF5F5,stroke:#D73A49,color:#D73A49;
```
