# hamzachbit/protfilo-v1 architecture

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

- Interactive diagram: https://gitdiagram.com/hamzachbit/protfilo-v1
- Repository: https://github.com/hamzachbit/protfilo-v1

## Overview

##### Project type and purpose
- This is a Next.js front-end web application (likely a personal portfolio or marketing site) built with React, TypeScript, Tailwind CSS, and deployed to Vercel or a similar static/SSR hosting platform.
- It does not include a custom backend API or database—Next.js handles routing, rendering (static-site generation, SSR), and serving of public assets.

##### File structure
- Top-level “app” directory: Next.js “App Router” pages and route handlers (page.tsx for the home page, sitemap.ts, robots.ts).
- “components” directory: React UI components (Navbar, Footer, Banner, ArchiveCard, etc.).
- “context” directory: React Context providers (ThemeContext for dark/light mode, Toast notifications).
- Configuration files: next.config.js, tailwind.config.js, postcss.config.js, tsconfig.json for build, linting, and styling pipelines.
- “public” directory: static assets (PDF resume, XML proof file, manifest, images).

##### README for additional insights
- Confirms use of Next.js, next/font for Google Fonts, Tailwind CSS for utility-first styling, and recommended development commands.
- No mention of serverless functions or external APIs—project likely self-contained.

##### Detail without over-splitting
- Routing layer separately from UI components.
- React Context wrappers around the page/layout.

