# pauaua/portafolio architecture

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

- Interactive diagram: https://gitdiagram.com/pauaua/portafolio
- Repository: https://github.com/pauaua/portafolio

## Overview

1. **Repository shape**
   - This is a **Next.js App Router** portfolio site, not a multi-service application.
   - The architecture is mostly **static content + client-side interaction**, with one small **server-side contact endpoint**.

2. **Application boundary**
   - The main user-facing routes are:
     - `app/page.tsx` for the landing page
     - `app/contact/page.tsx` for the contact page
     - `app/api/contact/route.ts` for form submission handling
   - `app/layout.tsx` wraps the whole site with shared shell concerns like global styles and persistent UI.

3. **Content/data layer**
   - `lib/data.ts` appears to be the **single source of truth** for portfolio content: projects, experience, education, skills, and other structured sections.
   - This keeps the page composition thin and makes the sections render from centralized data rather than hardcoding content in multiple places.

4. **Internationalization layer**
   - `lib/translations.ts` plus `components/ui/LanguageProvider.tsx` implement **ES / EN / FR language switching**.
   - Language-dependent copy is likely consumed by the section components and UI chrome without a full page reload.
   - `components/ui/LanguageBanner.tsx` is part of that user-facing language selection experience.

5. **Page composition**
   - The landing page is built from reusable section components in `components/sections/`:
     - `Hero`, `About`, `Skills`, `Projects`, `Experience`, `Education`, `HowIWork`, `ContactCTA`, `ContactForm`
   - This indicates a **section-based single-page portfolio** rather than a deeply nested app.

6. **Shell and navigation**
   - `components/layout/Navbar.tsx` and `components/layout/Footer.tsx` provide the persistent site chrome.
   - `components/ui/SideNav.tsx` adds desktop-oriented section navigation, which suggests the landing page is long-form and anchored by sections.

7. **Interactive portfolio features**
   - `components/ui/ProjectModal.tsx` is the main interaction for project details, likely opening richer project metadata from `lib/data.ts`.
   - `components/ui/EasterEgg.tsx` adds the “hire me” hidden interaction mentioned in the README.
   - `components/ui/CustomCursor.tsx` and `components/ui/BackgroundSparkles.tsx` are decorative motion layers that sit above the content, not part of the data model.

8. **Theme and presentation**
   - `components/ui/ThemeToggle.tsx` indicates a **dark/light mode** system with persisted preference.
   - `app/globals.css` and `components/ui/button.tsx` suggest Tailwind-driven styling with shared primitives.
   - The visual system is enhanced with **Framer Motion** for animated transitions and hover/scroll interactions.

9. **Contact submission flow**
   - The contact form in `components/sections/ContactForm.tsx` is the user entry point.
   - Submission goes to `app/api/contact/route.ts`, which acts as the backend boundary.
   - The README states this route uses **Resend** to deliver email, so the app has a real external integration rather than a mock form.

10. **Static assets and SEO**
   - `public/CVREALPAPCV.pdf` is a downloadable static asset.
   - The README mentions a custom favicon/icon and SEO-oriented metadata, which fits Next.js App Router conventions.
   - This repo is optimized as a **personal brand / recruitment portfolio**, so discoverability and polished presentation are first-class concerns.

11. **Runtime boundaries**
   - Most components are likely **client components** where interaction is needed: theme, language switching, cursor, modals, form, and Easter egg.
   - Pure content sections can stay mostly presentational, while the API route is the only clearly server-executed part.

12. **Deployment shape**
   - The architecture is designed for **Vercel deployment**, with no separate backend or database layer visible in the tree.
   - That means the system is essentially: **Next.js frontend + serverless contact endpoint + external email service**.

