# devomondi/portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a front-end single-page application (SPA) built with React and Vite.

##### File structure
- Top-level files:
– index.html: SPA container
– package.json & lock: npm dependencies & scripts
– Vite, PostCSS, Tailwind, ESLint, .env examples, gitignore
- src/ directory:
– main.jsx: React bootstrapping entry point
– App.jsx: root component
– Components/: UI building blocks (Header, Footer, Projects, Skills, Contact, WhatsAppButton, SuccessToast)
– assets/: static files (resume PDF)
– index.css: global styles
- Config files:
– vite.config.js: build & dev server config
– tailwind.config.js & postcss.config.js: styling pipeline
– .eslintrc.cjs: linting rules

##### README for additional insights
- Purpose: minimal React+Vite template with HMR (hot module replacement)
- Plugins: @vitejs/plugin-react (Babel Fast Refresh) or swc variant

##### Main components & relationships
a. Developer environment
– Vite Dev Server with HMR
– ESLint & Prettier (static analysis)
– Tailwind + PostCSS build pipeline
b. Build step
– Transpile JSX via Babel or SWC plugin
– Bundle modules into a single JS file (or code-split chunks)
– Produce index.html + assets (CSS, JS, PDF)
c. Production hosting
– Static file host / CDN (Netlify, Vercel, GitHub Pages)
– Deliver index.html, JS bundles, CSS, static assets
d. Runtime in User Browser
– Browser loads index.html → main.jsx → App → various Components
– Components render UI sections, read static assets (resume), invoke external links (WhatsApp API, mailto)
– SuccessToast for form feedback

##### Architectural patterns & design principles
- Component-based UI (Atomic design)
- Single responsibility per component (Header, ProjectCard, Contact)
- Unidirectional data flow (props passed top-down in React)
- Build-time separation from runtime (dev/build/host)

##### Technologies, frameworks & libraries
- React & JSX
- Vite (ESM dev server, Rollup-based bundler)
- @vitejs/plugin-react or swc plugin for Fast Refresh
- Tailwind CSS + PostCSS
- ESLint for code quality
- Optional: a static host/CI (Netlify/Vercel)

##### Detailed breakdown
- Code editor
- ESLint
- tailwind.config.js, postcss.config.js
→ points to Vite Dev Server
- Serves index.html & ESM modules
- HMR plugin (Babel/SWC)
- Vite build → Rollup bundling
- Tailwind CSS → PostCSS processing
- Outputs: index.html, bundle.js, style.css, resume.pdf
- Hosts artifacts
- Loads index.html
- Executes bundle.js
- Renders React App
– App.root
- Header
- Projects → ProjectCard
- Skills
- Contact → triggers SuccessToast
- WhatsAppButton (external API link)
- Footer
– Fetches static assets (resume PDF)
- WhatsApp API
- Mail client (via mailto)

## Diagram (Mermaid)