[Browser(Client)]
↓ HTTP Request
[Next.js Runtime @ Vercel]
├─ App Router (page.tsx, sitemap.ts, robots.ts)
├─ Layout.tsx + Context Providers (ThemeContext, Toast)
├─ React Components (Navbar, Banner, Footer, etc.)
└─ CSS Pipeline (Tailwind → PostCSS → bundle.css)
↓ (prerendered HTML + CSS + JS)
[Browser hydrates React]
↔ Fetch static assets from [Public CDN]
↔ Fetch fonts from [Google Fonts CDN]

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    Browser["Browser (Client)"]:::client
    Browser -->|"HTTP Request"| NextRuntime

    %% Server Layer
    subgraph "Next.js Runtime @ Vercel / Node.js Server"
        direction TB
        NextRuntime["Next.js Runtime @ Vercel"]:::server
        NextRuntime --> AppRouter
        NextRuntime --> GlobalLayout
        NextRuntime --> CSSPipeline
        AppRouter["Next.js App Router"]:::server
        AppRouter --> HomePage
        AppRouter --> Sitemap
        AppRouter --> Robots
        GlobalLayout["Global Layout & Context Wrapper"]:::server
        GlobalLayout --> ContextProviders
        ContextProviders["React Context Providers"]:::context
        ContextProviders --> ThemeContext
        ContextProviders --> ToastContext
        ThemeContext["ThemeContext Provider"]:::context
        ToastContext["Toast Notifications Context"]:::context
        CSSPipeline["CSS Build Pipeline\nTailwind → PostCSS → bundle.css"]:::pipeline
        CSSPipeline --> GlobalStyles
        GlobalStyles["Global Styles (globals.css)"]:::pipeline
        NextRuntime -->|"Serves HTML + CSS + JS"| Browser
    end

    %% Components Layer
    subgraph "UI Components"
        direction TB
        Components["React UI Components"]:::components
        Components --> Navbar
        Components --> Banner
        Components --> ArchiveComp
        Components --> Projects
        Components --> About
        Components --> Contact
        Components --> Footer
        Components --> ThemeToggle
        Navbar["Navbar"]:::components
        Footer["Footer"]:::components
        Banner["Banner"]:::components
        ArchiveComp["Archive & ArchiveCard"]:::components
        ArchiveCard["ArchiveCard"]:::components
        Projects["Projects Section"]:::components
        About["About Section"]:::components
        Contact["Contact Form"]:::components
        ThemeToggle["Theme Toggle Button"]:::components
    end

    ContextProviders --> Components

    %% Static Asset Layer
    subgraph "Public Static Assets (CDN)"
        direction TB
        Public["public/"]:::assets
        Public --> CVPDF
        Public --> Manifest
        Public --> BingAuth
        Public --> GoogleVerify
        CVPDF["CV PDF"]:::assets
        Manifest["Site Manifest"]:::assets
        BingAuth["Bing Auth XML"]:::assets
        GoogleVerify["Google Verification HTML"]:::assets
    end

    Browser <--> Public

    %% External Services
    subgraph "External Services"
        direction TB
        GoogleFonts["Google Fonts CDN"]:::cdn
    end

    NextRuntime -->|"Fetch Fonts"| GoogleFonts

    %% Config Files
    subgraph "Configuration"
        direction TB
        NextConfig["next.config.js"]:::config
        TailwindConfig["tailwind.config.js"]:::config
        PostCSSConfig["postcss.config.js"]:::config
        TsConfig["tsconfig.json"]:::config
    end
    NextRuntime --> NextConfig
    NextRuntime --> TailwindConfig
    NextRuntime --> PostCSSConfig
    NextRuntime --> TsConfig

    %% Click Events
    click AppRouter "https://github.com/hamzachbit/protfilo-v1/tree/main/app/"
    click HomePage "https://github.com/hamzachbit/protfilo-v1/blob/main/app/page.tsx"
    click Sitemap "https://github.com/hamzachbit/protfilo-v1/blob/main/app/sitemap.ts"
    click Robots "https://github.com/hamzachbit/protfilo-v1/blob/main/app/robots.ts"
    click GlobalLayout "https://github.com/hamzachbit/protfilo-v1/blob/main/app/layout.tsx"
    click GlobalStyles "https://github.com/hamzachbit/protfilo-v1/blob/main/app/globals.css"
    click Components "https://github.com/hamzachbit/protfilo-v1/tree/main/components/"
    click Navbar "https://github.com/hamzachbit/protfilo-v1/blob/main/components/Navbar.tsx"
    click Footer "https://github.com/hamzachbit/protfilo-v1/blob/main/components/Footer.tsx"
    click Banner "https://github.com/hamzachbit/protfilo-v1/blob/main/components/Banner.tsx"
    click ArchiveComp "https://github.com/hamzachbit/protfilo-v1/blob/main/components/Archive.tsx"
    click ArchiveCard "https://github.com/hamzachbit/protfilo-v1/blob/main/components/ArchiveCard.tsx"
    click Projects "https://github.com/hamzachbit/protfilo-v1/blob/main/components/Projects.tsx"
    click About "https://github.com/hamzachbit/protfilo-v1/blob/main/components/About.tsx"
    click Contact "https://github.com/hamzachbit/protfilo-v1/blob/main/components/Contact.jsx"
    click ThemeToggle "https://github.com/hamzachbit/protfilo-v1/blob/main/components/ThemeToggle.jsx"
    click ContextProviders "https://github.com/hamzachbit/protfilo-v1/tree/main/context/"
    click ThemeContext "https://github.com/hamzachbit/protfilo-v1/blob/main/context/ThemeContext.jsx"
    click ToastContext "https://github.com/hamzachbit/protfilo-v1/blob/main/context/Tosat.jsx"
    click NextConfig "https://github.com/hamzachbit/protfilo-v1/blob/main/next.config.js"
    click TailwindConfig "https://github.com/hamzachbit/protfilo-v1/blob/main/tailwind.config.js"
    click PostCSSConfig "https://github.com/hamzachbit/protfilo-v1/blob/main/postcss.config.js"
    click TsConfig "https://github.com/hamzachbit/protfilo-v1/blob/main/tsconfig.json"
    click Public "https://github.com/hamzachbit/protfilo-v1/tree/main/public/"
    click CVPDF "https://github.com/hamzachbit/protfilo-v1/blob/main/public/assets/cv-chbit.pdf"
    click Manifest "https://github.com/hamzachbit/protfilo-v1/blob/main/public/site.webmanifest"
    click BingAuth "https://github.com/hamzachbit/protfilo-v1/blob/main/public/BingSiteAuth.xml"
    click GoogleVerify "https://github.com/hamzachbit/protfilo-v1/blob/main/public/google78ce275cb23dae98.html"

    %% Styles
    classDef client fill:#AEDFF7,stroke:#333,stroke-width:1px
    classDef server fill:#D1E8FF,stroke:#333,stroke-width:1px
    classDef components fill:#FFE5B4,stroke:#333,stroke-width:1px
    classDef context fill:#E8FFE5,stroke:#333,stroke-width:1px
    classDef pipeline fill:#F0D9FF,stroke:#333,stroke-width:1px
    classDef assets fill:#FFF2CC,stroke:#333,stroke-width:1px
    classDef cdn fill:#D0F0C0,stroke:#333,stroke-width:1px
    classDef config fill:#E5E5E5,stroke:#333,stroke-width:1px
```
