# nailuj1992/nailuj-portfolio architecture

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

## Overview

##### Project Type and Purpose
- Project Type: This is a frontend portfolio website built with Angular (version 17.1.2) with some server-side configuration (server.ts, server.js, main.server.ts) that may be involved in server-side rendering (Angular Universal) or other API functions.
- Purpose: To showcase the portfolio of Julián González Prieto (alias “Náiluj”), illustrating separate pages for home, about, contact, portfolio, experience, and studies—all designed to look visually appealing. The deployment is on Vercel.

##### File Structure
- Top-Level Files: Notice configuration files such as angular.json, tsconfig files, package.json, and deployment-related files (.vercel/ project.json, .editorconfig, .gitignore).
- Directories:
- /src: The application’s source which includes:
▪ /app: Contains Angular components, configuration, routing (app.routes.ts), and service files.
▪ /components: Houses page-specific components (e.g., home, about, contact, portfolio, etc.).
▪ /elements: Contains shared UI elements (footer, menu, image-slider, scroll-to-top, separator).
▪ /model: Provides data transfer objects (DTOs) for language settings and sending mail.
▪ /services: Contains the mail service responsible for handling contact form email functionality.
▪ /assets: Holds images and some design files.
- Server Files: Files like server.ts, server.js, main.server.ts indicating server-side elements (possibly for SSR or API endpoints).
- Environment Configuration: /src/environments for handling environment-specific variables.
- Architectural Clues:
- Angular’s component-based design is evident.
- There is a clear separation between UI pages (in components) and shared elements (in elements).
- Service and model layers support backend-like functionality (e.g., mail service via DTOs).

##### Examining the README
- The README confirms the project is a portfolio application, explains who the developer is, and notes that it’s deployed on Vercel.
- It subtly hints at an emphasis on UI/UX ("good and pretty manner"), aligning with the detailed component structure under src/app.

a. Main Components to Represent:
- Client-Side (Angular App) Layer:
- App Module: Central container coordinating routes (app.routes.ts), configurations (app.config.ts and app.config.server.ts).
- Page Components: Home, About, Contact, Portfolio, Experience, Studies.
- Shared UI Elements: Footer, Menu, Image Slider, Scroll-to-top, Separator.
- Services: Mail Service (with DTOs like send-mail-dto.ts) which supports the Contact page.
- Model Layer: DTO definitions for language settings and email payload.
- Assets & Themes: Custom SCSS theme (custom-theme.scss) and static assets (images, svg).
- Server-Side Layer:
- Server Scripts: server.ts and server.js, main.server.ts that may be configuring server-side rendering or API endpoints.
- Environment Configurations: Handling different environments using configuration files in /src/environments.
- Deployment and Configuration:
- Build and Configuration Files: angular.json, tsconfig*.json, package.json, and Vercel configuration (.vercel directory).

b. Relationships and Interactions:
- Data/Control Flow:
- The Angular router (app.routes.ts) directs users to various page components.
- Services (like mail.service) facilitate asynchronous communication (e.g., sending email data).
- The server-side components act as the backend entry point for either server-side rendering or to support API operations.
- The components depend on shared services and DTO models for consistency in data handling.
- External Integration:
- Vercel Deployment acts as the external host, ensuring continuous deployment through the provided config files.

