# bolonio/adrianbolonio architecture

> Architecture diagram of the GitHub repository bolonio/adrianbolonio, 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/bolonio/adrianbolonio
- Repository: https://github.com/bolonio/adrianbolonio

## Overview

Based on our analysis of the provided file tree and README, we’re dealing with a personal website and blog developed using Next.js with TypeScript. This is a full-stack web application (with primary focus on frontend rendering and static-generation capabilities) that serves multilingual blog posts, CV information, talks, and general website pages on accessibility and software engineering insights.

##### Main Components

- Frontend Interface – The primary user interface is rendered using the Next.js framework. The structure under the src/app directory (with its [locale] folders) shows that the site supports multiple languages. Pages like blog, CV, talks, and about are laid out according to Next.js’ file-based routing.

- React Components – The src/components folder contains modular UI elements such as the Header, Footer, Layout, BlogPostCard, and several specialized components for accessibility, theme switching, and markdown content. These are the building blocks that compose each page.

- Data & Content Management – Blog posts and talk pages are stored in markdown files within the posts/ and talks/ directories. Additionally, content-specific data (such as navigation, talks, and CV content) is found under src/data. These serve as the static content sources.

- Internationalization (i18n) – With presence of a src/i18n directory and locale-specific application folders, the system handles content routing and translations for multiple languages.

- Static Assets – The public directory hosts images and other assets (like banners, og images, etc.) for blogs, talks, and the site’s general media requirements.

- Configuration & Build Tools – Files like next.config.mjs, netlify.toml, package.json, and TypeScript declarations (global.d.ts, next-env.d.ts) are used for app configuration, build, and deployment processes.

##### Understand the Relationships & Data Flow

- Client Requests: When a browser requests a page, Next.js leverages its file-based routing (e.g., src/app/[locale]/blog or src/app/[locale]/talks) to load the correct content based on the locale and URL parameters.

- Component Composition: Layout and UI components (Header, Footer, Layout, etc.) are used consistently across pages. These are connected via React’s component hierarchy, with context providers (for themes and accessibility) ensuring global state management.

- Data Integration: Markdown files from posts/ and talks/ are integrated into the page views through the components in src/lib and data from src/data. Helper libraries (e.g., for formatting dates, SEO, flags, etc.) facilitate content rendering.

- Internationalization: The routing logic and language-specific content (via the [locale] folders and src/i18n utilities) determine which data and components are served, ensuring a seamless multilingual experience.

- Static Assets: The public directory is directly accessed by the client browsers to fetch images and other media resources used in blog posts, CV, talks, etc.

##### Architectural Patterns & Key Design Decisions

- File-Based Routing – Next.js’s approach automatically defines routes based on the folder structure under src/app, simplifying the mapping of URLs to components.

- Component Reusability – Common UI components are abstracted and reused across different sections (blog, CV, talks), facilitating maintainability and scalability.

- Separation of Content & Presentation – Markdown posts and structured JSON data are kept separate from presentation logic, enabling easy updates and content management.

- i18n Integration – The separation of locales into dedicated directories shows design consideration for internationalization and localization.

