# javiergoodall99/javiergoodall-portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a full-stack (mostly frontend) portfolio website built with Next.js App Router.
- It renders static pages (SSG) and server-rendered pages (SSR) for dynamic project routes.
- It uses Tailwind CSS for styling, a custom UI component library under `src/components/ui`, and static data files under `src/data`.

##### File structure
- Top-level config: `next.config.ts`, `tailwind.config.js`, `tsconfig.json`, ESLint & PostCSS configs.
- `src/app/`: App Router layout (`layout.tsx`), global CSS, entry point (`page.tsx`), dynamic route under `projects/[projectId]`.
- `src/components/`: feature sections (hero, about-me, projects, etc.), theme provider, and atomic UI primitives (`ui/`).
- `src/data/`: navigation and project metadata as TypeScript modules.
- `src/lib/utils.ts`: shared utilities.

##### README insights
- Bootstrapped with `create-next-app`, deployed on Vercel.
- Uses `next/font` to optimize the Geist font.
- No external database or API—data is loaded from local modules at build time or on server fetch.

##### Main components & relationships
a. Client / Browser
b. Next.js application (hosted on Vercel)
- Edge / Serverless Functions: handles SSR/SSG routes
- App Router:
- `layout.tsx` (shared layout + theme context)
- `page.tsx` (home)
- `projects/[projectId]/page.tsx` (dynamic project details)
- Components: UI primitives & feature sections
- Static data imports (`src/data/*.ts`)
c. CDN: caches static assets from `public/` and built pages
d. Vercel Platform: CI/CD pipeline, build & deploy

