# igoraugust0/portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a single‐page personal portfolio website built with Next.js and React.
- It’s essentially a front-end application with a small “back-end” footprint in the form of serverless/email API calls (Resend), and is deployed on Vercel with PWA support.

##### File structure
- Top‐level directories:
- **app/** contains Next.js 13+ “app router” components (layout.tsx, page.tsx, globals.css).
- **components/** holds reusable UI blocks (intro, about, projects, contact, etc.).
- **context/** provides React Context providers (theme, active section).
- **lib/** contains utilities, hooks, types, server actions (email submit), and static data.
- Config/build files: next.config.mjs, postcss.config.mjs, tailwind.config.ts, tsconfig.json.
- Deployment: project uses Vercel (vercel button in README) and next-pwa for service worker/caching.

##### README for additional insights
- Confirms tech stack: Next.js, React, Tailwind CSS, Framer Motion for animation.
- Uses Resend + React Email + Zod for form submission/email handling.
- Emphasizes client-side interactivity (animations, theme switch) and static generation/SSR.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    subgraph "Client Layer"
        direction TB
        UI["React UI Components"]:::ui
        Router["Next.js App Router"]:::ui
        SW["Service Worker"]:::ui
        Context["Context Providers"]:::ui
    end

    %% Serverless/API Layer
    subgraph "Serverless/API Layer"
        direction TB
        API["Next.js Serverless API (/api/contact)"]:::server
        Actions["Contact Form Actions"]:::server
    end

    %% External Services
    subgraph "External Services"
        direction TB
        Resend["Resend Email API"]:::external
    end

    %% Build & Deploy Pipeline
    subgraph "Build & Deploy Pipeline"
        direction TB
        GitHub["GitHub Repo"]:::pipeline
        VercelCI["Vercel CI/CD"]:::pipeline
        CDN["Vercel CDN/Edge"]:::pipeline
    end

    %% Connections
    Router -->|renders pages| UI
    UI -->|uses context| Context
    UI -->|registers| SW
    UI -->|submits form via HTTPS| API
    API -->|invokes| Actions
    Actions -->|validates via Zod & JSON| Resend
    GitHub -.->|push triggers| VercelCI
    VercelCI -.->|build & deploy| CDN
    CDN -->|serves assets| UI
    CDN -->|serves SSR/SSG routes| Router

    %% Click Events
    click Router "https://github.com/igoraugust0/portfolio/blob/main/app/layout.tsx"
    click UI "https://github.com/igoraugust0/portfolio/blob/main/components/intro/intro.tsx"
    click Context "https://github.com/igoraugust0/portfolio/blob/main/context/theme-context.tsx"
    click Actions "https://github.com/igoraugust0/portfolio/blob/main/lib/actions.ts"
    click SW "https://github.com/igoraugust0/portfolio/blob/main/next.config.mjs"

    %% Styles
    classDef ui fill:#e0f7fa,stroke:#0288d1
    classDef server fill:#e8f5e9,stroke:#2e7d32
    classDef external fill:#fff3e0,stroke:#ef6c00
    classDef pipeline fill:#eceff1,stroke:#546e7a
```
