# gillopy/portfolio architecture

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

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

## Overview

##### Main components
- Frontend/UI Layer: This is primarily in the “src” folder, subdivided into:
- Components (UI building blocks like Header, HeroSection, ContactSection, etc.)
- Layouts (overall page templates such as Layout.astro and ProjectLayout.astro)
- Pages (routes for the home page, project details, 404, etc.)
- Data Layer: JSON files under “src/data” (profile.json, projects.json, skills.json, siteConfig.json) that drive the content and configuration of the site.
- Public Assets: Static assets folder (e.g., images and the website screenshot)
- Utility Functions: “src/utils” where functions like getProjectData.js process the content for pages.
- Configuration & Build Tools: astro.config.mjs, tailwind.config.mjs, package.json, and bun.lock – these files define project behavior and are used during development and deployment.
- Deployment/Hosting: The Netlify configuration (netlify.toml) and build scripts (via Bun or npm) indicate how the site is built and served as a static site.

##### And Represent Relationships/Interactions
- The Pages consume Layouts and UI Components to render the website. For example, the homepage (index.astro) uses multiple components (HeroSection, AboutSection, etc.) and a primary Layout.
- Utility functions act as connectors that process data before it is rendered by the components.
- The Build/Configuration module (Astro, Bun, Tailwind) encapsulates the entire source code and ties the static site generation process together.
- Deployment configuration (Netlify/Vercel configuration files) indicates the output (build produce in the “dist” directory) and the hosting strategy.

##### Architectural Patterns and Design Principles
- The project is structured in a modular way with separation of concerns: Data, Presentation, and Utilities.
- Component reusability: UI components and layouts are decoupled to allow consistency across multiple pages.
- Static-site generation: Astro’s build process creates static HTML based on dynamic JSON content.
- Responsive design principles are implemented via Tailwind CSS.
- A clear distinction exists between static assets and dynamic content configuration.

## Diagram (Mermaid)

```mermaid
graph TD
    %% UI/Presentation Layer
    subgraph "UI/Presentation Layer"
        P["Pages: index.astro, 404.astro, project/[id].astro"]
        L["Layouts: Layout.astro, ProjectLayout.astro"]
        C["Components: Header, HeroSection, AboutSection, ContactSection, ProjectCard, ProjectsSection, SkillsSection"]
    end

    %% Data Layer
    subgraph "Data Layer"
        D["Data: profile.json, projects.json, skills.json, siteConfig.json"]
    end

    %% Utility Functions
    subgraph "Utility Functions"
        U["Utility: getProjectData.js"]
    end

    %% Configuration & Build Tools
    subgraph "Configuration & Build Tools"
        CFG["Config: astro.config.mjs, tailwind.config.mjs, package.json, bun.lock"]
    end

    %% Public Assets
    PA["Public Assets: static files & images"]

    %% Deployment/Hosting Layer
    subgraph "Deployment/Hosting"
        DEP["Deployment: netlify.toml"]
    end

    %% Relationships
    D -->|"feeds"| P
    D -->|"feeds"| C

    U -->|"processes"| P
    U -->|"processes"| C

    P -->|"renders"| L
    P -->|"includes"| C

    CFG -->|"builds"| D
    CFG -->|"builds"| U
    CFG -->|"builds"| P
    CFG -->|"builds"| L
    CFG -->|"builds"| C
    CFG -->|"builds"| PA

    PA -->|"assets"| P
    PA -->|"servedBy"| DEP

    %% Click Events
    click C "https://github.com/gillopy/portfolio/tree/main/src/components"
    click L "https://github.com/gillopy/portfolio/tree/main/src/layouts"
    click P "https://github.com/gillopy/portfolio/tree/main/src/pages"
    click D "https://github.com/gillopy/portfolio/tree/main/src/data"
    click U "https://github.com/gillopy/portfolio/tree/main/src/utils"
    click CFG "https://github.com/gillopy/portfolio/blob/main/astro.config.mjs"
    click PA "https://github.com/gillopy/portfolio/tree/main/public"
    click DEP "https://github.com/gillopy/portfolio/blob/main/netlify.toml"

    %% Styles
    classDef ui fill:#A1CAF1,stroke:#333,stroke-width:2px;
    classDef data fill:#C1E1C1,stroke:#333,stroke-width:2px;
    classDef utils fill:#E1C1E1,stroke:#333,stroke-width:2px;
    classDef config fill:#F8E1A1,stroke:#333,stroke-width:2px;
    classDef deploy fill:#F1A1A1,stroke:#333,stroke-width:2px;
    
    class P,L,C ui;
    class D data;
    class U utils;
    class CFG config;
    class DEP,PA deploy;
```
