# mldangelo/personal-site architecture

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

- Interactive diagram: https://gitdiagram.com/mldangelo/personal-site
- Repository: https://github.com/mldangelo/personal-site

## Overview

##### Main Components
- Frontend Application: This includes the React application (mainly in the src folder) with various components (Contact, Projects, Resume, Stats, Template, etc.), pages (About, Contact, Index, Projects, Resume, Stats, NotFound), and layouts.
- Data and Content: The folder src/data holds the markdown, JS modules, and configuration used by the application – it drives the display of content for the personal site.
- Static Assets: The public folder (with index.html, images, etc.) and the src/static folder (CSS and SCSS files) which handle the visual styling.
- Build and Deployment Infrastructure: Configuration files like package.json, babel.config.js, GitHub Actions workflows (inside .github/workflows), and Git-related files show the underlying automation and build pipelines.
- Testing and Linting: Files like jest.config.js, .eslintrc.js, and other similar configuration files denote the quality assurance and testing parts of the project.

##### Relationships and Interactions
- The React frontend interacts internally by composing modular components (e.g., navigation, sidebar, resume sections) and uses React Router (configured via src/data/routes.js) to navigate between pages.
- Data flows from the static content (in src/data) into the React components to dynamically generate page content.
- The build process (triggered by npm scripts and defined in package.json) compiles the React JSX/SCSS into static assets.
- GitHub Actions workflows orchestrate builds, tests, and deployments to GitHub Pages. This pipeline should be depicted as an external process feeding into the static hosting environment.

##### Important Architectural Patterns and Design Principles
- Component-Based Architecture: The project follows a modular design by separating concerns into components, pages, and layouts.
- JAMstack Principles: The separation of content and design with static exports and automated deployments.
- Continuous Deployment: Use of GitHub Actions for CI/CD pipelines indicates that every push can trigger tests and a deployment flow.
- Separation of Static Assets and Code: Clear file hierarchy that separates CSS, images, and JavaScript code for maintainability.

##### Relevant Technologies and Frameworks
- React (and create-react-app scaffolding)
- React-Router for client-side routing
- SCSS for styling
- Babel (babel.config.js) for JavaScript transpilation
- GitHub Actions as CI/CD tool for deployment to GitHub Pages
- Node.js (as indicated by package.json and the required node version)

##### Elements
- Data flow from the Data Layer to UI Components.
- Build process starting from the source code, moving through Babel/Webpack (or the create-react-app build process), resulting in static files.
- Deployment flow triggered by GitHub Actions.
- Another for static assets (CSS, images, HTML).
- Distinct symbol for external or automated processes (build pipelines and deployment workflows).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Source Layer
    DataLayer["Data and Content Layer (src/data)"]:::data
    PublicAssets["Public Assets (public)"]:::assets
    Styling["Styling (src/static)"]:::assets
    ReactApp["React Frontend (UI Components & Pages) (src)"]:::frontend

    %% Build & Deployment Infrastructure
    BuildConfig["Build Config (package.json)"]:::build
    BabelConfig["Babel Config (babel.config.js)"]:::build
    CI_CD_Actions["CI/CD (GitHub Actions)"]:::build
    GHPagesWorkflow["Github Pages Workflow (github-pages.yml)"]:::build
    NodeWorkflow["Node.js Workflow (node.js.yml)"]:::build

    %% Build Process Node
    BuildProcess["Build Process (npm scripts, Babel)"]:::build

    %% Testing and Linting Nodes
    JestConfig["Jest Config (jest.config.js)"]:::test
    ESLintConfig["ESLint Config (.eslintrc.js)"]:::test

    %% Deployment Node
    Deployment["GitHub Pages (Hosting)"]:::deploy

    %% Relationships - Source Layer feeding into React Frontend
    DataLayer --> ReactApp
    PublicAssets --> ReactApp
    Styling --> ReactApp

    %% Relationships - Build & Deployment Pipeline
    ReactApp --> BuildProcess
    BuildConfig --> BuildProcess
    BabelConfig --> BuildProcess
    CI_CD_Actions --> BuildProcess
    JestConfig --> BuildProcess
    ESLintConfig --> BuildProcess
    BuildProcess --> Deployment

    %% CI/CD Workflows details
    CI_CD_Actions --> GHPagesWorkflow
    CI_CD_Actions --> NodeWorkflow

    %% Click Events
    click DataLayer "https://github.com/mldangelo/personal-site/tree/main/src/data"
    click PublicAssets "https://github.com/mldangelo/personal-site/tree/main/public"
    click Styling "https://github.com/mldangelo/personal-site/tree/main/src/static"
    click ReactApp "https://github.com/mldangelo/personal-site/tree/main/src/"
    click BuildConfig "https://github.com/mldangelo/personal-site/blob/main/package.json"
    click BabelConfig "https://github.com/mldangelo/personal-site/blob/main/babel.config.js"
    click GHPagesWorkflow "https://github.com/mldangelo/personal-site/blob/main/.github/workflows/github-pages.yml"
    click NodeWorkflow "https://github.com/mldangelo/personal-site/blob/main/.github/workflows/node.js.yml"
    click JestConfig "https://github.com/mldangelo/personal-site/blob/main/jest.config.js"
    click ESLintConfig "https://github.com/mldangelo/personal-site/blob/main/.eslintrc.js"

    %% Styling Classes
    classDef frontend fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef data fill:#A9DFBF,stroke:#196F3D,stroke-width:2px;
    classDef assets fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef build fill:#F5B7B1,stroke:#922B21,stroke-width:2px;
    classDef test fill:#D2B4DE,stroke:#6C3483,stroke-width:2px;
    classDef deploy fill:#FAD7A0,stroke:#BA4A00,stroke-width:2px;
```
