# nguyenvuhoang/proskills39-application architecture

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

- Interactive diagram: https://gitdiagram.com/nguyenvuhoang/proskills39-application
- Repository: https://github.com/nguyenvuhoang/proskills39-application

## Overview

##### Main Components

a. Client-Side Layer:
- Next.js Frontend (React)
- Static Assets (images, CSS, fonts)
- Client-side Authentication
- Theme System (dark/light mode)

b. Server-Side Layer:
- Next.js API Routes
- Server-side Rendering (SSR)
- Authentication Services
- API Integration Layer

c. External Services:
- Vercel Platform (deployment)

##### Architectural Patterns to Highlight

**┌─ Client Layer ─────────────────────┐**
- ┌─ Components ─┐ ┌─ Pages ───────┐ │
- UI          │ │ Static Pages  │ │
- Layouts     │ └──────────────┘ │ │
- ┘                    │
- ┌─ Assets ────┐ ┌─ Utils ───────┐ │
- CSS         │ │ Hooks        │ │
- Images      │ │ Helpers      │ │
- ┘ └──────────────┘ │ │
- ┘

**┌─ API Layer ──────────────────────┐**
- ┌─ Next.js API Routes ──────────┐ │
- /api/hello                    │ │
- ┘ │
- ┘

**┌─ External Services ───────────────┐**
- ┌─ Auth ─────┐ ┌─ Deployment ───┐ │
- Google     │ │ Vercel        │ │
- Facebook   │ └──────────────┘ │ │
- ┘                    │
- ┘

##### Important Elements to Emphasize

a. Component Architecture:
- Authentication flow
- Demonstrate the theme system integration

b. Data Flow:
- Client-side data fetching
- API route handling
- Authentication flow
- Static/Dynamic rendering paths

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client["Client Layer"]
        direction TB
        subgraph Components["Components"]
            direction TB
            UI["UI Components"]:::component
            Icons["Icon System"]:::component
            Layouts["Layout System"]:::component
            Auth["Authentication Components"]:::component
            Theme["Theme System"]:::component
        end

        subgraph Pages["Pages"]
            direction TB
            Static["Static Pages"]:::component
            Dynamic["Dynamic Pages"]:::component
        end

        subgraph Assets["Assets"]
            direction TB
            CSS["CSS"]:::asset
            Images["Images"]:::asset
            Fonts["Fonts"]:::asset
        end

        subgraph Utils["Utilities"]
            direction TB
            Hooks["Hooks"]:::util
            Helpers["Helper Functions"]:::util
            Types["Type Definitions"]:::util
            Config["Configuration"]:::util
        end
    end

    subgraph API["API Layer"]
        direction TB
        Routes["Next.js API Routes"]:::api
        HTTPClient["HTTP Client"]:::api
        Endpoints["API Endpoints"]:::api
    end

    subgraph External["External Services"]
        direction TB
        AuthProviders["Auth Providers"]:::external
        Vercel["Vercel Platform"]:::external
    end

    %% Relationships
    Components --> Pages
    Pages --> API
    API --> External
    Utils --> Components
    Assets --> Components
    AuthProviders --> Auth

    %% Click Events
    click UI "https://github.com/nguyenvuhoang/proskills39-application/tree/main/src/components/ui"
    click Icons "https://github.com/nguyenvuhoang/proskills39-application/tree/main/src/components/icons"
    click Layouts "https://github.com/nguyenvuhoang/proskills39-application/blob/main/src/layouts/_layout.tsx"
    click Auth "https://github.com/nguyenvuhoang/proskills39-application/blob/main/src/components/auth/use-auth.ts"
    click Theme "https://github.com/nguyenvuhoang/proskills39-application/blob/main/src/lib/hooks/use-is-dark-mode.ts"
    click Static "https://github.com/nguyenvuhoang/proskills39-application/tree/main/src/pages"
    click Dynamic "https://github.com/nguyenvuhoang/proskills39-application/tree/main/src/pages"
    click Fonts "https://github.com/nguyenvuhoang/proskills39-application/tree/main/public/fonts"
    click Hooks "https://github.com/nguyenvuhoang/proskills39-application/tree/main/src/lib/hooks"
    click Types "https://github.com/nguyenvuhoang/proskills39-application/blob/main/src/types/index.ts"
    click Config "https://github.com/nguyenvuhoang/proskills39-application/blob/main/src/config/index.ts"
    click Routes "https://github.com/nguyenvuhoang/proskills39-application/blob/main/src/pages/api/hello.ts"
    click HTTPClient "https://github.com/nguyenvuhoang/proskills39-application/blob/main/src/data/client/http-client.ts"
    click Endpoints "https://github.com/nguyenvuhoang/proskills39-application/blob/main/src/data/client/endpoints.ts"
    click Helpers "https://github.com/nguyenvuhoang/proskills39-application/blob/main/src/utils/util.jsx"

    %% Styling
    classDef component fill:#2563eb,color:#fff,stroke:#fff
    classDef api fill:#059669,color:#fff,stroke:#fff
    classDef external fill:#ea580c,color:#fff,stroke:#fff
    classDef asset fill:#6366f1,color:#fff,stroke:#fff
    classDef util fill:#7c3aed,color:#fff,stroke:#fff

    %% Legend
    subgraph Legend
        direction TB
        C1["Component"]:::component
        A1["API"]:::api
        E1["External"]:::external
        AS1["Asset"]:::asset
        U1["Utility"]:::util
    end
```
