# orionwilx/personal-portfolio architecture

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

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

## Overview

##### Main Components
- Project Root & Configuration Files: Represent files like astro.config.mjs, package.json, tailwind.config.js, and tsconfig.json. These denote the build configuration, dependency management, and development settings.
- Public Assets: The public directory holds static files (for example, favicon.svg) that are directly served.
- Source Code (src): This is the heart of the application and can be subdivided into:
- Layouts (src/layouts/Layout.astro): The common page structure that wraps other components.
- Pages (src/pages/index.astro): The entry point and individual pages that use layouts and components.
- Assets & Styles: Directories like src/assets and src/styles store static assets (images, etc.) and apply global CSS styling using Tailwind CSS (configured in tailwind.config.js).

##### Relationships and Interactions
- The Pages interact with Layouts — each page uses the Layout component to maintain consistent styling and structure.
- Layouts include and orchestrate various Components; for example, the Layout might render components like Header, Welcome, and other UI parts.
- Global styles in src/styles/global.css and supporting Tailwind configuration influence the styling of all UI components.
- The public directory supplies static files and assets, which can be linked from within pages and components.

##### Architectural Patterns
- Component-based architecture: The entire UI is built with Astro components (notably with the .astro file extension), similar to other modern frameworks.
- Static site generation: The build process compiles these components into static HTML for fast delivery.
- Clear separation between presentation (components, layouts) and deployment static assets (public).

##### Relevant Technologies and Frameworks
- Astro: The static site generator for building and deploying the website.
- Tailwind CSS: Used for styling (see tailwind.config.js and src/styles/global.css).
- JavaScript/TypeScript (with tsconfig.json for type configurations).
- Node/NPM: Manages dependencies and scripts defined in package.json.

##### Detail
- Every major file/directory that contributes to the application (and influences the user interface or build process) is represented.
- While the project is small, capturing the separation of concerns—from the configuration to the static assets to the modular UI components—is key to understanding the architecture.
- Avoid overcomplicating, but ensure clarity: include as many tangible components as possible by separating them into logical clusters (i.e., Public, Src Components, Layouts, etc.).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Project Configuration Subgraph
    subgraph "Project Configuration"
        PC1["astro.config.mjs"]:::config
        PC2["package.json"]:::config
        PC3["tailwind.config.js"]:::config
        PC4["tsconfig.json"]:::config
    end

    %% Source Code Subgraph
    subgraph "Source Code (src)"
        PAGES["Pages (src/pages/index.astro)"]:::ui
        LAYOUT["Layouts (src/layouts/Layout.astro)"]:::ui
        COMPONENTS["Components (src/components)"]:::ui
        ICONS["Icons (src/icons)"]:::ui
        ASSETS["Assets (src/assets)"]:::ui
        GLOBALSTYLES["Global Styles (src/styles/global.css)"]:::ui
    end

    %% Build Process Node
    BP(("Build Process")):::process

    %% Public Assets Node
    PUBLIC["Public Assets (public)"]:::public

    %% Relationships from Project Configuration to Source Code
    PC1 -->|"configures"| PAGES
    PC3 -->|"configures"| GLOBALSTYLES

    %% Relationships within Source Code
    PAGES -->|"rendersVia"| LAYOUT
    LAYOUT -->|"includes"| COMPONENTS
    LAYOUT -->|"includes"| ICONS
    GLOBALSTYLES -->|"applyTo"| COMPONENTS
    GLOBALSTYLES -->|"applyTo"| ICONS

    %% Build process flow
    PAGES -->|"compiled"| BP
    BP -->|"generates"| PUBLIC
    ASSETS -->|"provides"| PUBLIC

    %% Click Events
    click PC1 "https://github.com/orionwilx/personal-portfolio/blob/master/astro.config.mjs"
    click PC2 "https://github.com/orionwilx/personal-portfolio/blob/master/package.json"
    click PC3 "https://github.com/orionwilx/personal-portfolio/blob/master/tailwind.config.js"
    click PC4 "https://github.com/orionwilx/personal-portfolio/blob/master/tsconfig.json"
    click PAGES "https://github.com/orionwilx/personal-portfolio/blob/master/src/pages/index.astro"
    click LAYOUT "https://github.com/orionwilx/personal-portfolio/blob/master/src/layouts/Layout.astro"
    click COMPONENTS "https://github.com/orionwilx/personal-portfolio/tree/master/src/components"
    click ICONS "https://github.com/orionwilx/personal-portfolio/tree/master/src/icons"
    click ASSETS "https://github.com/orionwilx/personal-portfolio/tree/master/src/assets"
    click GLOBALSTYLES "https://github.com/orionwilx/personal-portfolio/blob/master/src/styles/global.css"
    click PUBLIC "https://github.com/orionwilx/personal-portfolio/tree/master/public"

    %% Styles
    classDef config fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef ui fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef public fill:#FFFF99,stroke:#000,stroke-width:2px;
    classDef process fill:#FFA07A,stroke:#000,stroke-width:2px;
```