##### Architectural patterns & design principles
- Component-based UI (React Server/Client Components)
- SSG for homepage and dynamic routes at build time, SSR/Fallback for new routes
- Theming via context provider (`theme-provider.tsx`)
- Atomic design for UI primitives (`ui/` folder)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Browser
    subgraph "Client / Browser"
        direction TB
        Client["Browser"]:::browser
    end

    %% CDN
    subgraph "CDN / Static Assets"
        direction TB
        CDN["CDN (public/)"]:::cdn
        Audio["Audio Asset"]:::cdn
        Icons["Icons Directory"]:::cdn
    end

    %% Vercel Edge
    subgraph "Vercel Edge / Serverless"
        direction TB
        Edge["Edge Functions"]:::edge
    end

    %% Next.js App Router
    subgraph "Next.js App Router" 
        direction TB
        Layout["App Router Layout"]:::router
        Home["Home Page (SSG)"]:::router
        ProjectPage["Dynamic Project Page (SSR/SSG)"]:::router
        ThemeProv["Theme Context Provider"]:::router
        Hero["Hero Section"]:::features
        About["About Me Section"]:::features
        ProjectsSec["Projects Section"]:::features
        Featured["Featured Section"]:::features
        Philosophy["Philosophy Section"]:::features
        Resume["Resume Section"]:::features
        TechStack["Tech Stack Section"]:::features
        Contact["Contact Section"]:::features

        Layout -->|wraps| ThemeProv
        ThemeProv --> Home
        ThemeProv --> ProjectPage
        Home --> Hero
        Home --> About
        Home --> ProjectsSec
        Home --> Featured
        Home --> Philosophy
        Home --> Resume
        Home --> TechStack
        Home --> Contact
    end

    %% Data Modules
    subgraph "Data Modules" 
        direction TB
        NavData["Navigation Data Module"]:::data
        ProjectsData["Projects Data Module"]:::data
        Utils["Shared Utilities"]:::data
    end

    %% UI Primitives
    subgraph "UI Primitives Library"
        direction TB
        UI["UI Primitives"]:::ui
        Alert["Alert"]:::ui
        Avatar["Avatar"]:::ui
        Button["Button"]:::ui
        Card["Card"]:::ui
        Footer["Footer"]:::ui
        Header["Header"]:::ui
        Input["Input"]:::ui
        Label["Label"]:::ui
        Textarea["Textarea"]:::ui
        ThemeToggle["Theme Toggle"]:::ui
        Tooltip["Tooltip"]:::ui
        UI --> Alert
        UI --> Avatar
        UI --> Button
        UI --> Card
        UI --> Footer
        UI --> Header
        UI --> Input
        UI --> Label
        UI --> Textarea
        UI --> ThemeToggle
        UI --> Tooltip
    end

    %% Configs & Build Pipeline
    subgraph "Configuration & Build"
        direction TB
        GitRepo["Git Repository"]:::pipeline
        VercelCI["Vercel CI/CD"]:::pipeline
        Deployed["Deployed App"]:::pipeline
        NextConfig["next.config.ts"]:::config
        TailwindConfig["tailwind.config.js"]:::config
        TSConfig["tsconfig.json"]:::config
        ESLintConfig["eslint.config.mjs"]:::config
        PostCSS["postcss.config.mjs"]:::config
        GlobalsCSS["Global Styles"]:::config

        GitRepo -->|push| VercelCI
        VercelCI -->|build & deploy| Deployed
        Deployed --> Edge
        VercelCI -->|build| NextConfig
        VercelCI --> TailwindConfig
        VercelCI --> TSConfig
        VercelCI --> ESLintConfig
        VercelCI --> PostCSS
        Deployed --> GlobalsCSS
    end

    %% Caches & Flows
    Client -->|HTTP GET| CDN
    CDN -->|cache hit/miss| Edge
    Edge -->|invoke SSR/SSG| Layout
    Layout -->|import| NavData
    Home -->|import| NavData
    Home -->|import| ProjectsData
    ProjectPage -->|fetch| ProjectsData
    Layout -->|uses| GlobalsCSS
    AllComponents[All Components]:::router
    Layout --> UI

    %% Click Events
    click Layout "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/app/layout.tsx"
    click Home "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/app/page.tsx"
    click GlobalsCSS "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/app/globals.css"
    click ProjectPage "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/app/projects/[projectId]/page.tsx"
    click ThemeProv "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/theme-provider.tsx"
    click Hero "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/hero-section.tsx"
    click About "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/about-me-section.tsx"
    click ProjectsSec "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/projects-section.tsx"
    click Featured "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/featured-section.tsx"
    click Philosophy "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/philosophy-section.tsx"
    click Resume "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/resume-section.tsx"
    click TechStack "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/tech-stack-section.tsx"
    click Contact "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/contact-section.tsx"
    click UI "https://github.com/javiergoodall99/javiergoodall-portfolio/tree/main/src/components/ui/"
    click Alert "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/alert.tsx"
    click Avatar "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/avatar.tsx"
    click Button "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/button.tsx"
    click Card "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/card.tsx"
    click Footer "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/footer.tsx"
    click Header "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/header.tsx"
    click Input "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/input.tsx"
    click Label "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/label.tsx"
    click Textarea "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/textarea.tsx"
    click ThemeToggle "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/theme-toggle.tsx"
    click Tooltip "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/components/ui/tooltip.tsx"
    click NavData "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/data/navigation.ts"
    click ProjectsData "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/data/projects.ts"
    click Utils "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/src/lib/utils.ts"
    click NextConfig "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/next.config.ts"
    click TailwindConfig "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/tailwind.config.js"
    click TSConfig "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/tsconfig.json"
    click ESLintConfig "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/eslint.config.mjs"
    click PostCSS "https://github.com/javiergoodall99/javiergoodall-portfolio/blob/main/postcss.config.mjs"

    %% Styles
    classDef browser fill:#ccffcc,stroke:#333,stroke-width:1px
    classDef cdn fill:#ffcc99,stroke:#333,stroke-width:1px
    classDef edge fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef router fill:#e6ccff,stroke:#333,stroke-width:1px
    classDef features fill:#e0ccff,stroke:#333,stroke-width:1px
    classDef data fill:#dddddd,stroke:#333,stroke-width:1px
    classDef ui fill:#d9ccff,stroke:#333,stroke-width:1px
    classDef pipeline fill:#ffe0cc,stroke:#333,stroke-width:1px
    classDef config fill:#f2f2f2,stroke:#333,stroke-width:1px
```
