# alshedivat/al-folio architecture

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

- Interactive diagram: https://gitdiagram.com/alshedivat/al-folio
- Repository: https://github.com/alshedivat/al-folio

## Overview

##### Main components
- Source Content & Configuration: This includes the core “content” directories such as _posts, _pages, _data, _bibliography, _includes, _layouts, and _sass. These folders collectively represent the raw inputs that the static site generator (Jekyll) uses to produce the final website.
- Build & Templating Engine (Jekyll Core): The theme relies on Jekyll for processing Liquid templating, applying configuration (_config.yml), and generating static HTML websites. In addition, custom plugins from the _plugins directory provide extended functionality (e.g., custom Liquid tags, citation formatting, GitHub repository stats, etc.).
- Asset Pipeline: The assets directory holds media (images, CSS, JavaScript, audio, video, etc.). This component supplies the style (via SCSS in assets/css and _sass) and interactive features via JavaScript.
- Continuous Integration / Deployment: GitHub workflows (files in .github/workflows) and Dockerfiles ensure that code quality checks (Prettier, lychee for links, Axe for accessibility), linting, and build deployments occur automatically. Docker Compose files and scripts in the bin directory reinforce this automated build/deploy process.
- External Services & Third-Party Integrations: Third-party APIs and services are integrated in several places:
▪ GitHub-readme-stats and trophy renders for repository stats.
▪ Jekyll Scholar for bibliography and publications.
▪ Lighthouse (with test reports in lighthouse_results) for performance monitoring.
▪ Social media metadata generation (Open Graph tags) configured via _config.yml.
- Hosting Platform/Delivery: The final generated website (static HTML, CSS, JS) is generally deployed on GitHub Pages, served via a containerized build when using Docker, or deployed via CI/CD defined in GitHub workflows.

##### Relationships & interactions
- Content and configuration files are fed into the Jekyll engine that uses the Liquid templating provided in _layouts and _includes.
- The rendering process incorporates asset compilation (SCSS to CSS, JS by bundling if needed) and uses plugins to extend Jekyll’s behavior (e.g., incorporating bibliography content, dynamic CV building).
- The CI/CD pipelines and Docker container definitions wrap the build process and run tests before deployment.
- The generated static site is then served to end users (often via GitHub Pages) with external services (e.g., GitHub APIs for stats or Lighthouse for performance) interfaced as needed.

##### Architectural patterns & design principles
- Modular Template Structure: The project strictly separates content (_posts, _pages) from presentation (_layouts, _includes, _sass) and configuration (_config.yml, _data). This ensures maintainability and flexibility in customization.
- Plugin and Extension Mechanism: Custom Ruby plugins extend the templating engine to process specialized content (e.g., citations, CV elements), indicating adherence to the extension-based architecture common in static site generators.
- Automated CI/CD Pipeline: GitHub workflows automate quality control, deployment, and even Docker builds. This indicates a design where continuous integration is key to ensuring high quality and a reliable release process.
- Asset Management and Responsive Design: With dedicated asset folders and a range of JavaScript libraries (for functionalities like charts, code highlighting, and accessibility tools), the project emphasizes an interactive and responsive user experience.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Content & Configuration Sources
    subgraph "Content & Configuration Sources"
        posts["_posts"]:::content
        pages["_pages"]:::content
        data["_data"]:::content
        bibliography["_bibliography"]:::content
        includes["_includes"]:::content
        layouts["_layouts"]:::content
        sass["_sass"]:::content
        config["_config.yml"]:::content
    end

    %% Asset Pipeline
    Assets["Assets (Asset Pipeline)"]:::asset

    %% Custom Plugins & Extensions
    CustomPlugins["Custom Plugins & Extensions"]:::plugin

    %% CI/CD Pipeline
    subgraph "CI/CD Pipeline"
        workflows["GitHub Workflows"]:::ci
        dockerfile["Dockerfile"]:::ci
        docker_compose["Docker Compose"]:::ci
        bin["Bin Scripts"]:::ci
    end

    %% External Services & Third-Party Integrations
    ThirdPartyIntegrations["Third-Party Integrations"]:::integration

    %% Jekyll Build Engine & Templating
    JekyllEngine["Jekyll Build Engine & Templating"]:::engine

    %% Static Site Delivery (Hosting)
    StaticDelivery["Static Site Delivery (Hosting)"]:::delivery

    %% Connections from Content & Configuration Sources to Jekyll Engine
    posts -->|"feeds"| JekyllEngine
    pages -->|"feeds"| JekyllEngine
    data -->|"feeds"| JekyllEngine
    bibliography -->|"feeds"| JekyllEngine
    includes -->|"feeds"| JekyllEngine
    layouts -->|"feeds"| JekyllEngine
    sass -->|"feeds"| JekyllEngine
    config -->|"configures"| JekyllEngine

    %% Connections from Asset Pipeline, Custom Plugins, & CI/CD Pipeline to Jekyll Engine
    Assets -->|"provides"| JekyllEngine
    CustomPlugins -->|"extends"| JekyllEngine
    workflows -->|"triggers"| JekyllEngine
    dockerfile -->|"supports"| JekyllEngine
    docker_compose -->|"supports"| JekyllEngine
    bin -->|"executes"| JekyllEngine

    %% Integration with Third-Party Services and Final Build
    JekyllEngine -->|"builds"| StaticDelivery
    JekyllEngine -->|"integrates"| ThirdPartyIntegrations
    ThirdPartyIntegrations -->|"monitors"| StaticDelivery

    %% Styles
    classDef content fill:#FFEEAD,stroke:#333,stroke-width:2px;
    classDef engine fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef plugin fill:#D8BFD8,stroke:#333,stroke-width:2px;
    classDef asset fill:#FFDAB9,stroke:#333,stroke-width:2px;
    classDef ci fill:#D3D3D3,stroke:#333,stroke-width:2px;
    classDef integration fill:#FFB6C1,stroke:#333,stroke-width:2px;
    classDef delivery fill:#90EE90,stroke:#333,stroke-width:2px;

    %% Click Events
    click posts "https://github.com/alshedivat/al-folio/tree/main/_posts"
    click pages "https://github.com/alshedivat/al-folio/tree/main/_pages"
    click data "https://github.com/alshedivat/al-folio/tree/main/_data"
    click bibliography "https://github.com/alshedivat/al-folio/tree/main/_bibliography"
    click includes "https://github.com/alshedivat/al-folio/tree/main/_includes"
    click layouts "https://github.com/alshedivat/al-folio/tree/main/_layouts"
    click sass "https://github.com/alshedivat/al-folio/tree/main/_sass"
    click config "https://github.com/alshedivat/al-folio/blob/main/_config.yml"
    click CustomPlugins "https://github.com/alshedivat/al-folio/tree/main/_plugins"
    click Assets "https://github.com/alshedivat/al-folio/tree/main/assets"
    click workflows "https://github.com/alshedivat/al-folio/tree/main/.github/workflows"
    click dockerfile "https://github.com/alshedivat/al-folio/tree/main/Dockerfile"
    click docker_compose "https://github.com/alshedivat/al-folio/blob/main/docker-compose.yml"
    click bin "https://github.com/alshedivat/al-folio/tree/main/bin"
```
