# dilanbernal/my-porfolio architecture

> Architecture diagram of the GitHub repository dilanbernal/my-porfolio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dilanbernal/my-porfolio
- Repository: https://github.com/dilanbernal/my-porfolio

## Overview

##### Overall Project Type and Purpose
- This is a single-page application (SPA) built with Angular. The project is designed to deliver a portfolio experience to users through a well-structured user interface.
- The README indicates build, serve, testing, and scaffolding instructions that are standard for Angular projects.

##### File Structure
- Top-level Configuration/Build Files: Files like angular.json, package.json, tsconfig.json, and README.md indicate that Angular CLI is used for project scaffolding and building.
- Public Folder: Contains static resources such as i18n files and images. This is where localization data (en.json and es.json) and assets are stored.
- src Folder:
- Contains the main source of the application.
- The index.html and main.ts are the entry points that bootstrap the Angular app.
- The app/ directory under src contains the core module. Within it, there are:
- The base component (app.component.*) for setting up the shell.
- The app.config.ts and app.routes.ts files that likely define application configuration and routing rules.
- Features and Layout:
- The features folder (under src/app) appears to encapsulate different segments of the portfolio (like home, about, hero-section). This points to a modular design that groups related components.
- The layout directory contains shared UI components such as the header.
- Models:
- A dedicated folder for TypeScript models (e.g., skills.ts) supports clean separation of data structures.

a. Core Application Shell:
- Angular entry point (index.html and main.ts) that initializes the application.
- Root “AppComponent” that holds the general layout and navigation.

b. Feature Modules:

c. Layout Components:

d. Static Assets and Resources:
- Optionally, include a note that these are deployed as part of the production build generated by the Angular CLI.

e. Configuration and Build Tools:
- Configuration files (angular.json, package.json, tsconfig.*) and connect them with the build and development process.
- “Build Process” (ng build) and “Development Server” (ng serve) as separate entities that interact with the source code.

##### Architectural Patterns and Principles
- Module-Based Architecture: The separation into features (like home, about, hero-section) and layout components emphasizes modular and reusable design.
- Separation of Concerns: Distinct responsibilities are placed in separate folders (models, features, layout, public) to ensure maintainability.
- Declarative UI and Routing: Angular’s MVVM-like approach is evident in how components and routing are managed, reinforcing a clear separation between UI templates and business logic.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Core Application Shell
    subgraph "Core Application Shell"
        entry1["Index.html"]:::angular
        entry2["Main.ts"]:::angular
        appComp["AppComponent"]:::angular
        appConfig["App Config"]:::config
        appRoutes["App Routes"]:::config
    end

    %% Feature Modules - Home
    subgraph "Feature Modules - Home"
        homeComp["HomeComponent"]:::feature
        aboutComp["AboutComponent"]:::feature
        heroComp["HeroSectionComponent"]:::feature
        heroPhoto["HeroPhotoStyle"]:::feature
    end

    %% Layout Components
    headerComp["HeaderComponent"]:::layout

    %% Models
    skillsModel["Skills Model"]:::config

    %% Static Assets and Resources
    subgraph "Static Assets and Resources"
        i18n_en["i18n/en.json"]:::assets
        i18n_es["i18n/es.json"]:::assets
        images["Images"]:::assets
    end

    %% Configuration and Build Tools
    subgraph "Configuration and Build Tools"
        angJson["angular.json"]:::tools
        pkgJson["package.json"]:::tools
        tsconfig["tsconfig.json"]:::tools
        tsconfigApp["tsconfig.app.json"]:::tools
        tsconfigSpec["tsconfig.spec.json"]:::tools
        readme["README.md"]:::tools
        editorconfig[".editorconfig"]:::tools
        gitignore[".gitignore"]:::tools
        buildProc["ng build"]:::tools
        devServer["ng serve"]:::tools
    end

    %% Relationships
    entry1 --> entry2
    entry2 --> appComp
    appComp --> headerComp
    appComp --> appConfig
    appComp --> appRoutes
    appRoutes --> homeComp
    homeComp --> aboutComp
    homeComp --> heroComp
    heroComp --> heroPhoto
    appComp --> skillsModel
    appComp --> i18n_en
    appComp --> i18n_es
    appComp --> images
    buildProc --> appComp
    devServer --> appComp

    %% Styles
    classDef angular fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef config fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef feature fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef layout fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
    classDef assets fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef tools fill:#e2e3e5,stroke:#6c757d,stroke-width:2px;

    %% Click Events
    click entry1 "https://github.com/dilanbernal/my-porfolio/blob/master/src/index.html"
    click entry2 "https://github.com/dilanbernal/my-porfolio/blob/master/src/main.ts"
    click appComp "https://github.com/dilanbernal/my-porfolio/blob/master/src/app/app.component.ts"
    click appConfig "https://github.com/dilanbernal/my-porfolio/blob/master/src/app/app.config.ts"
    click appRoutes "https://github.com/dilanbernal/my-porfolio/blob/master/src/app/app.routes.ts"
    click homeComp "https://github.com/dilanbernal/my-porfolio/blob/master/src/app/features/home/home.component.ts"
    click aboutComp "https://github.com/dilanbernal/my-porfolio/blob/master/src/app/features/home/about/about.component.ts"
    click heroComp "https://github.com/dilanbernal/my-porfolio/blob/master/src/app/features/home/hero-section/hero-section.component.ts"
    click heroPhoto "https://github.com/dilanbernal/my-porfolio/blob/master/src/app/features/home/hero-section/hero-section-photo.component.scss"
    click headerComp "https://github.com/dilanbernal/my-porfolio/blob/master/src/app/layout/header/header.component.ts"
    click skillsModel "https://github.com/dilanbernal/my-porfolio/blob/master/src/app/models/skills.ts"
    click i18n_en "https://github.com/dilanbernal/my-porfolio/blob/master/public/i18n/en.json"
    click i18n_es "https://github.com/dilanbernal/my-porfolio/blob/master/public/i18n/es.json"
    click images "https://github.com/dilanbernal/my-porfolio/tree/master/public/images"
    click angJson "https://github.com/dilanbernal/my-porfolio/blob/master/angular.json"
    click pkgJson "https://github.com/dilanbernal/my-porfolio/blob/master/package.json"
    click tsconfig "https://github.com/dilanbernal/my-porfolio/blob/master/tsconfig.json"
    click tsconfigApp "https://github.com/dilanbernal/my-porfolio/blob/master/tsconfig.app.json"
    click tsconfigSpec "https://github.com/dilanbernal/my-porfolio/blob/master/tsconfig.spec.json"
    click readme "https://github.com/dilanbernal/my-porfolio/blob/master/README.md"
    click editorconfig "https://github.com/dilanbernal/my-porfolio/blob/master/.editorconfig"
    click gitignore "https://github.com/dilanbernal/my-porfolio/blob/master/.gitignore"
```