```mermaid
flowchart TB
  %% Developer Environment
  subgraph "Developer Workstation"
    direction TB
    Editor["Code Editor"]
    ESLint["ESLint"]:::devTools
    TailwindConfig["Tailwind Config"]:::devTools
    PostCSSConfig["PostCSS Config"]:::devTools
    EnvExample[".env.example"]:::devTools
    Gitignore[".gitignore"]:::devTools
    Readme["README.md"]:::devTools
  end

  %% Vite Dev Server
  subgraph "Vite Dev Server (HMR)" 
    direction TB
    ViteConfig["vite.config.js"]:::devTools
    PackageJSON["package.json"]:::devTools
    PackageLock["package-lock.json"]:::devTools
    HMR["HMR Plugin\n(Babel/SWC)"]:::devTools
  end

  %% Build Pipeline
  subgraph "Build Pipeline" 
    direction TB
    Rollup["Rollup Bundling"]:::devTools
    PostCSSProc["PostCSS Processing"]:::devTools
    Artifacts["Build Artifacts:\nindex.html, bundle.js, style.css, resume.pdf"]:::assets
  end

  %% Static Host
  subgraph "Static Host / CDN"
    direction TB
    CDN["Static Host / CDN"]:::devTools
  end

  %% User Browser
  subgraph "User Browser"
    direction TB
    LoadHTML["Load index.html"]:::runtime
    ExecJS["Execute bundle.js"]:::runtime
    subgraph "React App" 
      direction TB
      AppRoot["App (src/App.jsx)"]:::runtime
      Header["Header"]:::runtime
      Projects["Projects"]:::runtime
      ProjectCard["ProjectCard"]:::runtime
      Skills["Skills"]:::runtime
      Contact["Contact"]:::runtime
      SuccessToast["SuccessToast"]:::runtime
      WhatsAppButton["WhatsAppButton"]:::runtime
      Footer["Footer"]:::runtime
    end
    FetchPDF["Fetch Resume PDF"]:::assets
  end

  %% External Services
  subgraph "External Services"
    direction TB
    WhatsAppAPI["WhatsApp API"]:::external
    MailClient["Mail Client (mailto)"]:::external
  end

  %% Connections
  Editor --> ViteConfig
  ESLint --> ViteConfig
  TailwindConfig --> ViteConfig
  PostCSSConfig --> ViteConfig
  EnvExample --> ViteConfig
  Gitignore --> ViteConfig
  Readme --> ViteConfig

  ViteConfig --> HMR
  PackageJSON --> ViteConfig
  PackageLock --> ViteConfig

  ViteConfig --> Rollup
  HMR <--> LoadHTML

  Rollup --> Artifacts
  PostCSSProc --> Artifacts
  Artifacts --> CDN

  CDN --> LoadHTML
  LoadHTML --> ExecJS
  ExecJS --> AppRoot

  AppRoot --> Header
  AppRoot --> Projects
  Projects --> ProjectCard
  AppRoot --> Skills
  AppRoot --> Contact
  Contact --> SuccessToast
  AppRoot --> WhatsAppButton
  AppRoot --> Footer

  ExecJS --> FetchPDF
  FetchPDF -.-> Artifacts

  WhatsAppButton --> WhatsAppAPI
  Contact --> MailClient

  %% Click Events
  click ESLint "https://github.com/devomondi/portfolio/blob/main/.eslintrc.cjs"
  click TailwindConfig "https://github.com/devomondi/portfolio/blob/main/tailwind.config.js"
  click PostCSSConfig "https://github.com/devomondi/portfolio/blob/main/postcss.config.js"
  click EnvExample "https://github.com/devomondi/portfolio/blob/main/.env.example"
  click Gitignore "https://github.com/devomondi/portfolio/blob/main/.gitignore"
  click Readme "https://github.com/devomondi/portfolio/blob/main/README.md"
  click ViteConfig "https://github.com/devomondi/portfolio/blob/main/vite.config.js"
  click PackageJSON "https://github.com/devomondi/portfolio/blob/main/package.json"
  click PackageLock "https://github.com/devomondi/portfolio/blob/main/package-lock.json"
  click LoadHTML "https://github.com/devomondi/portfolio/blob/main/index.html"
  click AppRoot "https://github.com/devomondi/portfolio/blob/main/src/App.jsx"
  click Header "https://github.com/devomondi/portfolio/blob/main/src/Components/Header.jsx"
  click Footer "https://github.com/devomondi/portfolio/blob/main/src/Components/Footer.jsx"
  click Projects "https://github.com/devomondi/portfolio/blob/main/src/Components/Projects.jsx"
  click ProjectCard "https://github.com/devomondi/portfolio/blob/main/src/Components/ProjectCard.jsx"
  click Skills "https://github.com/devomondi/portfolio/blob/main/src/Components/Skills.jsx"
  click Contact "https://github.com/devomondi/portfolio/blob/main/src/Components/Contact.jsx"
  click SuccessToast "https://github.com/devomondi/portfolio/blob/main/src/Components/SuccessToast.jsx"
  click WhatsAppButton "https://github.com/devomondi/portfolio/blob/main/src/Components/WhatsAppButton.jsx"
  click LoadHTML "https://github.com/devomondi/portfolio/blob/main/src/main.jsx"
  click ExecJS "https://github.com/devomondi/portfolio/blob/main/src/index.css"
  click FetchPDF "https://github.com/devomondi/portfolio/blob/main/src/assets/Collins_Software_Developer_Resume.pdf"

  %% Styles
  classDef devTools fill:#D0E8FF,stroke:#333,stroke-width:1px
  classDef runtime fill:#DFFFE0,stroke:#333,stroke-width:1px
  classDef assets fill:#FFE8A0,stroke:#333,stroke-width:1px
  classDef external fill:#E0E0E0,stroke:#333,stroke-width:1px
```