c. Key Architectural Patterns and Technologies:
- Component-Based Architecture: Each feature (page or UI element) is encapsulated as its own Angular component.
- Service-Oriented/Dependency Injection: Angular services handle business logic (mail service) and interact with DTOs.
- Environment-Based Configuration: Managed via /src/environments.
- Server-Side Role (if applicable): Representing SSR or a simple Node.js-based server (via server.ts/server.js).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Angular Client-Side Layer
    subgraph "Angular Client-Side Layer"
        subgraph "App Module"
            A1["App Config & Routing"]:::client
        end
        subgraph "Page Components"
            PCHome["HomeComponent"]:::client
            PCAbout["AboutComponent"]:::client
            PCContact["ContactComponent"]:::client
            PCPortfolio["PortfolioComponent"]:::client
            PCExperience["ExperienceComponent"]:::client
            PCStudies["StudiesComponent"]:::client
        end
        subgraph "Shared UI Elements"
            UIFooter["Footer"]:::ui
            UIMenu["Menu"]:::ui
            UIImgSlider["Image Slider"]:::ui
            UIScroll["Scroll-to-top"]:::ui
            UISeparator["Separator"]:::ui
        end
        subgraph "Service & Model Layer"
            SMail["MailService"]:::service
            MLanguage["Language DTO"]:::model
            MSendMail["Send Mail DTO"]:::model
        end
        subgraph "Assets & Themes"
            Assets["Assets"]:::client
            SCSS["Custom SCSS Theme"]:::client
        end
    end

    %% Server-Side Layer
    subgraph "Server-Side Layer"
        ServerScripts["Server Scripts"]:::server
        MainServer["Main Server Bootstrap"]:::server
        EnvConfig["Environment Configurations"]:::server
    end

    %% Deployment & Configurations
    subgraph "Deployment & Configurations"
        AngularConfig["Angular & Build Configs"]:::deployment
        Vercel["Vercel Deployment"]:::deployment
    end

    %% Relationships within Angular Client-Side Layer
    A1 -->|"routes-to"| PCHome
    A1 -->|"routes-to"| PCAbout
    A1 -->|"routes-to"| PCContact
    A1 -->|"routes-to"| PCPortfolio
    A1 -->|"routes-to"| PCExperience
    A1 -->|"routes-to"| PCStudies

    %% UI Elements used by Page Components
    PCHome --- UIFooter
    PCHome --- UIMenu
    PCHome --- UIImgSlider
    PCAbout --- UISeparator
    PCContact --- UIScroll

    %% Service and Model relationships
    PCContact -->|"sendsData"| SMail
    SMail -->|"uses"| MLanguage
    SMail -->|"uses"| MSendMail

    %% Assets & Themes integrated with App Module
    A1 -->|"uses"| Assets
    A1 -->|"uses"| SCSS

    %% Communication between Angular and Server Side
    SMail -->|"calls"| ServerScripts

    %% Relationships within Server Side
    ServerScripts --- MainServer
    MainServer --- EnvConfig

    %% Deployment & Configuration connections
    A1 -->|"builtBy"| AngularConfig
    ServerScripts -->|"configuredBy"| AngularConfig
    EnvConfig -->|"configuredBy"| AngularConfig
    AngularConfig --> Vercel

    %% Click Events
    click A1 "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/app.config.ts"
    click PCHome "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/components/home/home.component.ts"
    click PCAbout "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/components/about/about.component.ts"
    click PCContact "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/components/contact/contact.component.ts"
    click PCPortfolio "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/components/portfolio/portfolio.component.ts"
    click PCExperience "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/components/experience/experience.component.ts"
    click PCStudies "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/components/studies/studies.component.ts"
    click UIFooter "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/elements/footer/footer.component.ts"
    click UIMenu "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/elements/menu/menu.component.ts"
    click UIImgSlider "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/elements/image-slider/image-slider.component.ts"
    click UIScroll "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/elements/scroll-to-top/scroll-to-top.component.ts"
    click UISeparator "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/elements/separator/separator.component.ts"
    click SMail "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/services/mail.service.ts"
    click MLanguage "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/model/dto/language.ts"
    click MSendMail "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/app/model/dto/send-mail-dto.ts"
    click Assets "https://github.com/nailuj1992/nailuj-portfolio/tree/master/src/assets"
    click SCSS "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/custom-theme.scss"
    click ServerScripts "https://github.com/nailuj1992/nailuj-portfolio/blob/master/server.ts"
    click MainServer "https://github.com/nailuj1992/nailuj-portfolio/blob/master/src/main.server.ts"
    click EnvConfig "https://github.com/nailuj1992/nailuj-portfolio/tree/master/src/environments"
    click AngularConfig "https://github.com/nailuj1992/nailuj-portfolio/blob/master/angular.json"
    click Vercel "https://github.com/nailuj1992/nailuj-portfolio/blob/master/.vercel/project.json"

    %% Styles
    classDef client fill:#DCE775,stroke:#333,stroke-width:1px;
    classDef ui fill:#AED581,stroke:#333,stroke-width:1px;
    classDef service fill:#B39DDB,stroke:#333,stroke-width:1px;
    classDef model fill:#F48FB1,stroke:#333,stroke-width:1px;
    classDef server fill:#80DEEA,stroke:#333,stroke-width:1px;
    classDef deployment fill:#FFAB91,stroke:#333,stroke-width:1px;
```
