# francesco-s/francescosannicola architecture

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

## Overview

##### Project type and purpose
- This is a static, framework-free personal portfolio website.
- Purpose: showcase projects, articles, résumé; globally deliver via CDN; maintain with minimal overhead.

##### Main components
a. Development environment (local machine)
b. Source repository (GitHub)
c. CI/CD pipeline (GitHub Actions workflow in .github/workflows/main.yml)
d. Artifact storage and hosting (AWS S3 bucket)
e. Content Delivery Network (AWS CloudFront)
f. End users (browsers on mobile/desktop)

##### Relationships and interactions
1. Developer edits HTML/CSS/assets locally and pushes to GitHub.
2. Push to `main` triggers GitHub Actions: lints, builds (trivial for static), and packages files.
3. Workflow synchronizes artifacts to an S3 bucket.
4. After upload, CloudFront invalidation runs to purge edge caches.
5. End users request pages; CloudFront serves cached assets or fetches from S3.

##### Architectural patterns and design principles
- Static-first: no backend servers or runtime frameworks.
- CI/CD: automated testing and deployment.
- Global CDN: low latency and high availability.
- Edge cache invalidation: ensures fresh content after each deploy.

##### Step-by-step guidance
- Top: Development & Source Control
- Middle: CI/CD
- Bottom: Hosting & Delivery
e. In the hosting tier, connect “CloudFront CDN” to “S3 Bucket” (cache miss retrieval).

##### Callouts for important files and folders
- .github/workflows/main.yml (CI config)
- index.html, about.html, style.css (static assets)
- /articles, /projects, /assets directories
- Near “CloudFront CDN,” note: global edge caching & invalidation on deploy.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development & Source Control Layer
    subgraph "Development & Source Control"
        Developer["Developer Workstation"]:::dev
        GitHubRepo["GitHub Repo"]:::repo
        subgraph "Repository Contents"
            RepoIndex["index.html"]:::repo
            RepoAbout["about.html"]:::repo
            RepoStyle["style.css"]:::repo
            Articles["articles/"]:::repo
            Projects["projects/overview.html"]:::repo
            Assets["assets/"]:::repo
            Resume["resume.pdf"]:::repo
            Robots["robots.txt"]:::repo
            Sitemap["sitemap.xml"]:::repo
        end
    end

    %% CI/CD Layer
    subgraph "CI/CD Pipeline"
        GitHubActions["GitHub Actions"]:::ci
    end

    %% Hosting & Delivery Layer
    subgraph "Hosting & Delivery"
        S3["S3 Bucket"]:::aws
        CloudFront["CloudFront CDN"]:::aws
    end

    %% User Layer
    subgraph "End Users"
        Browser["Browser (User)"]:::user
    end

    %% Connections
    Developer -->|"git push"| GitHubRepo
    GitHubRepo -->|"trigger"| GitHubActions
    GitHubActions -->|"upload"| S3
    GitHubActions -->|"invalidate"| CloudFront
    CloudFront -->|"GET (cache miss)"| S3
    Browser -->|"HTTP GET"| CloudFront
    CloudFront -->|"HTTP 200"| Browser

    %% Click Events
    click GitHubActions "https://github.com/francesco-s/francescosannicola/blob/main/.github/workflows/main.yml"
    click RepoIndex "https://github.com/francesco-s/francescosannicola/blob/main/index.html"
    click RepoAbout "https://github.com/francesco-s/francescosannicola/blob/main/about.html"
    click RepoStyle "https://github.com/francesco-s/francescosannicola/blob/main/style.css"
    click Articles "https://github.com/francesco-s/francescosannicola/tree/main/articles/"
    click Projects "https://github.com/francesco-s/francescosannicola/blob/main/projects/overview.html"
    click Assets "https://github.com/francesco-s/francescosannicola/tree/main/assets/"
    click Resume "https://github.com/francesco-s/francescosannicola/blob/main/resume.pdf"
    click Robots "https://github.com/francesco-s/francescosannicola/blob/main/robots.txt"
    click Sitemap "https://github.com/francesco-s/francescosannicola/blob/main/sitemap.xml"

    %% Styles
    classDef dev fill:#e0f7fa,stroke:#006064,color:#006064;
    classDef repo fill:#e0f2f1,stroke:#004d40,color:#004d40;
    classDef ci fill:#e8f5e9,stroke:#1b5e20,color:#1b5e20;
    classDef aws fill:#fff3e0,stroke:#e65100,color:#e65100;
    classDef user fill:#f3e5f5,stroke:#6a1b9a,color:#6a1b9a;
```
