# gregorygeorgereinis/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/gregorygeorgereinis/portfolio
- Repository: https://github.com/gregorygeorgereinis/portfolio

## Overview

##### Project type and purpose
- This is a frontend‐only personal portfolio website built with Next.js (TypeScript) and the “create-t3-app” stack.
- It serves static and hybrid‐rendered pages (SSG/SSR), using modern UI animations (framer-motion, locomotive-scroll) and Tailwind CSS for styling.

##### File structure
- Top-level config and metadata:
- next.config.js, tsconfig.json, tailwind.config.ts, postcss.config.cjs
- package.json / pnpm-lock.yaml, .eslintrc.cjs, prettier.config.js
- Public assets:
- public/assets (webm demos, 3D scenes), public/fonts, manifest.json, robots.txt
- Source code:
- src/pages – Next.js pages and custom App (_app.tsx)
- src/components – React components (Container, Footer, Preloader)
- src/components/ui – Reusable UI primitives (button, card, carousel)
- src/lib – Utility functions (utils.ts)
- src/styles – CSS modules + global styles + external font CSS

##### README for additional insights
- Confirms use of create-t3-app (Next.js + TypeScript + Tailwind CSS).
- Highlights responsive design, customizability, smooth animations (locomotive-scroll, framer-motion).
- Deployment targets: Vercel, Netlify, Docker.

