# fawazv/personal_portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/fawazv/personal_portfolio
- Repository: https://github.com/fawazv/personal_portfolio

## Overview

##### Project Type and Purpose
- This is a full-stack, single-page portfolio application built with Next.js (App Router).
- Purpose: Showcase projects, skills, timeline, testimonials, and provide a contact form via serverless email API.

##### File Structure Analysis
- Top level:
- public/ – static assets (videos, images).
- src/app/ – Next.js routes and layouts.
- src/components/ – UI building blocks (Hero, Projects, Testimonials, etc.).
- Config files: next.config.ts, eslint.config.mjs, postcss.config.mjs, tsconfig.json.
- Under src/app:
- layout.tsx – global layout wrapper.
- page.tsx – home page entry.
- api/send-email/route.ts – serverless function for sending email.
- api/submit-testimonial/route.ts – serverless function for testimonial submission.
- Utilities and build:
- rename_assets.js – custom build-time script, likely for asset management.
- package.json/scripts – dev, build, start, lint.

##### README Insights
- Tech stack: Next.js 16, TypeScript, Tailwind CSS v4, Framer Motion, Three.js/React Three Fiber, Nodemailer.
- Features: Scrolly animations, dynamic timeline, testimonial marquee, responsive design, contact integration.

##### Main Components
A. Client Browser (React/Next.js front end)
B. Next.js Server (App Router handling SSR/SSG + serverless API routes)
C. Public CDN/Static Assets Host (serving videos, images from /public)
D. External SMTP Email Service (via Nodemailer and environment SMTP credentials)
E. (Optional) Data Store or File-based Data (for testimonials & timeline if dynamic)
F. Build System (Node.js, npm scripts, rename_assets.js, FFmpeg for asset optimization)

##### Relationships and Data Flows
- Browser → Next.js Server:
- Requests HTML/CSS/JS bundles (SSR or static).
- Fetches JSON from API endpoints (/api/send-email, /api/submit-testimonial).
- Next.js Server → Public CDN: Serves static files (mp4, images).
- Next.js Server → External SMTP Service: Sends outbound emails on contact form submission.
- Build System → Public CDN: Runs locally or CI to optimize videos (FFmpeg), rename assets, then deploy.

##### Architectural Patterns & Principles
- Monorepo monolith with clear separation:
- UI components vs. API routes vs. static assets.
- Serverless functions pattern for backend logic.
- Declarative styling (Tailwind CSS) and animation (Framer Motion).
- App Router for nested layouts and routing.

##### Technologies & Frameworks
- Frontend: Next.js (React), TypeScript, Tailwind CSS, Framer Motion, Three.js + React Three Fiber.
- Backend/API: Node.js serverless functions in Next.js, Nodemailer.
- Asset processing: FFmpeg, custom Node script.
- Deployment: Vercel or any Next.js-capable host.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    subgraph "Client Layer"
        direction TB
        Browser["Client Browser\n(Next.js Front End)"]:::frontend
        subgraph "Next.js App Code"
            direction TB
            Layout["layout.tsx"]:::frontend
            Page["page.tsx"]:::frontend
            subgraph "UI Components"
                direction TB
                Hero["Hero"]:::frontend
                Projects["Projects Grid"]:::frontend
                Timeline["Timeline"]:::frontend
                Testimonials["Testimonials"]:::frontend
                Contact["Contact Form"]:::frontend
                ScrollyVideo["Scrolly Animations\n/ Video"]:::frontend
                Skills["Skills Section"]:::frontend
                Overlay["Overlay"]:::frontend
                Dock["Dock"]:::frontend
                Blog["Blog"]:::frontend
            end
        end
    end

    %% Server/Platform Layer
    subgraph "Server/Platform Layer"
        direction TB
        NextJsRouter["Next.js App Router\n(SSR/SSG)"]:::server
        subgraph "Serverless API Routes"
            direction TB
            API_Send["API: /send-email"]:::api
            API_Test["API: /submit-testimonial"]:::api
        end
    end

    %% External Services Layer
    subgraph "External Services"
        direction TB
        SMTPService["SMTP Email Service\n(Nodemailer)"]:::external
        CDN["Public CDN\n/Static Assets"]:::cdn
    end

    %% Build/CI Layer
    subgraph "Build/CI Layer"
        direction TB
        RenameScript["rename_assets.js"]:::build
        PackageJson["package.json &\nConfigs (next.config.ts,\npostcss.config.mjs,\neslint.config.mjs,\ntsconfig.json)"]:::build
    end

    %% Connections
    Browser -->|"HTTP GET HTML/CSS/JS"| NextJsRouter
    Browser -->|"POST JSON"| API_Send
    Browser -->|"POST JSON"| API_Test
    NextJsRouter -->|"Serves Static Files"| CDN
    API_Send -->|"SMTP/TLS"| SMTPService
    RenameScript -->|"Optimize & Rename"| CDN
    PackageJson -->|"Build/Deploy"| NextJsRouter

    %% Click Events
    click Layout "https://github.com/fawazv/personal_portfolio/blob/master/src/app/layout.tsx"
    click Page "https://github.com/fawazv/personal_portfolio/blob/master/src/app/page.tsx"
    click Hero "https://github.com/fawazv/personal_portfolio/blob/master/src/components/Hero.tsx"
    click Projects "https://github.com/fawazv/personal_portfolio/blob/master/src/components/Projects.tsx"
    click Timeline "https://github.com/fawazv/personal_portfolio/blob/master/src/components/Timeline.tsx"
    click Testimonials "https://github.com/fawazv/personal_portfolio/blob/master/src/components/Testimonials.tsx"
    click Contact "https://github.com/fawazv/personal_portfolio/blob/master/src/components/Contact.tsx"
    click ScrollyVideo "https://github.com/fawazv/personal_portfolio/blob/master/src/components/ScrollyVideo.tsx"
    click Skills "https://github.com/fawazv/personal_portfolio/blob/master/src/components/Skills.tsx"
    click Overlay "https://github.com/fawazv/personal_portfolio/blob/master/src/components/Overlay.tsx"
    click Dock "https://github.com/fawazv/personal_portfolio/blob/master/src/components/Dock.tsx"
    click Blog "https://github.com/fawazv/personal_portfolio/blob/master/src/components/Blog.tsx"
    click API_Send "https://github.com/fawazv/personal_portfolio/blob/master/src/app/api/send-email/route.ts"
    click API_Test "https://github.com/fawazv/personal_portfolio/blob/master/src/app/api/submit-testimonial/route.ts"
    click RenameScript "https://github.com/fawazv/personal_portfolio/blob/master/rename_assets.js"
    click PackageJson "https://github.com/fawazv/personal_portfolio/blob/master/package.json"

    %% Styles
    classDef frontend fill:#CCE5FF,stroke:#1E70BF,color:#000;
    classDef server fill:#FFF2CC,stroke:#BF8F00,color:#000;
    classDef api fill:#FFD699,stroke:#D97706,color:#000;
    classDef external fill:#D5E8D4,stroke:#82B366,color:#000;
    classDef cdn fill:#E0E0E0,stroke:#808080,color:#000;
    classDef build fill:#F0F0F0,stroke:#909090,color:#000;
```
