# jhonatan0912/portfolio architecture

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

## Overview

##### Project Type and Purpose
- Project Type: A single-page, client-side portfolio web application.
- Purpose: To display personal projects, experiences, skills, and additional information (like a resume PDF) to potential employers or clients, using a dynamic Vue component structure.

##### File Structure
- The “src” directory is the core of the application and contains:
- Main entry point: index.html and src/main.ts that bootstraps the Vue application.
- Root component: App.vue, which ties together the overall layout.
- Components: A set of Vue components (e.g., Experience.vue, Projects.vue, Skills.vue, Info.vue) and specialized UI components under src/components/ui (e.g., Header.vue, LanguageToggle.vue, etc.).
- Constants and Interfaces: Located under src/constants and src/interfaces, defining languages, projects, skills, and social information. These are the data models feeding into your components.
- Helpers: Such as the i18n.ts file which handles internationalization.
- The assets folder (under src/assets) holds fonts and possibly other media files used by the components.

a. Main Components:
- Entry & Bootstrapping:
- index.html: The host HTML page that loads the application.
- src/main.ts: Sets up the Vue app.
- App.vue: Acts as the root component.
- UI Components:
- Primary sections: Experience, Projects, Skills, and Info components.
- Reusable UI components under src/components/ui (Header, LanguageToggle, ProjectCard, ResumeButton, SkillCard, SocialButton, ThemeButton, TitleSection).
- Special effects like CursorTrail.vue.
- Data & Configuration Layer:
- Constants: language, projects, skills, and social definitions.
- Interfaces: Type definitions used throughout the project.
- i18n helper: Facilitates internationalization.
- Static Assets:
- Configuration & Build Tools:
- Vite, Tailwind, PostCSS configuration files.
- TypeScript configuration files.

b. Relationships and Interactions:
- The browser loads index.html which links to main.ts.
- main.ts initializes the Vue instance, rendering App.vue.
- App.vue serves as a container that integrates the various sections (Experience, Projects, etc.) and its child UI components.
- Each component dynamically receives data (supplied from the constants and interfaces) and renders them visually.
- The i18n helper and language constants manage language toggles impacting how text content is presented.

c. Important Architectural Patterns and Design Principles:
- Component-based Architecture: The project splits the UI into self-contained, reusable Vue components.
- Separation of Concerns: Clear distinction between presentation (components), logic (helpers and constants), and static assets.
- Data-driven design: The use of constants and interfaces ensures the display of portfolio content is dynamic and maintainable.
- Use of modern tooling: Vite provides efficient build and hot module replacement; Tailwind CSS offers utility-first styling.