a. Main components
- Developer Codebase
- Build Pipeline (Next.js + Tailwind CSS + PostCSS)
- Deployment Platform (Vercel / Netlify / Docker container)
- CDN / Static Asset Host
- Browser (end user)
- Public Assets (webm, fonts, 3D scenes)
b. Relationships and interactions
- Developer pushes code → CI/CD triggers build
- Build step compiles React/TSX, processes CSS, bundles static assets
- Artifacts deployed to hosting (serverless Next.js functions or static host)
- CDN caches pages and assets
- Browser requests page → CDN or Edge → Next.js runtime (if SSR) or serves static HTML
- Client downloads JS bundles, CSS, fonts, media assets
- UI components (framer-motion, locomotive-scroll) run in browser
c. Architectural patterns
- Component‐based UI (atomic design in src/components/ui)
- Hybrid rendering (SSG for index, SSR on‐demand)
- Static asset serving from public/ via CDN
d. Key technologies/frameworks
- Next.js (routing, SSG/SSR)
- React + TypeScript
- Tailwind CSS + PostCSS
- Framer Motion + locomotive-scroll (animations)
- Vercel/Netlify for deployment

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Codebase
    subgraph "Developer Codebase"
        direction TB
        Config["next.config.js & tsconfig.json"] 
        BuildConfig["tailwind.config.ts & postcss.config.cjs"]
        Linting[".eslintrc.cjs & prettier.config.js"]
        Package["package.json & pnpm-lock.yaml"]
        Env[".env.example & src/env.js"]
        subgraph "Source Code"
            direction TB
            App["_app.tsx"]
            Index["index.tsx"]
            subgraph "Components"
                direction TB
                Container["Container.tsx"]
                Footer["Footer.tsx"]
                Preloader["Preloader.tsx"]
                subgraph "UI Primitives"
                    direction TB
                    Button["button.tsx"]
                    Card["card.tsx"]
                    Carousel["carousel.tsx"]
                end
            end
            Utils["utils.ts"]
            subgraph "Styles"
                direction TB
                Globals["globals.css"]
                Clash["clash-grotesk.css"]
                Locomotive["locomotive-scroll.css"]
                ContainerCSS["Container.module.css"]
                HomeCSS["Home.module.css"]
            end
        end
    end

    %% Build Pipeline
    subgraph "Build Pipeline"
        direction TB
        NextBuild["Next.js Build (JS/TSX compile, SSG/SSR)"]
        CSSBuild["Tailwind CSS + PostCSS"]
    end

    %% Deployment & CDN
    subgraph "Deployment & CDN"
        direction TB
        Vercel["Vercel Serverless"]
        Netlify["Netlify Hosting"]
        Docker["Docker Container"]
        CDN["CDN / Static Asset Host"]
    end

    %% Public Assets
    subgraph "Public Assets"
        direction TB
        Assets["public/assets"]
        Fonts["public/fonts"]
        Manifest["manifest.json"]
        Robots["robots.txt"]
    end

    %% Browser Runtime
    Browser["Browser + runtime libs"]

    %% Connections
    Config --> NextBuild
    BuildConfig --> CSSBuild
    Linting --> NextBuild
    Package --> NextBuild
    Env --> NextBuild
    NextBuild --> Vercel
    CSSBuild --> Vercel
    Vercel --> CDN
    Netlify --> CDN
    Docker --> CDN
    CDN --> Browser
    Browser --> CDN
    Browser -->|cache_miss| Vercel
    Browser -->|loads_assets| Assets
    Browser -->|loads_fonts| Fonts

    %% Click Events
    click Config "https://github.com/gregorygeorgereinis/portfolio/blob/v2/next.config.js"
    click Config "https://github.com/gregorygeorgereinis/portfolio/blob/v2/tsconfig.json"
    click BuildConfig "https://github.com/gregorygeorgereinis/portfolio/blob/v2/tailwind.config.ts"
    click BuildConfig "https://github.com/gregorygeorgereinis/portfolio/blob/v2/postcss.config.cjs"
    click Linting "https://github.com/gregorygeorgereinis/portfolio/blob/v2/.eslintrc.cjs"
    click Linting "https://github.com/gregorygeorgereinis/portfolio/blob/v2/prettier.config.js"
    click Package "https://github.com/gregorygeorgereinis/portfolio/blob/v2/package.json"
    click Package "https://github.com/gregorygeorgereinis/portfolio/blob/v2/pnpm-lock.yaml"
    click Env "https://github.com/gregorygeorgereinis/portfolio/blob/v2/.env.example"
    click Env "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/env.js"
    click App "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/pages/_app.tsx"
    click Index "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/pages/index.tsx"
    click Container "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/components/Container.tsx"
    click Footer "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/components/Footer.tsx"
    click Preloader "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/components/Preloader.tsx"
    click Button "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/components/ui/button.tsx"
    click Card "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/components/ui/card.tsx"
    click Carousel "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/components/ui/carousel.tsx"
    click Utils "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/lib/utils.ts"
    click Globals "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/styles/globals.css"
    click Clash "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/styles/clash-grotesk.css"
    click Locomotive "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/styles/locomotive-scroll.css"
    click ContainerCSS "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/styles/Container.module.css"
    click HomeCSS "https://github.com/gregorygeorgereinis/portfolio/blob/v2/src/styles/Home.module.css"
    click Assets "https://github.com/gregorygeorgereinis/portfolio/tree/v2/public/assets"
    click Fonts "https://github.com/gregorygeorgereinis/portfolio/tree/v2/public/fonts"
    click Manifest "https://github.com/gregorygeorgereinis/portfolio/blob/v2/public/manifest.json"
    click Robots "https://github.com/gregorygeorgereinis/portfolio/blob/v2/public/robots.txt"

    %% Styles
    classDef blue fill:#cce5ff,stroke:#004085,color:#004085
    classDef orange fill:#ffe5b4,stroke:#994d00,color:#994d00
    classDef green fill:#d4edda,stroke:#155724,color:#155724
    classDef gray fill:#e2e3e5,stroke:#6c757d,color:#6c757d

    class Config,BuildConfig,Linting,Package,Env,App,Index,Container,Footer,Preloader,Button,Card,Carousel,Utils,Globals,Clash,Locomotive,ContainerCSS,HomeCSS blue
    class NextBuild,CSSBuild orange
    class Vercel,Netlify,Docker,CDN orange
    class Assets,Fonts,Manifest,Robots green
    class Browser gray
```
