# sofidevo/sofidev-portfolio-astro architecture

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

- Interactive diagram: https://gitdiagram.com/sofidevo/sofidev-portfolio-astro
- Repository: https://github.com/sofidevo/sofidev-portfolio-astro

## Overview

##### Project Type and Purpose
- This is a personal portfolio website built with Astro that integrates React components. Its purpose is to showcase information (e.g., credentials, projects, blog posts) using polished UI components.
- The README highlights a custom “CardTerminal” component with specific styling, while the file tree shows the use of Markdown files for blog content and the presence of various UI components.

##### Analyzing the File Structure
- Top-Level Directories:
- The “public” directory contains all static assets (images, SVGs, sounds, docs) that are directly served.
- The “src” directory holds the application source code including components, pages, layouts, services, controllers, and data.
- Within “src”:
- The “components” directory uses an atomic design approach (atoms, molecules, organisms) to build the UI.
- “layouts” hold common page structures (like headers, blog post layout, and special components like “CardTerminal”).
- “pages” contains the route-based pages (e.g., index, about, blog, portfolio) that Astro uses for static site generation.
- “content” includes blog posts (in Markdown and MDX format) as well as configuration files that help structure the dynamic content.
- “controllers” and “services” (e.g., the YouTube service) indicate that there are client-side or API integrations to fetch dynamic data (like the latest YouTube video).
- Additional files like configuration files (astro.config.mjs, tsconfig.json, package.json) indicate build and type settings.

##### Important Elements to Capture
- Detailed breakdown of the “src” folder (components, layouts, pages, controllers, services, data).
- The “public” folder as the static asset provider.
- Integration points where dynamic data (like video content) is brought in via services.
- Styling and theming aspects mentioned in README (e.g., “CardTerminal” styling details and CSS variables).

## Diagram (Mermaid)

```mermaid
flowchart TD
    engine["Astro Build Engine"]:::astro
    assets["Public Assets"]:::assets

    subgraph "Presentation Layer"
        pages["Pages & Routing"]:::page
        layouts["Layouts (CardTerminal)"]:::layout
        subgraph "UI Components"
            atoms["Atoms"]:::ui
            molecules["Molecules"]:::ui
            organisms["Organisms"]:::ui
        end
    end

    subgraph "Content & Data"
        content["Content Management"]:::content
        blog["Blog Posts"]:::content
    end

    subgraph "Dynamic Integration"
        services["Dynamic Services (YouTube)"]:::dynamic
        controllers["Controllers (Video Player)"]:::dynamic
    end

    engine -->|"builds"| pages
    engine -->|"serves"| assets
    pages -->|"uses"| layouts
    atoms -->|"composes"| pages
    molecules -->|"composes"| pages
    organisms -->|"composes"| pages
    content -->|"provides"| pages
    blog -->|"provides"| pages
    services -->|"integrates"| pages
    controllers -->|"integrates"| pages

    classDef astro fill:#BBDEFB,stroke:#1E88E5,stroke-width:2px;
    classDef page fill:#C8E6C9,stroke:#43A047,stroke-width:2px;
    classDef layout fill:#FFF9C4,stroke:#FDD835,stroke-width:2px;
    classDef ui fill:#FFECB3,stroke:#FBC02D,stroke-width:2px;
    classDef content fill:#FFE0B2,stroke:#FB8C00,stroke-width:2px;
    classDef dynamic fill:#F8BBD0,stroke:#E91E63,stroke-width:2px;
    classDef assets fill:#D1C4E9,stroke:#673AB7,stroke-width:2px;

    click engine "https://github.com/sofidevo/sofidev-portfolio-astro/blob/sofidev/astro.config.mjs"
    click pages "https://github.com/sofidevo/sofidev-portfolio-astro/tree/sofidev/src/pages"
    click atoms "https://github.com/sofidevo/sofidev-portfolio-astro/tree/sofidev/src/components/atoms"
    click molecules "https://github.com/sofidevo/sofidev-portfolio-astro/tree/sofidev/src/components/molecules"
    click organisms "https://github.com/sofidevo/sofidev-portfolio-astro/tree/sofidev/src/components/organisms"
    click layouts "https://github.com/sofidevo/sofidev-portfolio-astro/blob/sofidev/src/layouts/CardTerminal.astro"
    click content "https://github.com/sofidevo/sofidev-portfolio-astro/tree/sofidev/src/content"
    click blog "https://github.com/sofidevo/sofidev-portfolio-astro/tree/sofidev/src/content/blog"
    click services "https://github.com/sofidevo/sofidev-portfolio-astro/blob/sofidev/src/services/youtubeService.js"
    click controllers "https://github.com/sofidevo/sofidev-portfolio-astro/blob/sofidev/src/controllers/videoPlayer.controller.js"
    click assets "https://github.com/sofidevo/sofidev-portfolio-astro/tree/sofidev/public"
```