- Deployment and Configuration – With configuration files for ESLint, Git, Netlify, and Next.js settings, the project is built with tooling for code quality, version control, and continuous deployment.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client Layer"
        Browser("Browser (Client)"):::client
    end

    %% Server/Application Layer
    subgraph "Next.js Application Layer"
        NxtPages("Next.js Pages & Routing"):::server
        Middleware("Middleware"):::server
    end

    %% UI Layer
    subgraph "UI Layer"
        ReactComponents("React Components"):::ui
    end

    %% Data & Content Layer
    subgraph "Data & Content Layer"
        BlogPosts("Blog Posts (Markdown)"):::data
        TalksMarkdown("Talks (Markdown)"):::data
        TalksData("Structured Talks Data"):::data
        AdditionalData("Additional Data"):::data
    end

    %% Internationalization Layer
    subgraph "Internationalization Layer"
        i18nUtils("Internationalization (i18n)"):::intl
        LocaleDirs("Locale Directories"):::intl
    end

    %% Assets Layer
    subgraph "Assets Layer"
        StaticAssets("Static Assets"):::assets
    end

    %% Configuration & Build Tools Layer
    subgraph "Configuration & Build Tools"
        NextConfig("next.config.mjs"):::config
        Netlify("netlify.toml"):::config
        PackageJSON("package.json"):::config
        GlobalDTS("global.d.ts"):::config
        NextEnv("next-env.d.ts"):::config
        Tsconfig("tsconfig.json"):::config
        Eslint(".eslintrc.json"):::config
    end

    %% Connections
    Browser -->|"HTTP_Request"| NxtPages
    Browser -->|"RequestAssets"| StaticAssets

    NxtPages -->|"Render_UI"| ReactComponents
    NxtPages -->|"Fetch_BlogContent"| BlogPosts
    NxtPages -->|"Fetch_TalkContent"| TalksMarkdown
    NxtPages -->|"Fetch_TalkData"| TalksData
    NxtPages -->|"Fetch_AddlData"| AdditionalData
    NxtPages -->|"Use_i18n"| i18nUtils

    i18nUtils -->|"Provide_Translations"| LocaleDirs

    Middleware -->|"Intercepts"| NxtPages
    Middleware -->|"Apply_Locale"| LocaleDirs

    ReactComponents -->|"Localized_UI"| i18nUtils

    NextConfig -->|"Configures"| NxtPages
    Netlify -->|"Configures"| NxtPages
    PackageJSON -->|"DefinesDeps"| NxtPages
    GlobalDTS -->|"TypescriptSetup"| NxtPages
    NextEnv -->|"TypescriptEnv"| NxtPages
    Tsconfig -->|"BuildConfig"| NxtPages
    Eslint -->|"CodeQuality"| NxtPages

    %% Click Events
    click NxtPages "https://github.com/bolonio/adrianbolonio/tree/main/src/app"
    click ReactComponents "https://github.com/bolonio/adrianbolonio/tree/main/src/components"
    click BlogPosts "https://github.com/bolonio/adrianbolonio/tree/main/posts"
    click TalksMarkdown "https://github.com/bolonio/adrianbolonio/tree/main/talks"
    click TalksData "https://github.com/bolonio/adrianbolonio/blob/main/src/data/talks.ts"
    click AdditionalData "https://github.com/bolonio/adrianbolonio/tree/main/src/data"
    click i18nUtils "https://github.com/bolonio/adrianbolonio/tree/main/src/i18n"
    click LocaleDirs "https://github.com/bolonio/adrianbolonio/tree/main/src/app/[locale]"
    click StaticAssets "https://github.com/bolonio/adrianbolonio/tree/main/public"
    click NextConfig "https://github.com/bolonio/adrianbolonio/blob/main/next.config.mjs"
    click Netlify "https://github.com/bolonio/adrianbolonio/blob/main/netlify.toml"
    click PackageJSON "https://github.com/bolonio/adrianbolonio/blob/main/package.json"
    click GlobalDTS "https://github.com/bolonio/adrianbolonio/blob/main/global.d.ts"
    click NextEnv "https://github.com/bolonio/adrianbolonio/blob/main/next-env.d.ts"
    click Tsconfig "https://github.com/bolonio/adrianbolonio/blob/main/tsconfig.json"
    click Eslint "https://github.com/bolonio/adrianbolonio/blob/main/.eslintrc.json"
    click Middleware "https://github.com/bolonio/adrianbolonio/blob/main/src/middleware.ts"

    %% Styles
    classDef client fill:#ffe6e6,stroke:#333,stroke-width:2px;
    classDef server fill:#e6ffe6,stroke:#333,stroke-width:2px;
    classDef ui fill:#e6e6ff,stroke:#333,stroke-width:2px;
    classDef data fill:#ffffcc,stroke:#333,stroke-width:2px;
    classDef intl fill:#e6ffff,stroke:#333,stroke-width:2px;
    classDef assets fill:#ffe6ff,stroke:#333,stroke-width:2px;
    classDef config fill:#e6e6e6,stroke:#333,stroke-width:2px;
```
