# lucaswithboots/unifal-cc-acervo architecture

> Architecture diagram of the GitHub repository lucaswithboots/unifal-cc-acervo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lucaswithboots/unifal-cc-acervo
- Repository: https://github.com/lucaswithboots/unifal-cc-acervo

## Overview

##### Project Type and Purpose
- This is a static-site documentation portal (“Acervo Ciência da Computação”) built with Jekyll (a Ruby-based static site generator) using the “Just the Docs” template.
- Purpose: host course materials (PDFs, code snippets, markdown docs) on GitHub Pages.

##### File Structure Analysis
- Top-level config & CI:
- _config.yml – Jekyll settings
- Gemfile / Gemfile.lock – Ruby/Jekyll dependencies
- .github/workflows/ci.yml, jekyll.yml, pages.yml – GitHub Actions pipelines
- .prettierrc / .prettierignore – formatting rules
- Site source:
- index.md – home page
- docs/disciplinas/... – per-course markdown and asset hierarchy
- assets/ – images, CSS, JS (if any)
- _includes/ – HTML snippets for navigation, footer, TOC
- _sass/ – custom SCSS styling
- Deployment artifacts:
- _site/ (generated by Jekyll at build time – not checked in)

##### README Insights
- Describes tech stack: Jekyll + Just the Docs theme + GitHub Pages.
- Local dev: `bundle install` → `bundle exec jekyll serve`.
- Deployment: automated via GitHub Actions → GitHub Pages.

##### Main Components
a. Developer Environment
- Local machine (Ruby, Bundler, GCC/Make)
- Source files (markdown, assets, configs)
b. Version Control & CI/CD
- GitHub repo
- GitHub Actions workflows:
- Dependabot (dependency updates)
- CI build (runs `bundle exec jekyll build`)
- Deploy action (pushes `_site` to `gh-pages` branch)
c. Build System
- Jekyll Engine + Just the Docs theme plugin
- SCSS compilation (via Jekyll’s Sass converter)
- HTML generation from markdown + includes
d. Hosting & Delivery
- GitHub Pages (serves static files)
- CDN / edge caching (optional via GitHub infrastructure)
e. End Users
- Web browsers requesting pages, assets

##### Relationships and Data Flow
1. Developer → pushes code to GitHub
2. GitHub repo triggers GitHub Actions workflows
3. CI workflow installs Ruby gems (bundle install)
4. Jekyll build step generates `_site` (static HTML/CSS/JS)
5. Deploy action commits `_site` outputs to `gh-pages` branch
6. GitHub Pages picks up `gh-pages` branch → hosts static site
7. User browser requests content over HTTPS → delivered by GitHub Pages/CDN

##### Architectural Patterns & Principles
- Static Site Generation (SSG): pre-render at build time, no runtime backend
- Content–Presentation separation: markdown + templates
- Continuous Integration / Continuous Deployment (CI/CD) pipeline
- Convention over configuration: Jekyll folder conventions (`_includes`, `_sass`, `docs/`)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    Developer["Developer Local Machine<br/>(Ruby, Bundler, GCC/Make)"]:::dev

    %% GitHub Repository with Source Content
    subgraph "GitHub Repository (Source Code)"
        repo["GitHub Repo"]:::storage
        docs["docs/disciplinas/"]:::storage
        index["index.md"]:::storage
        includes["_includes/"]:::storage
        sass["_sass/custom/setup.scss"]:::storage
        assets["assets/"]:::storage
        config["_config.yml"]:::storage
        gems["Gemfile & Gemfile.lock"]:::storage
        prettier[".prettierrc & .prettierignore"]:::storage
        dependabot_cfg[".github/dependabot.yml"]:::storage
        readme["README.md & LICENSE"]:::storage
    end

    %% CI/CD Pipeline
    subgraph "CI/CD Pipeline"
        dependabot["Dependabot"]:::ci
        ci["CI Build"]:::ci
        preview["Preview (PR Build)"]:::ci
        deploy["Deploy to gh-pages"]:::ci
    end

    %% Build System
    subgraph "Build System<br/>(Jekyll + Just the Docs + Sass)" 
        jekyll["Jekyll Engine + Just the Docs Theme"]:::ci
        scss["Sass Converter"]:::ci
    end

    %% Artifact Storage
    artifacts["_site (Static Site Output)"]:::artifact

    %% Hosting & Delivery
    subgraph "Hosting & Delivery"
        pages["GitHub Pages"]:::hosting
        cdn["CDN / Edge Cache"]:::hosting
    end

    %% End User
    browser["End User Browser"]:::external

    %% Relationships
    Developer -->|"git push"| repo
    repo -->|"on push/pull_request"| ci
    repo -->|"on pull_request"| preview
    repo -->|"on schedule"| dependabot
    ci -->|"bundle install & jekyll build"| jekyll
    preview -->|"bundle exec jekyll serve"| jekyll
    jekyll -->|"generate HTML/CSS/JS"| artifacts
    scss -->|"compile SCSS"| artifacts
    artifacts -->|"deploy artifact"| deploy
    deploy -->|"push gh-pages branch"| pages
    pages -->|"serve static files"| cdn
    cdn -->|"HTTP GET"| browser
    Developer -->|"bundle exec jekyll serve"| jekyll

    %% Click Events
    click docs "https://github.com/lucaswithboots/unifal-cc-acervo/tree/main/docs/disciplinas/"
    click index "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/index.md"
    click includes "https://github.com/lucaswithboots/unifal-cc-acervo/tree/main/_includes/"
    click sass "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/_sass/custom/setup.scss"
    click assets "https://github.com/lucaswithboots/unifal-cc-acervo/tree/main/assets/"
    click config "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/_config.yml"
    click gems "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/Gemfile & Gemfile.lock"
    click prettier "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/.prettierrc & .prettierignore"
    click dependabot_cfg "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/.github/dependabot.yml"
    click readme "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/README.md"
    click ci "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/.github/workflows/ci.yml"
    click preview "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/.github/workflows/jekyll.yml"
    click deploy "https://github.com/lucaswithboots/unifal-cc-acervo/blob/main/.github/workflows/pages.yml"

    %% Styles
    classDef dev fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef ci fill:#FFA500,stroke:#000,stroke-width:1px
    classDef storage fill:#D3D3D3,stroke:#000,stroke-width:1px
    classDef hosting fill:#90EE90,stroke:#000,stroke-width:1px
    classDef artifact fill:#C0C0C0,stroke:#000,stroke-width:1px
    classDef external fill:#FFFFFF,stroke:#000,stroke-width:1px,stroke-dasharray: 5 5
```
