# luanrebuli/luan-portfolio architecture

> Architecture diagram of the GitHub repository luanrebuli/luan-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/luanrebuli/luan-portfolio
- Repository: https://github.com/luanrebuli/luan-portfolio

## Overview

##### Project type and purpose
- This is a single-page application (SPA) portfolio website built in React/TypeScript.
- Its sole purpose is to present Luan Rebuli’s profile, skills, projects and a contact form.
- It is deployed as static assets on Vercel and integrates a third-party EmailJS service for form submissions.

##### Key parts of the file structure
- Top-level config: vite.config.js, package.json, .eslintrc.cjs
- public/index.html + locales (en.json, pt.json)
- src/
- assets – images & media
- components – reusable UI pieces (IntroductionPage, Profile, Projects, Skills, ThemeButton, LanguageSelection)
- containers – larger composition units (OfflinePC, OnlinePC)
- routes – React router entrypoints
- styles – global and styled-component definitions
- i18nify.js – internationalization setup
- main.jsx – React DOM bootstrap / Vite entry

##### Insights from README
- Built on ReactJS + Vite + TypeScript, styled with TailwindCSS & Shadcn UI
- Hosted on Vercel, contact form powered by EmailJS
- Performance, responsiveness, theme switching, i18n

a. Client Browser
- Loads index.html from Vercel CDN
- Executes bundled React application (main.jsx → App → routes → components/containers)
b. Hosting & CDN
- Vercel deployment of static assets (JS, CSS, images, locales)
- Edge caching for fast global delivery
c. React Application
- Route manager (src/routes/index.jsx)
- UI components grouped under “components” and “containers”
- Global styles & theme toggle
- Internationalization service (i18nify.js + JSON locale files)
d. Third-party services
- EmailJS API endpoint for contact form submissions
- External links to GitHub/project deployments

##### Architectural patterns and design principles
- Component-based UI (atomic/reusable components)
- SPA routing (client-side)
- Separation of concerns:
- UI components vs. containers vs. routing
- Static assets vs. build config vs. localization
- Third-party integration kept modular (EmailJS)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Infrastructure Layer
    subgraph "Infrastructure" 
        direction TB
        VERCEL["Vercel CDN"]:::infra
        PUBLIC["public/"]:::infra
        VITE["vite.config.js"]:::config
        PACKAGE["package.json"]:::config
        ESLINT[".eslintrc.cjs"]:::config
        HTML["index.html"]:::config
        LOCALES["locales"]:::config
        ENLOCALE["en.json"]:::config
        PTLOCALE["pt.json"]:::config
        VERCEL -->|serves| PUBLIC
        PUBLIC --> HTML
        PUBLIC --> LOCALES
        LOCALES --> ENLOCALE
        LOCALES --> PTLOCALE
        PUBLIC -.-> VITE
        PUBLIC -.-> PACKAGE
        PUBLIC -.-> ESLINT
    end

    %% Client Application Layer
    subgraph "Client Application (Browser)" 
        direction TB
        BROWSER["Client Browser"]:::external
        MAIN["main.jsx"]:::config
        I18N["i18nify.js"]:::frontend
        ROUTER["src/routes/index.jsx"]:::frontend
        subgraph "UI Components"
            direction TB
            INTRO["IntroductionPage Component"]:::frontend
            LANGSEL["LanguageSelection Component"]:::frontend
            PROFILE["Profile Component"]:::frontend
            PROJECTS["Projects Component"]:::frontend
            SKILLS["Skills Component"]:::frontend
            THEMEBTN["ThemeButton Component"]:::frontend
        end
        subgraph "Container Components"
            direction TB
            OFFLINE["OfflinePC Container"]:::frontend
            ONLINE["OnlinePC Container"]:::frontend
        end
        ASSETS["src/assets"]:::frontend
        STYLES["src/styles"]:::frontend

        BROWSER -->|loads| HTML
        BROWSER -->|executes| MAIN
        MAIN --> ROUTER
        MAIN --> I18N
        MAIN --> STYLES
        MAIN --> ASSETS
        ROUTER --> INTRO
        ROUTER --> PROFILE
        ROUTER --> PROJECTS
        ROUTER --> SKILLS
        ROUTER --> OFFLINE
        ROUTER --> ONLINE
        INTRO --> LANGSEL
        INTRO --> THEMEBTN
    end

    %% External Services Layer
    subgraph "External Services"
        direction TB
        EMAILJS["EmailJS API"]:::infra
        GITHUB["GitHub / Live Site"]:::infra
        INTRO -->|submits form| EMAILJS
        PROFILE -->|submits form| EMAILJS
        PROJECTS -->|navigates to| GITHUB
    end

    %% Asset Delivery Arrows
    VERCEL -->|HTTP GET static assets| BROWSER

    %% Click Events
    click VITE "https://github.com/luanrebuli/luan-portfolio/blob/main/vite.config.js"
    click PACKAGE "https://github.com/luanrebuli/luan-portfolio/blob/main/package.json"
    click ESLINT "https://github.com/luanrebuli/luan-portfolio/blob/main/.eslintrc.cjs"
    click HTML "https://github.com/luanrebuli/luan-portfolio/blob/main/public/index.html"
    click ENLOCALE "https://github.com/luanrebuli/luan-portfolio/blob/main/public/locales/en.json"
    click PTLOCALE "https://github.com/luanrebuli/luan-portfolio/blob/main/public/locales/pt.json"
    click ASSETS "https://github.com/luanrebuli/luan-portfolio/tree/main/src/assets"
    click MAIN "https://github.com/luanrebuli/luan-portfolio/blob/main/src/main.jsx"
    click I18N "https://github.com/luanrebuli/luan-portfolio/blob/main/src/i18nify.js"
    click ROUTER "https://github.com/luanrebuli/luan-portfolio/blob/main/src/routes/index.jsx"
    click INTRO "https://github.com/luanrebuli/luan-portfolio/blob/main/src/components/IntroductionPage/index.jsx"
    click LANGSEL "https://github.com/luanrebuli/luan-portfolio/blob/main/src/components/LanguageSelection/index.jsx"
    click PROFILE "https://github.com/luanrebuli/luan-portfolio/blob/main/src/components/Profile/index.jsx"
    click PROJECTS "https://github.com/luanrebuli/luan-portfolio/blob/main/src/components/Projects/index.jsx"
    click SKILLS "https://github.com/luanrebuli/luan-portfolio/blob/main/src/components/Skills/index.jsx"
    click THEMEBTN "https://github.com/luanrebuli/luan-portfolio/blob/main/src/components/ThemeButton/index.jsx"
    click OFFLINE "https://github.com/luanrebuli/luan-portfolio/blob/main/src/containers/OfflinePC/index.jsx"
    click ONLINE "https://github.com/luanrebuli/luan-portfolio/blob/main/src/containers/OnlinePC/index.jsx"
    click STYLES "https://github.com/luanrebuli/luan-portfolio/blob/main/src/styles/globalStyles.js"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#0366d6,color:#0366d6
    classDef infra fill:#d4edda,stroke:#28a745,color:#28a745
    classDef config fill:#e2e3e5,stroke:#6c757d,color:#6c757d
    classDef external fill:#f8d7da,stroke:#d73a49,color:#d73a49
```
