# arielayala/portfolio-nextjs architecture

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

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

## Overview

##### Main Components
- Application Shell: At the heart of the Next.js app where the layout is defined (see src/app/layout.tsx). This is the container for the various sections.
- Page Component: The main page (src/app/page.tsx) that incorporates various sub-components.
- UI Sub-components: Individual React components found under src/app/components, such as:
- HeroSection
- AboutSection
- AchievementsSection
- ProjectsSection (and its helper components like ProjectCard and ProjectTag)
- ContactSection
- Navigation components (Navbar, MenuOverlay, NavLink, TabButton, Footer)
- Static Assets: The public content (e.g., images and other assets in public/images) for rendering projects and other visuals.
- Style and Configuration: Global styles (src/app/globals.css), Tailwind’s configuration (tailwind.config.ts), and PostCSS configuration. Also include Next.js configuration (next.config.mjs), ESLint, and TSConfig settings.

##### Relationships and Interactions
- The layout (layout.tsx) wraps the main page (page.tsx) and consistently applies global styling.
- The main page aggregates the different section components, each responsible for distinct areas of the portfolio.
- Navigation components (like Navbar and MenuOverlay) facilitate movement between these sections, potentially using smooth scrolling or dynamic routing provided by Next.js.
- The ProjectsSection interacts with ProjectCard and ProjectTag components to render detailed project previews.
- Animations are integrated in multiple components using Framer Motion and other related libraries.
- External integrations include Email.js which is likely triggered within the ContactSection to send emails from a contact form.

##### Architectural Patterns and Technologies
- Component-Based Architecture: The project clearly follows a modular, component-driven design using React components.
- Server-Side Rendering / Static Generation: Leveraging Next.js features to pre-render pages or load them dynamically.
- Styling via Tailwind CSS and PostCSS: The project uses Tailwind for responsive design, with its configurations central to the styling strategy.
- Integration of External Services: Email.js for handling email functionality, and use of other libraries (React Animated Numbers, React Type Animation) that enhance interactivity.
- Versioning/Quality Tools: ESLint and TypeScript ensure code quality and maintainability.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Application Core
    APP("Next.js App (Portfolio)"):::container

    subgraph "Application Shell"
        LAYOUT("Layout (src/app/layout.tsx)"):::container
        PAGE("Page (src/app/page.tsx)"):::container
    end

    APP --> LAYOUT
    LAYOUT --> PAGE

    %% UI Components
    subgraph "UI Components"
        HERO("Hero Section (src/app/components/HeroSection.tsx)"):::ui
        ABOUT("About Section (src/app/components/AboutSection.tsx)"):::ui
        ACHIEVE("Achievements Section (src/app/components/AchievementsSection.tsx)"):::ui
        PROJECTS("Projects Section (src/app/components/ProjectsSection.tsx)"):::ui
        CONTACT("Contact Section (src/app/components/ContactSection.tsx)"):::ui

        NAVBAR("Navbar (src/app/components/Navbar.tsx)"):::ui
        MENU("Menu Overlay (src/app/components/MenuOverlay.tsx)"):::ui
        NAVLINK("NavLink (src/app/components/NavLink.tsx)"):::ui
        TAB("Tab Button (src/app/components/TabButton.tsx)"):::ui
        FOOTER("Footer (src/app/components/Footer.tsx)"):::ui

        PCARD("Project Card (src/app/components/ProjectCard.tsx)"):::ui
        PTAG("Project Tag (src/app/components/ProjectTag.tsx)"):::ui
    end

    %% External Libraries & Services
    subgraph "External Integrations"
        FM("Framer Motion"):::external
        EMAILJS("Email.js"):::external
    end

    %% Global Styling and Configurations
    subgraph "Global Config & Styling"
        GLOBAL("Global Styling (src/app/globals.css)"):::config
        TAILWIND("Tailwind CSS Config (tailwind.config.ts)"):::config
        POSTCSS("PostCSS Config (postcss.config.js)"):::config
        NEXTCONFIG("Next.js Config (next.config.mjs)"):::config
        ESLINT("ESLint Config (.eslintrc.json)"):::config
        TSCONFIG("TypeScript Config (tsconfig.json)"):::config
    end

    %% Static Assets
    ASSETS("Static Assets (public/images)"):::asset

    %% Relationships from PAGE to UI Components
    PAGE --> HERO
    PAGE --> ABOUT
    PAGE --> ACHIEVE
    PAGE --> PROJECTS
    PAGE --> CONTACT
    PAGE --> NAVBAR
    PAGE --> FOOTER

    %% Navigation internal relationships
    NAVBAR --> MENU
    NAVBAR --> NAVLINK
    NAVBAR --> TAB

    %% Projects Components relationship
    PROJECTS --> PCARD
    PCARD --> PTAG

    %% External Integrations connections
    CONTACT -->|"uses"| EMAILJS
    HERO ---|"animates with"| FM
    ABOUT --- FM
    ACHIEVE --- FM
    PROJECTS --- FM
    CONTACT --- FM

    %% Static Assets usage
    ASSETS ---|"provides media"| HERO
    ASSETS --- PROJECTS

    %% Configuration influences
    GLOBAL --- LAYOUT
    GLOBAL --- PAGE
    TAILWIND --- GLOBAL
    POSTCSS --- GLOBAL
    NEXTCONFIG --- LAYOUT
    ESLINT --- PAGE
    TSCONFIG --- PAGE

    %% Classes
    classDef container fill:#ADD8E6,stroke:#00008B,stroke-width:2px;
    classDef ui fill:#90EE90,stroke:#006400,stroke-width:2px;
    classDef config fill:#FFFFE0,stroke:#DAA520,stroke-width:2px;
    classDef external fill:#F08080,stroke:#8B0000,stroke-width:2px;
    classDef asset fill:#D3D3D3,stroke:#696969,stroke-width:2px;

    %% Click Events
    click LAYOUT "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/layout.tsx"
    click PAGE "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/page.tsx"
    click HERO "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/HeroSection.tsx"
    click ABOUT "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/AboutSection.tsx"
    click ACHIEVE "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/AchievementsSection.tsx"
    click PROJECTS "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/ProjectsSection.tsx"
    click PCARD "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/ProjectCard.tsx"
    click PTAG "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/ProjectTag.tsx"
    click CONTACT "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/ContactSection.tsx"
    click NAVBAR "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/Navbar.tsx"
    click MENU "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/MenuOverlay.tsx"
    click NAVLINK "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/NavLink.tsx"
    click TAB "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/TabButton.tsx"
    click FOOTER "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/components/Footer.tsx"
    click ASSETS "https://github.com/arielayala/portfolio-nextjs/tree/main/public/images"
    click GLOBAL "https://github.com/arielayala/portfolio-nextjs/blob/main/src/app/globals.css"
    click TAILWIND "https://github.com/arielayala/portfolio-nextjs/blob/main/tailwind.config.ts"
    click POSTCSS "https://github.com/arielayala/portfolio-nextjs/blob/main/postcss.config.js"
    click NEXTCONFIG "https://github.com/arielayala/portfolio-nextjs/blob/main/next.config.mjs"
    click ESLINT "https://github.com/arielayala/portfolio-nextjs/blob/main/.eslintrc.json"
    click TSCONFIG "https://github.com/arielayala/portfolio-nextjs/blob/main/tsconfig.json"
```
