# marcos934/portfolio-marcos-vinicius-mulinari architecture

> Architecture diagram of the GitHub repository marcos934/portfolio-marcos-vinicius-mulinari, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/marcos934/portfolio-marcos-vinicius-mulinari
- Repository: https://github.com/marcos934/portfolio-marcos-vinicius-mulinari

## Overview

##### Project Type and Purpose
- This is a single-page application (SPA) portfolio built entirely in Angular 18.
- It’s a purely front-end, static site (deployed via GitHub Pages or any static host) showcasing work experience, skills and multi-language support (PT/EN).

##### High-Level Architecture Components
a. User Browser (Client)
- Hosts the Angular SPA.
b. Static Web Server / CDN
- Serves the compiled Angular assets (index.html, JS bundles, CSS, assets).
c. Angular Runtime & Modules
– AppModule (bootstrap)
– AppComponent (root)
– RouterModule (defined in app.routes.ts)
d. Presentation Layer (Components & Templates)
– LanguageSelectorComponent
– LatestUpdatesComponent (+ its service & interface)
– ProjectsComponent (+ its service & interface)
e. Business-Logic Layer (Services & Pipes)
– TranslationService & DataTranslationService (i18n logic reading XLF files)
– LatestUpdatesService (e.g., fetches release data from GitHub API)
– ProjectsService (fetches projects data, possibly from local JSON or API)
– TranslatePipe (transforms keys into localized strings)
f. Data Layer (Static Assets & External Services)
– src/locale/messages.xlf (translation catalogs)
– public/assets/images, CSS assets, Tailwind styles
– External API endpoints (e.g., GitHub REST API)

##### Relationships & Data Flow
1. On page load, the Static Web Server delivers index.html + Angular bundles → Angular bootstraps in the browser.
2. RouterModule reads the URL → loads corresponding Component (e.g., “/projects” → ProjectsComponent).
3. Component calls its Service (ProjectsService) → either reads local JSON or calls an external REST API.
4. Service returns data → Component renders list of projects via its template & CSS.
5. LanguageSelectorComponent invokes TranslationService → loads appropriate XLF file → TranslatePipe dynamically transforms template keys.
6. LatestUpdatesComponent uses LatestUpdatesService → fetches GitHub release info → renders update feed.

##### Key Architectural Patterns & Principles
– Separation of Concerns:
- Components for UI + template + styles
- Services for data retrieval & business logic
- Pipes for presentation transformation (i18n)
– Module-based organization (AppModule)
– Declarative routing (AppRoutes)
– Configuration driven (app.config.ts for environment settings)

##### Detailed Checklist
– [ ] AppModule → Router → AppComponent flow
– [ ] Static data sources (messages.xlf, images) and external API endpoints

This layout ensures you capture every essential architectural element—presentation, routing, business logic, data sources—and clearly conveys how your personal portfolio SPA is structured and interacts at runtime.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Static Host Layer
    subgraph "Static Web Server / CDN" 
        Static["index.html + JS bundles + CSS + assets"]:::cdn
    end

    %% Browser / Angular Runtime
    subgraph "Browser / Angular Runtime"
        AppModule["AppModule"]:::module
        AppComponent["AppComponent"]:::component
        RouterModule["RouterModule"]:::module
    end

    %% Presentation Layer
    subgraph "Presentation Layer"
        LanguageSelector["LanguageSelectorComponent"]:::presentation
        LatestUpdates["LatestUpdatesComponent"]:::presentation
        ProjectsComp["ProjectsComponent"]:::presentation
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        TranslationSvc["TranslationService"]:::logic
        DataTranslationSvc["DataTranslationService"]:::logic
        LatestUpdatesSvc["LatestUpdatesService"]:::logic
        ProjectsSvc["ProjectsService"]:::logic
        TranslatePipe["TranslatePipe"]:::logic
    end

    %% Data Layer
    subgraph "Data Layer"
        MessagesXLF[(messages.xlf)]:::data
        Images[(assets/images)]:::data
        ExternalAPI[(GitHub REST API)]:::data
    end

    %% Connections
    Static -->|"HTTP GET index.html & bundles"| AppModule
    AppModule -->|"bootstrap"| AppComponent
    AppComponent -->|"init routing"| RouterModule
    RouterModule -->|"route to /language"| LanguageSelector
    RouterModule -->|"route to /updates"| LatestUpdates
    RouterModule -->|"route to /projects"| ProjectsComp

    LanguageSelector -->|"calls"| TranslationSvc
    LanguageSelector -->|"uses pipe"| TranslatePipe
    TranslatePipe -->|"reads catalogs"| DataTranslationSvc
    DataTranslationSvc -->|"loads XLF"| MessagesXLF

    LatestUpdates -->|"calls"| LatestUpdatesSvc
    LatestUpdatesSvc -->|"GET /releases"| ExternalAPI

    ProjectsComp -->|"calls"| ProjectsSvc
    ProjectsSvc -->|"reads JSON"| Images

    %% Click Events
    click AppModule "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/app.ts"
    click AppComponent "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/app.ts"
    click RouterModule "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/app.routes.ts"
    click LanguageSelector "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/components/language-selector.component.ts"
    click LatestUpdates "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/components/latest-updates/latest-updates.component.ts"
    click LatestUpdatesSvc "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/components/latest-updates/latest-updates.service.ts"
    click ProjectsComp "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/components/projects/projects.component.ts"
    click ProjectsSvc "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/components/projects/projects.service.ts"
    click TranslationSvc "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/services/translation.service.ts"
    click DataTranslationSvc "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/services/data-translation.service.ts"
    click TranslatePipe "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/app/pipes/translate.pipe.ts"
    click MessagesXLF "https://github.com/marcos934/portfolio-marcos-vinicius-mulinari/blob/master/src/locale/messages.xlf"

    %% Styles
    classDef cdn fill:#FFD700,stroke:#333,stroke-width:1px
    classDef module fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef component fill:#87CEFA,stroke:#333,stroke-width:1px
    classDef presentation fill:#AFEEEE,stroke:#333,stroke-width:1px
    classDef logic fill:#98FB98,stroke:#333,stroke-width:1px
    classDef data fill:#FFB6C1,stroke:#333,stroke-width:1px
```
