# strange500/nextportfolio architecture

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

- Interactive diagram: https://gitdiagram.com/strange500/nextportfolio
- Repository: https://github.com/strange500/nextportfolio

## Overview

##### Project type and purpose
- This is a full-stack (mostly frontend-heavy) portfolio web application built with Next.js (React) for server-side rendering and static site generation. It showcases projects and personal info, deployed via Docker on a home server.

##### File structure
- Top-level:
- app/ – Next.js 13 “app router” pages and global layout, CSS imports
- components/ & components/ui/ – React UI components and primitives
- lib/ – shared utility functions
- public/ – static assets (logo, images)
- Dockerfile, compose.yml, devbox.json, shell.nix – containerization & reproducible dev environment
- next.config.ts, tailwind.config.ts, postcss.config.mjs, tsconfig.json – framework and build configs
- Notice no backend API folder, so the “server” is the Next.js runtime serving pages and assets.

##### README for additional insights
- Frameworks: Next.js, React, Node.js
- Styles: CSS Modules, Tailwind CSS
- Deployment: Docker on a personal server
- No external database—static content or markdown/docs images under docs/.

##### Detail is key
- Both build-time (Tailwind compilation, PostCSS, TypeScript compilation) and run-time (Node.js serving pages) steps
- Do not oversimplify: show public assets, docs folder, theming provider, utility library

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    subgraph "Developer Environment" 
        direction TB
        Dev[/"Developer Env"/]:::devtools
    end

    %% Source Code Repository
    subgraph "Source Code Repository (GitHub)"
        direction TB
        Repo[/"GitHub Repo"/]:::devtools
    end

    %% Build & CI
    subgraph "Build & CI" 
        direction TB
        Scripts["Scripts & Deps"]:::devtools
        Lint["Linting & Formatting"]:::devtools
        Styling["Styling Pipeline"]:::devtools
    end

    %% Containerization
    subgraph "Containerization Layer" 
        direction TB
        Dockerfile["Dockerfile"]:::infra
        Compose["compose.yml"]:::infra
        Dockerignore[".dockerignore"]:::infra
    end

    %% Hosting
    subgraph "Hosting Environment" 
        direction TB
        HomeServer[/"Home Server (Docker)"/]:::infra
    end

    %% Runtime Services
    subgraph "Runtime Services"
        direction TB
        NextServer["Next.js Server (Node.js)"]:::runtime
        ReactUI["React UI Layer"]:::code
        SharedUtils["Shared Utilities"]:::code
        StaticAssets["Static Assets"]:::assets
    end

    %% Browser Client
    Browser["Browser Clients"]:::external

    %% Config & Metadata
    subgraph "Configuration & Metadata"
        direction TB
        TSConfig["tsconfig.json"]:::code
        ComponentsMeta["components.json"]:::code
    end

    %% Relationships
    Dev -->|"commits"| Repo
    Repo -->|"triggers CI"| Scripts
    Repo --> Scripts
    Scripts --> Lint
    Scripts --> Styling
    Scripts -->|"build image"| Dockerfile
    Dockerfile --> Compose
    Compose --> HomeServer
    HomeServer --> NextServer
    Browser -->|"HTTP 3000"| NextServer
    NextServer --> ReactUI
    NextServer --> SharedUtils
    NextServer --> StaticAssets
    ReactUI --> SharedUtils
    ReactUI --> StaticAssets

    %% File Structure Click Events
    click Dev "https://github.com/strange500/nextportfolio/blob/main/devbox.json"
    click Dev "https://github.com/strange500/nextportfolio/blob/main/shell.nix"
    click Dev "https://github.com/strange500/nextportfolio/blob/main/devbox.lock"
    click Repo "https://github.com/strange500/nextportfolio/blob/main/.gitignore"
    click Repo "https://github.com/strange500/nextportfolio/blob/main/README.md"
    click Repo "https://github.com/strange500/nextportfolio/blob/main/package.json"
    click Repo "https://github.com/strange500/nextportfolio/blob/main/pnpm-lock.yaml"
    click Scripts "https://github.com/strange500/nextportfolio/blob/main/package.json"
    click Scripts "https://github.com/strange500/nextportfolio/blob/main/pnpm-lock.yaml"
    click Lint "https://github.com/strange500/nextportfolio/blob/main/eslint.config.mjs"
    click Lint "https://github.com/strange500/nextportfolio/blob/main/.prettierrc"
    click Styling "https://github.com/strange500/nextportfolio/blob/main/tailwind.config.ts"
    click Styling "https://github.com/strange500/nextportfolio/blob/main/postcss.config.mjs"
    click Dockerfile "https://github.com/strange500/nextportfolio/tree/main/Dockerfile"
    click Compose "https://github.com/strange500/nextportfolio/blob/main/compose.yml"
    click Dockerignore "https://github.com/strange500/nextportfolio/blob/main/.dockerignore"
    click NextServer "https://github.com/strange500/nextportfolio/blob/main/next.config.ts"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/app/layout.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/app/globals.css"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/app/githubCss.css"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/app/(root)/page.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/app/(root)/var.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/Header.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/Footer.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ProjectCard.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ReadMeDialog.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ModeToggle.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/smallSocialBtn.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/Background.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/theme-provider.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ui/button.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ui/card.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ui/badge.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ui/dialog.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ui/dropdown-menu.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ui/navigation-menu.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ui/scroll-area.tsx"
    click ReactUI "https://github.com/strange500/nextportfolio/blob/main/components/ui/separator.tsx"
    click SharedUtils "https://github.com/strange500/nextportfolio/blob/main/lib/utils.ts"
    click StaticAssets "https://github.com/strange500/nextportfolio/tree/main/public/"
    click StaticAssets "https://github.com/strange500/nextportfolio/tree/main/docs/img/"
    click TSConfig "https://github.com/strange500/nextportfolio/blob/main/tsconfig.json"
    click ComponentsMeta "https://github.com/strange500/nextportfolio/blob/main/components.json"

    %% Styles
    classDef devtools fill:#bbdefb,stroke:#1e88e5,color:#0d47a1
    classDef infra fill:#ffe0b2,stroke:#fb8c00,color:#e65100
    classDef runtime fill:#c8e6c9,stroke:#43a047,color:#1b5e20
    classDef code fill:#e3f2fd,stroke:#64b5f6,color:#0d47a1
    classDef assets fill:#f8bbd0,stroke:#d81b60,color:#880e4f
    classDef external fill:#d7ccc8,stroke:#8d6e63,color:#4e342e
```
