# brunoruas2/cc_site architecture

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

## Overview

##### Main Components
- Static Website Hosting: The entire site is built as static content and is deployed on GitHub Pages (https://brunoruas2.github.io/CC_site/).
- Documentation & Content: The “docs” folder is the backbone of the project. It includes multiple subfolders for documentation pages, blog posts, tutorials, courses, and navigation information.
- Assets & Resources: There is a robust directory for assets (CSS, JavaScript, images) and a specific “assets/js” directory with numerous bundled JS files, suggesting build processes. The “assets/css” and “assets/images” directories hold the visual presentation.
- Search and Navigation: Files like “lunr-index” JSONs, “search.html” and related JavaScript (in docs/search) indicate the use of client-side search functionality, likely powered by Lunr.js.
- Site Configuration & Auxiliary Files: The .nojekyll file and other configuration resources hint at adjustments necessary for GitHub Pages hosting, ensuring static asset management without interference from Jekyll’s processing.

##### Relationships and Interactions
- Website Delivery: The static content (HTML/CSS/JS generated from the “docs” folder) is delivered directly from GitHub Pages to the client’s web browser.
- Content Rendering Flow: The documentation, blog, and other educational pages are pre-built and organized using a static site generator (likely Docusaurus or a similar tool, inferred from the folder naming conventions, e.g. “blog”, “docs”, “nav”).
- Asset Loading: When a user navigates the site, the browser loads CSS for styling and JavaScript for interactivity (including search and navigation behaviors). The multiple versions and licensing files of JS assets suggest a dependency management/build bundling step during development.
- Client-Side Search: The Lunr indexes and associated search files connect to the static documents to provide search functionality within the browser.

##### Architectural Patterns & Technologies
- Static Site Generation: The project follows a static site architecture where all content is generated ahead of time. There is no runtime server-side rendering.
- Client-Side Interactivity: Use of JavaScript for dynamic functionalities (e.g., searching using Lunr.js, navigation behaviors) denotes clear separation of content and interactivity.
- Modular Documentation Organization: The extensive directory structure (with subfolders for courses, blog, navigation, docs, etc.) reflects modular organization, enabling easy scaling and management of content.
- GitHub Pages Deployment: Emphasis on pre-built static assets with a .nojekyll file signals the application optimizes for GitHub Pages hosting.

##### Final Reminders
- Every node is clearly labeled and includes a brief note about its contents or function.
- A note that while the site is static, the client-side search and navigation functionalities add dynamic elements to the user experience.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Global Nodes
    StaticHosting["Static Hosting (GitHub Pages)"]:::hosting
    WebBrowser["Web Browser"]:::browser

    %% Subgraph: Documentation & Content Repository
    subgraph "Documentation & Content Repository"
        Docs["Docs"]:::content
        Blog["Blog"]:::content
        Markdown["Markdown Page"]:::content
        Nav["Navigation"]:::content
    end

    %% Subgraph: Assets Management
    subgraph "Assets Management"
        CSS["CSS"]:::assets
        JS["JS"]:::assets
        Images["Images"]:::assets
        Img["Img"]:::assets
        Stylesheets["Stylesheets"]:::assets
    end

    %% Subgraph: Client-Side Search (Lunr.js)
    subgraph "Client-Side Search (Lunr.js)"
        lunrjs["lunr.js"]:::search
        mainjs["main.js"]:::search
        searchindex["search_index.json"]:::search
        worker["worker.js"]:::search
    end

    %% Subgraph: Site Configuration & Auxiliary Files
    subgraph "Site Configuration"
        NoJekyll[".nojekyll"]:::config
        IndexPage["Index Page"]:::config
    end

    %% Relationships between major components
    Docs ---|"builds static pages"| StaticHosting
    NoJekyll ---|"configures deployment"| StaticHosting
    StaticHosting ---|"delivers static content"| WebBrowser
    CSS ---|"loads assets"| WebBrowser
    lunrjs ---|"enables search"| WebBrowser

    %% Click Events for Static Website Hosting
    click StaticHosting "https://github.com/brunoruas2/cc_site/tree/main/docs/"

    %% Click Events for Documentation & Content Repository
    click Docs "https://github.com/brunoruas2/cc_site/tree/main/docs/docs"
    click Blog "https://github.com/brunoruas2/cc_site/tree/main/docs/blog"
    click Markdown "https://github.com/brunoruas2/cc_site/tree/main/docs/markdown-page"
    click Nav "https://github.com/brunoruas2/cc_site/tree/main/docs/nav"

    %% Click Events for Assets Management
    click CSS "https://github.com/brunoruas2/cc_site/tree/main/docs/assets/css"
    click JS "https://github.com/brunoruas2/cc_site/tree/main/docs/assets/js"
    click Images "https://github.com/brunoruas2/cc_site/tree/main/docs/assets/images"
    click Img "https://github.com/brunoruas2/cc_site/tree/main/docs/assets/img"
    click Stylesheets "https://github.com/brunoruas2/cc_site/tree/main/docs/assets/stylesheets"

    %% Click Events for Client-Side Search Engine
    click lunrjs "https://github.com/brunoruas2/cc_site/blob/main/docs/search/lunr.js"
    click mainjs "https://github.com/brunoruas2/cc_site/blob/main/docs/search/main.js"
    click searchindex "https://github.com/brunoruas2/cc_site/blob/main/docs/search/search_index.json"
    click worker "https://github.com/brunoruas2/cc_site/blob/main/docs/search/worker.js"

    %% Click Events for Site Configuration & Auxiliary Files
    click NoJekyll "https://github.com/brunoruas2/cc_site/blob/main/docs/.nojekyll"
    click IndexPage "https://github.com/brunoruas2/cc_site/blob/main/docs/index.html"

    %% Styles
    classDef hosting fill:#add8e6,stroke:#000,stroke-width:1px;
    classDef content fill:#90ee90,stroke:#000,stroke-width:1px;
    classDef assets fill:#ffff99,stroke:#000,stroke-width:1px;
    classDef search fill:#ffcc99,stroke:#000,stroke-width:1px;
    classDef config fill:#dda0dd,stroke:#000,stroke-width:1px;
    classDef browser fill:#d3d3d3,stroke:#000,stroke-width:1px;

    class StaticHosting hosting;
    class Docs,Blog,Markdown,Nav content;
    class CSS,JS,Images,Img,Stylesheets assets;
    class lunrjs,mainjs,searchindex,worker search;
    class NoJekyll,IndexPage config;
    class WebBrowser browser;
```
