# andreean26/adam_web architecture

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

- Interactive diagram: https://gitdiagram.com/andreean26/adam_web
- Repository: https://github.com/andreean26/adam_web

## Overview

This repo is a **single Next.js 15 (App Router) portfolio website**: a mostly **static/content-driven frontend** with **client-side interactions** (theme toggle, scroll reveal, animated background) and **static data sources** (TypeScript data files) plus **public assets** (images, CV PDF). There is **no evident custom backend** (no `src/app/api/*`, no server folder, no DB layer).

- **Delivery/runtime** of a Next.js app (Vercel/Node runtime + CDN/static assets)
- **UI composition** (App Router → page → sections → UI components)
- **Data/asset flow** (static TS data + public images/documents)
- **Build/deploy pipeline** (Next build output, Vercel deployment)

##### Runtime entrypoints / routing
- `src/app/layout.tsx` — global shell (fonts, theme provider patterns if present, header/footer inclusion)
- `src/app/page.tsx` — the home route composing all sections
- `src/app/globals.css` — global styling layer

##### “Data layer” (static, build-time bundled)
- `src/assets/data/projects.ts`
- `src/assets/data/services.ts`
These are the primary “content sources” powering Portfolio/Services UI.

##### Static assets served via Next/public
- `public/images/**` — hero + project images
- `public/assets/documents/**` — CV PDF
These are delivered as static files (typically CDN-cached in production).

##### Cross-cutting config/tooling
- `next.config.ts` — Next runtime/build configuration
- `postcss.config.mjs`, Tailwind usage (implied by README)
- `tsconfig.json`, `package.json` — TypeScript + dependency graph

##### Next.js App (Next 15 App Router)
- Responsibilities: routing (`/`), rendering, bundling, serving HTML/JS/CSS

##### Static Asset Store / CDN
- Source: `public/` folder
- Assets: images, PDF CV
- Delivered to browser independently of page HTML (still under same domain typically)

##### Build Pipeline (CI/CD)
- `npm run build` → Next build output
- Deploy to Vercel on git push

**Key relationships**
- Next.js App uses **Tailwind/PostCSS** to produce CSS
- Next.js App bundles **TypeScript content** from `src/assets/data/*` into build artifacts
- Next.js App references `public/*` assets by URL path

- **Edge/CDN** (static + caching)
- **Serverless/Node runtime** (rendering, if SSR is used)

This is where you “separate into as many components as possible” while staying true to the repo.

##### App Shell
- `src/app/layout.tsx`
- contains/uses: `Header`, `Footer`, global styles (`globals.css`), fonts (Geist per README)

##### Route
- `src/app/page.tsx`
- composes sections in order:
- `HeroSection`
- `AboutSection`
- `SkillsSection`
- `ServicesSection`
- `PortfolioSection`
- `ContactSection`

##### Section internals
- `ServicesSection` → consumes `src/assets/data/services.ts` → renders `Card`/`Button` (or equivalents)
- `PortfolioSection` → consumes `src/assets/data/projects.ts` → renders project cards, images from `public/images/data/...`
- `HeroSection` → likely references hero image (`public/images/hero/...`) and CV link (`public/assets/documents/...`)

##### Interaction/UI primitives (cross-cutting)
- `ThemeToggle` → affects global theme state (often via `class` on `<html>`/`<body>` or context); may persist in localStorage/cookies (if implemented)
- `ScrollReveal` + `useScrollReveal` → intersection observer / scroll-trigger animation behavior used by sections
- `ScrollProgress`, `BackToTop` → window scroll listeners
- `AnimatedBackground`, `NatureDecorations` → visual layer used across hero/page

- **Composition**: `page.tsx` → sections → UI components
- **Data dependency**: sections → `assets/data/*.ts`
- **Asset dependency**: sections/components → `public/images/*` and `public/assets/documents/*`
- **Hook dependency**: `ScrollReveal` → `useScrollReveal`

Labels on nodes (don’t keep them implicit):
- “Next.js 15 App Router” (container)
- “Tailwind CSS (PostCSS)” (build-time styling)
- “Static content (TS modules): projects.ts, services.ts”
- “Static assets (public/): images, CV PDF”
- “Client-side interactions: theme toggle, scroll listeners, intersection observer”