Main entry points: [`app/page.tsx`](https://github.com/pauaua/portafolio/blob/master/app/page.tsx) (Home page), [`app/layout.tsx`](https://github.com/pauaua/portafolio/blob/master/app/layout.tsx) (Root layout), [`lib/data.ts`](https://github.com/pauaua/portafolio/blob/master/lib/data.ts) (Portfolio data), [`lib/translations.ts`](https://github.com/pauaua/portafolio/blob/master/lib/translations.ts) (Translations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_app["App Router"]
  node_app_layout["Root layout<br/>shell<br/>[layout.tsx]"]
  node_app_home["Home page<br/>route<br/>[page.tsx]"]
  node_app_contact["Contact page<br/>route<br/>[page.tsx]"]
  node_app_contact_api["Contact API<br/>serverless route<br/>[route.ts]"]
  node_globals_css["Global styles<br/>[globals.css]"]
end

subgraph group_group_sections["Page Sections"]
  node_hero["Hero<br/>section<br/>[Hero.tsx]"]
  node_about["About<br/>section<br/>[About.tsx]"]
  node_skills["Skills<br/>section<br/>[Skills.tsx]"]
  node_projects["Projects<br/>section<br/>[Projects.tsx]"]
  node_experience["Experience<br/>section<br/>[Experience.tsx]"]
  node_education["Education<br/>section<br/>[Education.tsx]"]
  node_how_i_work["How I work<br/>section<br/>[HowIWork.tsx]"]
  node_contact_cta["Contact CTA<br/>section<br/>[ContactCTA.tsx]"]
  node_contact_form["Contact form<br/>section<br/>[ContactForm.tsx]"]
end

subgraph group_group_ui["UI Layer"]
  node_navbar["Navbar<br/>chrome<br/>[Navbar.tsx]"]
  node_footer["Footer<br/>chrome<br/>[Footer.tsx]"]
  node_theme_toggle(("Theme toggle<br/>client control<br/>[ThemeToggle.tsx]"))
  node_language_provider(("Language provider<br/>client state"))
  node_project_modal["Project modal<br/>interaction<br/>[ProjectModal.tsx]"]
  node_side_nav["Side nav<br/>navigation<br/>[SideNav.tsx]"]
  node_language_banner["Language banner<br/>ui hint<br/>[LanguageBanner.tsx]"]
  node_easter_egg(("Easter egg<br/>interaction<br/>[EasterEgg.tsx]"))
  node_custom_cursor(("Custom cursor<br/>motion layer<br/>[CustomCursor.tsx]"))
  node_sparkles(("Sparkles<br/>motion layer"))
  node_social_icons["Social icons<br/>links<br/>[SocialIcons.tsx]"]
  node_button["Button<br/>primitive<br/>[button.tsx]"]
end

subgraph group_group_data["Content Layer"]
  node_data[("Portfolio data<br/>content store<br/>[data.ts]")]
  node_translations[("Translations<br/>copy store<br/>[translations.ts]")]
end

subgraph group_group_static["Static Assets"]
  node_cv_pdf["CV PDF<br/>asset<br/>[CVREALPAPCV.pdf]"]
end

node_app_layout -->|"loads"| node_globals_css
node_app_layout -->|"wraps"| node_language_provider
node_app_layout -->|"includes"| node_navbar
node_app_layout -->|"includes"| node_footer
node_app_layout -->|"exposes"| node_theme_toggle
node_app_layout -->|"enables"| node_custom_cursor
node_app_layout -->|"enables"| node_sparkles
node_app_layout -->|"surfaces"| node_language_banner
node_app_home -->|"assembles"| node_hero
node_app_home -->|"assembles"| node_about
node_app_home -->|"assembles"| node_skills
node_app_home -->|"assembles"| node_projects
node_app_home -->|"assembles"| node_experience
node_app_home -->|"assembles"| node_education
node_app_home -->|"assembles"| node_how_i_work
node_app_home -->|"assembles"| node_contact_cta
node_app_home -->|"uses"| node_social_icons
node_app_home -->|"uses"| node_side_nav
node_app_contact -->|"contains"| node_contact_form
node_contact_cta -->|"routes to"| node_contact_form
node_contact_form -->|"submits to"| node_app_contact_api
node_app_contact_api -.->|"uses"| node_data
node_hero -->|"reads"| node_data
node_about -->|"reads"| node_data
node_skills -->|"reads"| node_data
node_projects -->|"reads"| node_data
node_experience -->|"reads"| node_data
node_education -->|"reads"| node_data
node_how_i_work -->|"reads"| node_data
node_projects -->|"opens"| node_project_modal
node_language_provider -->|"provides"| node_translations
node_language_banner -->|"reads"| node_translations
node_navbar -->|"reads"| node_translations
node_footer -->|"reads"| node_translations
node_side_nav -->|"reads"| node_translations
node_contact_form -->|"reads"| node_translations
node_theme_toggle -.->|"affects"| node_globals_css
node_button -->|"used by"| node_contact_form
node_button -->|"used by"| node_contact_cta
node_cv_pdf -.->|"linked from"| node_footer

click node_app_layout "https://github.com/pauaua/portafolio/blob/master/app/layout.tsx"
click node_app_home "https://github.com/pauaua/portafolio/blob/master/app/page.tsx"
click node_app_contact "https://github.com/pauaua/portafolio/blob/master/app/contact/page.tsx"
click node_app_contact_api "https://github.com/pauaua/portafolio/blob/master/app/api/contact/route.ts"
click node_hero "https://github.com/pauaua/portafolio/blob/master/components/sections/Hero.tsx"
click node_about "https://github.com/pauaua/portafolio/blob/master/components/sections/About.tsx"
click node_skills "https://github.com/pauaua/portafolio/blob/master/components/sections/Skills.tsx"
click node_projects "https://github.com/pauaua/portafolio/blob/master/components/sections/Projects.tsx"
click node_experience "https://github.com/pauaua/portafolio/blob/master/components/sections/Experience.tsx"
click node_education "https://github.com/pauaua/portafolio/blob/master/components/sections/Education.tsx"
click node_how_i_work "https://github.com/pauaua/portafolio/blob/master/components/sections/HowIWork.tsx"
click node_contact_cta "https://github.com/pauaua/portafolio/blob/master/components/sections/ContactCTA.tsx"
click node_contact_form "https://github.com/pauaua/portafolio/blob/master/components/sections/ContactForm.tsx"
click node_navbar "https://github.com/pauaua/portafolio/blob/master/components/layout/Navbar.tsx"
click node_footer "https://github.com/pauaua/portafolio/blob/master/components/layout/Footer.tsx"
click node_theme_toggle "https://github.com/pauaua/portafolio/blob/master/components/ui/ThemeToggle.tsx"
click node_language_provider "https://github.com/pauaua/portafolio/blob/master/components/ui/LanguageProvider.tsx"
click node_project_modal "https://github.com/pauaua/portafolio/blob/master/components/ui/ProjectModal.tsx"
click node_side_nav "https://github.com/pauaua/portafolio/blob/master/components/ui/SideNav.tsx"
click node_language_banner "https://github.com/pauaua/portafolio/blob/master/components/ui/LanguageBanner.tsx"
click node_easter_egg "https://github.com/pauaua/portafolio/blob/master/components/ui/EasterEgg.tsx"
click node_custom_cursor "https://github.com/pauaua/portafolio/blob/master/components/ui/CustomCursor.tsx"
click node_sparkles "https://github.com/pauaua/portafolio/blob/master/components/ui/BackgroundSparkles.tsx"
click node_social_icons "https://github.com/pauaua/portafolio/blob/master/components/ui/SocialIcons.tsx"
click node_button "https://github.com/pauaua/portafolio/blob/master/components/ui/button.tsx"
click node_data "https://github.com/pauaua/portafolio/blob/master/lib/data.ts"
click node_translations "https://github.com/pauaua/portafolio/blob/master/lib/translations.ts"
click node_globals_css "https://github.com/pauaua/portafolio/blob/master/app/globals.css"
click node_cv_pdf "https://github.com/pauaua/portafolio/blob/master/public/CVREALPAPCV.pdf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app_layout,node_app_home,node_app_contact,node_app_contact_api,node_globals_css toneBlue
class node_hero,node_about,node_skills,node_projects,node_experience,node_education,node_how_i_work,node_contact_cta,node_contact_form toneAmber
class node_navbar,node_footer,node_theme_toggle,node_language_provider,node_project_modal,node_side_nav,node_language_banner,node_easter_egg,node_custom_cursor,node_sparkles,node_social_icons,node_button toneMint
class node_data,node_translations toneRose
class node_cv_pdf toneIndigo
```

## Components

### App Router

Route handlers and shared application shell

- [Root layout](https://github.com/pauaua/portafolio/blob/master/app/layout.tsx): shell · Wraps the site with global styles and persistent providers/chrome · `app/layout.tsx`
- [Home page](https://github.com/pauaua/portafolio/blob/master/app/page.tsx): route · Main landing page that assembles the portfolio experience · `app/page.tsx`
- [Contact page](https://github.com/pauaua/portafolio/blob/master/app/contact/page.tsx): route · Dedicated contact route separate from the landing page · `app/contact/page.tsx`
- [Contact API](https://github.com/pauaua/portafolio/blob/master/app/api/contact/route.ts): serverless route · Backend boundary for contact form submissions and email delivery · `app/api/contact/route.ts`
- [Global styles](https://github.com/pauaua/portafolio/blob/master/app/globals.css): styles · Site-wide styling foundation · `app/globals.css`

### Page Sections

Landing page content blocks

- [Hero](https://github.com/pauaua/portafolio/blob/master/components/sections/Hero.tsx): section · Top-of-page introduction and primary branding · `components/sections/Hero.tsx`
- [About](https://github.com/pauaua/portafolio/blob/master/components/sections/About.tsx): section · Personal background and summary content · `components/sections/About.tsx`
- [Skills](https://github.com/pauaua/portafolio/blob/master/components/sections/Skills.tsx): section · Capability overview rendered from structured data · `components/sections/Skills.tsx`
- [Projects](https://github.com/pauaua/portafolio/blob/master/components/sections/Projects.tsx): section · Project showcase with richer item metadata · `components/sections/Projects.tsx`
- [Experience](https://github.com/pauaua/portafolio/blob/master/components/sections/Experience.tsx): section · Career history and roles timeline · `components/sections/Experience.tsx`
- [Education](https://github.com/pauaua/portafolio/blob/master/components/sections/Education.tsx): section · Academic background section · `components/sections/Education.tsx`
- [How I work](https://github.com/pauaua/portafolio/blob/master/components/sections/HowIWork.tsx): section · Process and working-style narrative · `components/sections/HowIWork.tsx`
- [Contact CTA](https://github.com/pauaua/portafolio/blob/master/components/sections/ContactCTA.tsx): section · Call-to-action block leading users toward the contact flow · `components/sections/ContactCTA.tsx`
- [Contact form](https://github.com/pauaua/portafolio/blob/master/components/sections/ContactForm.tsx): section · User-facing form that submits to the contact API · `components/sections/ContactForm.tsx`

### UI Layer

Interactive chrome, motion, and shared UI components

- [Navbar](https://github.com/pauaua/portafolio/blob/master/components/layout/Navbar.tsx): chrome · Persistent top navigation for the portfolio site · `components/layout/Navbar.tsx`
- [Footer](https://github.com/pauaua/portafolio/blob/master/components/layout/Footer.tsx): chrome · Persistent bottom site chrome and closing links · `components/layout/Footer.tsx`
- [Theme toggle](https://github.com/pauaua/portafolio/blob/master/components/ui/ThemeToggle.tsx): client control · Dark/light mode preference switch · `components/ui/ThemeToggle.tsx`
- [Language provider](https://github.com/pauaua/portafolio/blob/master/components/ui/LanguageProvider.tsx): client state · Shared language state for ES EN FR switching · `components/ui/LanguageProvider.tsx`
- [Project modal](https://github.com/pauaua/portafolio/blob/master/components/ui/ProjectModal.tsx): interaction · Expanded project detail view sourced from portfolio data · `components/ui/ProjectModal.tsx`
- [Side nav](https://github.com/pauaua/portafolio/blob/master/components/ui/SideNav.tsx): navigation · Section navigation for the long-form landing page · `components/ui/SideNav.tsx`
- [Language banner](https://github.com/pauaua/portafolio/blob/master/components/ui/LanguageBanner.tsx): ui hint · Visible language selection and status affordance · `components/ui/LanguageBanner.tsx`
- [Easter egg](https://github.com/pauaua/portafolio/blob/master/components/ui/EasterEgg.tsx): interaction · Hidden playful interaction layer · `components/ui/EasterEgg.tsx`
- [Custom cursor](https://github.com/pauaua/portafolio/blob/master/components/ui/CustomCursor.tsx): motion layer · Decorative pointer treatment layered above content · `components/ui/CustomCursor.tsx`
- [Sparkles](https://github.com/pauaua/portafolio/blob/master/components/ui/BackgroundSparkles.tsx): motion layer · Animated background decoration · `components/ui/BackgroundSparkles.tsx`
- [Social icons](https://github.com/pauaua/portafolio/blob/master/components/ui/SocialIcons.tsx): links · Reusable social link cluster · `components/ui/SocialIcons.tsx`
- [Button](https://github.com/pauaua/portafolio/blob/master/components/ui/button.tsx): primitive · Shared UI primitive used across the portfolio · `components/ui/button.tsx`

### Content Layer

Centralized portfolio data and translations

- [Portfolio data](https://github.com/pauaua/portafolio/blob/master/lib/data.ts): content store · Central source of truth for projects experience education skills and other content · `lib/data.ts`
- [Translations](https://github.com/pauaua/portafolio/blob/master/lib/translations.ts): copy store · Localized copy for the language switcher · `lib/translations.ts`

### Static Assets

Files served directly from public

- [CV PDF](https://github.com/pauaua/portafolio/blob/master/public/CVREALPAPCV.pdf): asset · Downloadable resume document · `public/CVREALPAPCV.pdf`

## Connections

- Root layout → Global styles: loads · Applies global styling to the whole site
- Root layout → Language provider: wraps · Provides shared language state across routes
- Root layout → Navbar: includes · Persistent header chrome
- Root layout → Footer: includes · Persistent footer chrome
- Root layout → Theme toggle: exposes · Theme preference control in the shell
- Root layout → Custom cursor: enables · Global decorative interaction layer
- Root layout → Sparkles: enables · Global background motion layer
- Root layout → Language banner: surfaces · Language selection affordance
- Home page → Hero: assembles · Landing page is built from sections
- Home page → About: assembles · Landing page is built from sections
- Home page → Skills: assembles · Landing page is built from sections
- Home page → Projects: assembles · Landing page is built from sections
- Home page → Experience: assembles · Landing page is built from sections
- Home page → Education: assembles · Landing page is built from sections
- Home page → How I work: assembles · Landing page is built from sections
- Home page → Contact CTA: assembles · Landing page is built from sections
- Home page → Social icons: uses · Shares social link presentation
- Home page → Side nav: uses · Desktop section navigation for the long page
- Contact page → Contact form: contains · Dedicated contact page centers the form flow
- Contact CTA → Contact form: routes to · Call-to-action leads into the contact form
- Contact form → Contact API: submits to · Form posts to the serverless contact endpoint
- Contact API → Portfolio data: uses · May reference portfolio details for message context
- Hero → Portfolio data: reads · Intro content is populated from centralized portfolio data
- About → Portfolio data: reads · About content comes from shared data
- Skills → Portfolio data: reads · Skills section is data-driven
- Projects → Portfolio data: reads · Project cards and metadata come from shared data
- Experience → Portfolio data: reads · Experience timeline is data-driven
- Education → Portfolio data: reads · Education entries come from shared data
- How I work → Portfolio data: reads · Working-style copy is centralized
- Projects → Project modal: opens · Project items expand into a modal detail view
- Language provider → Translations: provides · Supplies localized strings to UI and sections
- Language banner → Translations: reads · Uses localized labels for language selection
- Navbar → Translations: reads · Navigation labels adapt to selected language
- Footer → Translations: reads · Footer copy can be localized
- Side nav → Translations: reads · Section navigation labels adapt to selected language
- Contact form → Translations: reads · Form copy and validation text are localized
- Theme toggle → Global styles: affects · Theme state is expressed through shared styles
- Button → Contact form: used by · Shared primitive used in form and call-to-action UI
- Button → Contact CTA: used by · Shared primitive used in call-to-action UI
- CV PDF → Footer: linked from · Resume download is surfaced from site chrome or sections