d. Relevant Technologies and Frameworks:
- Vue.js: For building reactive UI components.
- TypeScript: For type safety and well-defined data structures.
- Vite: A modern build tool optimizing development and production builds.
- Tailwind CSS and PostCSS: For styling.
- i18n: For multi-language support via a helper module and corresponding constants.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global Entities
    Browser("Browser")

    %% Entry & Bootstrapping Layer
    indexHtml["index.html"]:::infrastructure
    mainTs["Main Vue Initialization (main.ts)"]:::infrastructure
    appVue["Root Component (App.vue)"]:::infrastructure

    %% UI Components Layer
    experience["Experience Section"]:::ui
    projects["Projects Section"]:::ui
    skills["Skills Section"]:::ui
    info["Info Section"]:::ui
    cursorTrail["Cursor Effect (CursorTrail.vue)"]:::ui

    %% Reusable UI Subcomponents Subgraph
    subgraph "UI Subcomponents"
        header["Header"]:::ui
        langToggle["Language Toggle"]:::ui
        projectCard["Project Card"]:::ui
        resumeButton["Resume Button"]:::ui
        skillCard["Skill Card"]:::ui
        socialButton["Social Button"]:::ui
        themeButton["Theme Button"]:::ui
        titleSection["Title Section"]:::ui
    end

    %% Data & Configuration Layer
    subgraph "Data & Configuration"
        languages["Languages Constant"]:::data
        projectsConst["Projects Constant"]:::data
        skillsConst["Skills Constant"]:::data
        socialsConst["Socials Constant"]:::data
        interfaces["Interfaces"]:::data
        i18n["Internationalization Helper"]:::data
    end

    %% Static Assets Layer
    subgraph "Static Assets"
        resumePdf["Resume PDF"]:::static
        icons["Icons"]:::static
        projectImages["Project Images"]:::static
    end

    %% Build Tools & Configuration Layer
    subgraph "Build & Config Tools"
        viteConfig["Vite Configuration"]:::config
        tailwindConfig["Tailwind CSS Configuration"]:::config
        postcssConfig["PostCSS Configuration"]:::config
        tsconfig["TypeScript Configurations (tsconfig.json)"]:::config
        tsconfigApp["TypeScript Config (tsconfig.app.json)"]:::config
        tsconfigNode["TypeScript Config (tsconfig.node.json)"]:::config
    end

    %% Connections for Entry & Bootstrapping
    Browser -->|"loads"| indexHtml
    indexHtml -->|"loads"| mainTs
    mainTs -->|"initializes"| appVue

    %% Connections from App.vue to UI Components
    appVue -->|"composes"| experience
    appVue -->|"composes"| projects
    appVue -->|"composes"| skills
    appVue -->|"composes"| info
    appVue -->|"composes"| cursorTrail

    %% Connections between App.vue and Reusable UI Subcomponents
    appVue ---|"includes"| header
    appVue ---|"includes"| langToggle
    appVue ---|"includes"| projectCard
    appVue ---|"includes"| resumeButton
    appVue ---|"includes"| skillCard
    appVue ---|"includes"| socialButton
    appVue ---|"includes"| themeButton
    appVue ---|"includes"| titleSection

    %% Data and Internationalization Flow
    languages -->|"providesData"| experience
    languages -->|"providesData"| projects
    languages -->|"providesData"| skills
    languages -->|"providesData"| info
    projectsConst -->|"providesData"| projects
    skillsConst -->|"providesData"| skills
    socialsConst -->|"providesData"| info
    i18n -->|"managesLang"| appVue

    %% Static Assets Usage
    resumeButton -->|"downloads"| resumePdf
    projects -->|"shows"| projectImages
    info -->|"displays"| icons

    %% Build Tools Relationships
    viteConfig -->|"builds"| mainTs
    tsconfig -->|"enablesTS"| mainTs
    tsconfigApp -->|"appliesToApp"| mainTs
    tsconfigNode -->|"appliesToNode"| mainTs

    %% Styles
    classDef infrastructure fill:#f3c623,stroke:#333,stroke-width:2px;
    classDef ui fill:#8ecae6,stroke:#333,stroke-width:2px;
    classDef data fill:#a0c4ff,stroke:#333,stroke-width:2px;
    classDef config fill:#ffb703,stroke:#333,stroke-width:2px;
    classDef static fill:#bde0fe,stroke:#333,stroke-width:2px;

    %% Click Events
    click indexHtml "https://github.com/jhonatan0912/portfolio/blob/main/index.html"
    click mainTs "https://github.com/jhonatan0912/portfolio/blob/main/src/main.ts"
    click appVue "https://github.com/jhonatan0912/portfolio/blob/main/src/App.vue"
    click experience "https://github.com/jhonatan0912/portfolio/blob/main/src/components/Experience.vue"
    click projects "https://github.com/jhonatan0912/portfolio/blob/main/src/components/Projects.vue"
    click skills "https://github.com/jhonatan0912/portfolio/blob/main/src/components/Skills.vue"
    click info "https://github.com/jhonatan0912/portfolio/blob/main/src/components/Info.vue"
    click cursorTrail "https://github.com/jhonatan0912/portfolio/blob/main/src/components/CursorTrail.vue"
    click header "https://github.com/jhonatan0912/portfolio/blob/main/src/components/ui/Header.vue"
    click langToggle "https://github.com/jhonatan0912/portfolio/blob/main/src/components/ui/LanguageToggle.vue"
    click projectCard "https://github.com/jhonatan0912/portfolio/blob/main/src/components/ui/ProjectCard.vue"
    click resumeButton "https://github.com/jhonatan0912/portfolio/blob/main/src/components/ui/ResumeButton.vue"
    click skillCard "https://github.com/jhonatan0912/portfolio/blob/main/src/components/ui/SkillCard.vue"
    click socialButton "https://github.com/jhonatan0912/portfolio/blob/main/src/components/ui/SocialButton.vue"
    click themeButton "https://github.com/jhonatan0912/portfolio/blob/main/src/components/ui/ThemeButton.vue"
    click titleSection "https://github.com/jhonatan0912/portfolio/blob/main/src/components/ui/TitleSection.vue"
    click languages "https://github.com/jhonatan0912/portfolio/blob/main/src/constants/languages.ts"
    click projectsConst "https://github.com/jhonatan0912/portfolio/blob/main/src/constants/projects.ts"
    click skillsConst "https://github.com/jhonatan0912/portfolio/blob/main/src/constants/skills.ts"
    click socialsConst "https://github.com/jhonatan0912/portfolio/blob/main/src/constants/socials.ts"
    click interfaces "https://github.com/jhonatan0912/portfolio/tree/main/src/interfaces"
    click i18n "https://github.com/jhonatan0912/portfolio/blob/main/src/helpers/i18n.ts"
    click resumePdf "https://github.com/jhonatan0912/portfolio/blob/main/public/Jhonatan-Yaranga.pdf"
    click icons "https://github.com/jhonatan0912/portfolio/tree/main/public/icons"
    click projectImages "https://github.com/jhonatan0912/portfolio/tree/main/public/projects"
    click viteConfig "https://github.com/jhonatan0912/portfolio/blob/main/vite.config.ts"
    click tailwindConfig "https://github.com/jhonatan0912/portfolio/blob/main/tailwind.config.js"
    click postcssConfig "https://github.com/jhonatan0912/portfolio/blob/main/postcss.config.js"
    click tsconfig "https://github.com/jhonatan0912/portfolio/blob/main/tsconfig.json"
    click tsconfigApp "https://github.com/jhonatan0912/portfolio/blob/main/tsconfig.app.json"
    click tsconfigNode "https://github.com/jhonatan0912/portfolio/blob/main/tsconfig.node.json"
```