##### Notable architectural patterns to highlight
- **App Router composition**: `layout.tsx` as shell + `page.tsx` composing sections
- **Component taxonomy**: `layout/` vs `sections/` vs `ui/` (clean separation)
- **Static data-driven rendering**: services/projects are code-defined datasets (no CMS/DB)
- **Cross-cutting UI behavior via hooks**: `useScrollReveal` consumed by UI component(s)

##### Concrete diagramming rules (make it readable and unambiguous)
Use consistent visual grammar:

- “HTML (RSC/SSR/SSG)”
- “JS bundle”
- “CSS”
- “/public/images/*”
- “projects.ts (import)”

- “Repo / Source” boundary (src/, public/)
- “Build Output (.next)” boundary (conceptual)
- “Hosting (Vercel)” boundary (prod runtime)

##### Context: Visitor ↔ Portfolio Site (Vercel) ↔ External links (GitHub/LinkedIn/Email)
2. **Container**: Browser → CDN/static assets + Next.js rendering runtime; plus CI/CD from Git → Vercel
3. **Component**: `layout.tsx` + `page.tsx` + sections + UI + hooks + static data + public assets

That combination will be both **accurate to the repo** and **detailed enough** to communicate architecture, composition, and operational flow.

## Diagram (Mermaid)

```mermaid
flowchart TD

%% =========================================================
%% Diagram 1: System Context (Vertical)
%% =========================================================
subgraph "System Context (C4-1)"
direction TB

Visitor["Visitor (Browser)"]:::external

subgraph "Hosting"
direction TB
Vercel["Vercel Hosting (CDN + Node Runtime)"]:::container
end

ExternalLinks["External Links (GitHub / LinkedIn)"]:::external
EmailClient["Email Client (mailto:)"]:::external

Visitor -->|"HTTPS GET /"| Vercel
Vercel -->|"HTML (RSC/SSR/SSG) + JS + CSS"| Visitor
Visitor -->|"GET /public/images/*"| Vercel
Visitor -->|"GET /public/assets/documents/*.pdf"| Vercel
Visitor -->|"Open external profile links"| ExternalLinks
Visitor -->|"mailto:"| EmailClient
end

%% =========================================================
%% Diagram 2: Container Diagram (Vertical)
%% =========================================================
subgraph "Container Diagram (C4-2)"
direction TB

GitRepo["Git Repository"]:::external

subgraph "CI/CD Pipeline"
direction TB
Build["Build Pipeline\n(npm ci / npm run build)"]:::build
end

subgraph "Vercel Platform"
direction TB
CDN["Edge CDN\n(static caching)"]:::container
NextRuntime["Next.js 15 App Router Runtime\n(Server Rendering + RSC + Client Components)"]:::container
end

Browser["Browser Runtime"]:::external

subgraph "Repo Inputs"
direction TB
StaticData["Static content (TS modules)\nprojects.ts, services.ts"]:::data
PublicAssets["Static assets (public/)\nimages + CV PDF"]:::data
Tooling["Tooling & Config\nNext config + TS + Tailwind/PostCSS"]:::build
end

GitRepo -->|"git push"| Build
Build -->|"Deploy build output (.next)"| NextRuntime
Build -->|"Upload static assets"| CDN

Tooling -.->|"configures build"| Build
StaticData -.->|"bundled into JS/HTML"| Build
PublicAssets -.->|"published to CDN"| Build

Browser -->|"Request /"| CDN
CDN -->|"Cache hit (static) OR forward"| NextRuntime
NextRuntime -->|"HTML (RSC/SSR/SSG)"| Browser
NextRuntime -->|"JS bundle + CSS"| Browser
Browser -->|"Fetch /public/*"| CDN
CDN -->|"images + PDF"| Browser
end

%% =========================================================
%% Diagram 3: Component Diagram (C4-3)
%% =========================================================
subgraph "Component Diagram (C4-3) — Next.js App Router"
direction TB

subgraph "App Router Entrypoints (src/app)"
direction TB
Layout["Global App Shell\nlayout.tsx"]:::app
GlobalsCSS["Global Styling\n(globals.css)"]:::build
Page["Home Route\npage.tsx"]:::app
end

subgraph "Layout Components (src/components/layout)"
direction TB
Header["Header"]:::component
Footer["Footer"]:::component
end

subgraph "Sections (src/components/sections)"
direction TB
Hero["HeroSection"]:::component
About["AboutSection"]:::component
Skills["SkillsSection"]:::component
Services["ServicesSection"]:::component
Portfolio["PortfolioSection"]:::component
Contact["ContactSection"]:::component
end

subgraph "UI Primitives / Interactions (src/components/ui)"
direction TB
ThemeToggle["ThemeToggle\n(Client-side theme state)"]:::ui
ScrollProgress["ScrollProgress\n(scroll listener)"]:::ui
ScrollReveal["ScrollReveal\n(reveal on viewport)"]:::ui
BackToTop["BackToTop\n(scroll listener)"]:::ui
AnimatedBg["AnimatedBackground\n(visual layer)"]:::ui
NatureDeco["NatureDecorations\n(visual layer)"]:::ui
Button["Button"]:::ui
Card["Card"]:::ui
end

subgraph "Hooks (src/hooks)"
direction TB
UseScrollReveal["useScrollReveal\n(IntersectionObserver)"]:::hook
end

subgraph "Static Data (src/assets/data)"
direction TB
ProjectsData["projects.ts\n(Portfolio content)"]:::data
ServicesData["services.ts\n(Services content)"]:::data
end

subgraph "Public Static Assets (public/)"
direction TB
HeroImages["Hero Images\n/public/images/hero/*"]:::asset
ProjectImages["Project Images\n/public/images/data/*"]:::asset
CVPdf["CV PDF\n/public/assets/documents/*.pdf"]:::asset
end

subgraph "Config & Tooling"
direction TB
NextConfig["next.config.ts"]:::build
PostCSS["postcss.config.mjs\n(Tailwind/PostCSS)"]:::build
TSConfig["tsconfig.json"]:::build
Pkg["package.json"]:::build
Lock["package-lock.json"]:::build
end

%% Composition (solid)
Layout -->|"includes"| Header
Layout -->|"includes"| Footer
Layout -->|"applies"| GlobalsCSS
Layout -->|"uses"| ThemeToggle

Page -->|"composes"| Hero
Page -->|"composes"| About
Page -->|"composes"| Skills
Page -->|"composes"| Services
Page -->|"composes"| Portfolio
Page -->|"composes"| Contact

%% UI usage (solid)
Hero -->|"uses"| AnimatedBg
Hero -->|"uses"| NatureDeco
Hero -->|"uses"| Button

Services -->|"uses"| Card
Services -->|"uses"| Button

Portfolio -->|"uses"| Card
Portfolio -->|"uses"| Button

Page -->|"uses"| ScrollProgress
Page -->|"uses"| BackToTop

Hero -->|"wraps with"| ScrollReveal
About -->|"wraps with"| ScrollReveal
Skills -->|"wraps with"| ScrollReveal
Services -->|"wraps with"| ScrollReveal
Portfolio -->|"wraps with"| ScrollReveal
Contact -->|"wraps with"| ScrollReveal

ScrollReveal -->|"depends on"| UseScrollReveal

%% Data dependencies (dashed = build-time imports)
Services -.->|"imports"| ServicesData
Portfolio -.->|"imports"| ProjectsData

%% Asset references (solid runtime URL fetch)
Hero -->|"references /public/*"| HeroImages
Hero -->|"links to"| CVPdf
Portfolio -->|"references /public/*"| ProjectImages

%% Tooling deps (dashed)
Layout -.->|"built with"| NextConfig
Page -.->|"built with"| NextConfig
GlobalsCSS -.->|"processed by"| PostCSS
Layout -.->|"typechecked by"| TSConfig
Page -.->|"deps/scripts"| Pkg
Pkg -.->|"resolved by"| Lock
end

%% =========================================================
%% Click events (from component_mapping)
%% =========================================================
click Layout "https://github.com/andreean26/adam_web/blob/master/src/app/layout.tsx"
click Page "https://github.com/andreean26/adam_web/blob/master/src/app/page.tsx"
click GlobalsCSS "https://github.com/andreean26/adam_web/blob/master/src/app/globals.css"

click Header "https://github.com/andreean26/adam_web/blob/master/src/components/layout/Header.tsx"
click Footer "https://github.com/andreean26/adam_web/blob/master/src/components/layout/Footer.tsx"

click Hero "https://github.com/andreean26/adam_web/blob/master/src/components/sections/HeroSection.tsx"
click About "https://github.com/andreean26/adam_web/blob/master/src/components/sections/AboutSection.tsx"
click Skills "https://github.com/andreean26/adam_web/blob/master/src/components/sections/SkillsSection.tsx"
click Services "https://github.com/andreean26/adam_web/blob/master/src/components/sections/ServicesSection.tsx"
click Portfolio "https://github.com/andreean26/adam_web/blob/master/src/components/sections/PortfolioSection.tsx"
click Contact "https://github.com/andreean26/adam_web/blob/master/src/components/sections/ContactSection.tsx"

click ThemeToggle "https://github.com/andreean26/adam_web/blob/master/src/components/ui/ThemeToggle.tsx"
click ScrollProgress "https://github.com/andreean26/adam_web/blob/master/src/components/ui/ScrollProgress.tsx"
click ScrollReveal "https://github.com/andreean26/adam_web/blob/master/src/components/ui/ScrollReveal.tsx"
click BackToTop "https://github.com/andreean26/adam_web/blob/master/src/components/ui/BackToTop.tsx"
click AnimatedBg "https://github.com/andreean26/adam_web/blob/master/src/components/ui/AnimatedBackground.tsx"
click NatureDeco "https://github.com/andreean26/adam_web/blob/master/src/components/ui/NatureDecorations.tsx"
click Button "https://github.com/andreean26/adam_web/blob/master/src/components/ui/Button.tsx"
click Card "https://github.com/andreean26/adam_web/blob/master/src/components/ui/Card.tsx"

click UseScrollReveal "https://github.com/andreean26/adam_web/blob/master/src/hooks/useScrollReveal.ts"

click ProjectsData "https://github.com/andreean26/adam_web/blob/master/src/assets/data/projects.ts"
click ServicesData "https://github.com/andreean26/adam_web/blob/master/src/assets/data/services.ts"

click ProjectImages "https://github.com/andreean26/adam_web/tree/master/public/images/data/"
click HeroImages "https://github.com/andreean26/adam_web/tree/master/public/images/hero/"
click CVPdf "https://github.com/andreean26/adam_web/blob/master/public/assets/documents/Adam Fawazzaky Fardy Andreean ATS CV.pdf"

click NextConfig "https://github.com/andreean26/adam_web/blob/master/next.config.ts"
click PostCSS "https://github.com/andreean26/adam_web/blob/master/postcss.config.mjs"
click Pkg "https://github.com/andreean26/adam_web/blob/master/package.json"
click Lock "https://github.com/andreean26/adam_web/blob/master/package-lock.json"
click TSConfig "https://github.com/andreean26/adam_web/blob/master/tsconfig.json"

%% =========================================================
%% Styles (color required)
%% =========================================================
classDef external fill:#E6F0FF,stroke:#1D4ED8,stroke-width:1.5px,color:#0B1B3A
classDef container fill:#DBEAFE,stroke:#1E40AF,stroke-width:2px,color:#0B1B3A
classDef app fill:#DCFCE7,stroke:#166534,stroke-width:2px,color:#052E16
classDef component fill:#BBF7D0,stroke:#15803D,stroke-width:1.5px,color:#052E16
classDef ui fill:#A7F3D0,stroke:#047857,stroke-width:1.5px,color:#064E3B
classDef hook fill:#99F6E4,stroke:#0F766E,stroke-width:1.5px,color:#134E4A
classDef data fill:#FEF3C7,stroke:#B45309,stroke-width:1.5px,color:#451A03
classDef asset fill:#FFE4E6,stroke:#9F1239,stroke-width:1.5px,color:#4C0519
classDef build fill:#E5E7EB,stroke:#374151,stroke-width:1.5px,color:#111827
```
