# aemre23/portfolio-website architecture

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

## Overview

##### Main Components
- Frontend Application: Since the project is a single-page application (SPA) built with React, the entire user-facing interface is managed in the src folder.
- Pages and Views: Under the src/pages directory, there are several key pages such as Home (Welcome.jsx), Hero, About, Contact, and Projects. Each of these pages represents a distinct section of the portfolio.
- Components: The src/components directory and nested components (e.g., AboutSkills.jsx, goTop.jsx) contain reusable UI components shared across pages.
- Data and Functions: The src/data and src/functions directories hold business logic, utility functions (e.g., calculateRelativeDate.js, mobileChecker.js), and configuration or structured data (e.g., contactObject.jsx, skillsObject.jsx).
- Localization: The presence of public/locales with language-specific JSON files (e.g., en/translation.json, tr/translation.json) indicates support for internationalization.
- Assets, Utilities, and Styling: The src/assets folder includes media or other resources, and styling/integration is managed via TailwindCSS configuration files (tailwind.config.cjs) and a main CSS file (src/input.css).

##### Out Relationships and Interactions
- Data Flow: Show how data is imported from files under src/data and transformed or rendered within components. Utility functions such as those in src/functions (e.g., getProjectInfos.jsx) might be illustrated as supporting logic that feeds data into components.
- Localization: Include a distinct component block for the i18n initialization (src/i18n.js) that feeds language translations from public/locales into the React components at runtime.
- Build/Deployment: Include external tools such as Vite (configured in vite.config.js) that are responsible for bundling the React application and post-processing assets (as indicated by the postcss.config.cjs file).

##### Architectural Patterns and Technologies
- Single-Page Application (SPA): The overall structure of routing between major views (Welcome, Hero, About, Contact, Projects) demonstrates an SPA characteristic.
- Internationalization (i18n): Highlight the integration with react-i18next, shown both in the public/locales directory and configuration in src/i18n.js.
- Animation Integration: Mention that Framer Motion is used to enhance UI animations, which may be directly integrated within React components (although no specific file names show this, it is a key part of the tech stack).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    Browser("Browser/Client"):::client

    %% Entry Point Layer
    index("index.html"):::entry
    main("src/main.jsx"):::entry

    %% React Application Layer
    subgraph "React Application"
        %% Pages Subgraph
        subgraph "Pages"
            welcome("src/pages/Welcome.jsx"):::react
            hero("src/pages/Hero.jsx"):::react
            about("src/pages/About/About.jsx"):::react
            contact("src/pages/Contact.jsx"):::react
            projects("src/pages/Projects/Projects.jsx"):::react
        end

        %% Reusable Components Subgraph
        subgraph "Reusable Components"
            comp1("src/components/AboutSkills.jsx"):::react
            comp2("src/components/goTop.jsx"):::react
            subgraph "About Page Components"
                abilities("src/pages/About/components/Abilities.jsx"):::react
                education("src/pages/About/components/Education.jsx"):::react
                experiences("src/pages/About/components/Experiences.jsx"):::react
                introduction("src/pages/About/components/Introduction.jsx"):::react
            end
            subgraph "Projects Components"
                eachProject("src/pages/Projects/components/EachProject.jsx"):::react
                footer("src/pages/Projects/components/Footer.jsx"):::react
            end
        end

        %% Data and Functions Subgraph
        subgraph "Data & Functions"
            data1("src/data/contactObject.jsx"):::config
            data2("src/data/skillsObject.jsx"):::config
            func1("src/functions/calculateRelativeDate.js"):::util
            func2("src/functions/getProjectInfos.jsx"):::util
            func3("src/functions/mobileChecker.js"):::util
        end

        %% Localization Subgraph
        subgraph "Localization"
            i18n("src/i18n.js"):::config
            transEN("public/locales/en/translation.json"):::config
            transTR("public/locales/tr/translation.json"):::config
        end
    end

    %% Tooling & Build Layer
    subgraph "Tooling & Build"
        vite("vite.config.js"):::build
        tailwind("tailwind.config.cjs"):::build
        inputcss("src/input.css"):::build
        postcss("postcss.config.cjs"):::build
        assets("src/assets"):::config
        libraries("Libraries:React,FramerMotion,TailwindCSS,react-i18next"):::build
    end

    %% Connections between Layers
    Browser -->|"Loads"| index
    index -->|"Bootstraps"| main
    main -->|"Renders"| welcome
    main -->|"Renders"| hero
    main -->|"Renders"| about
    main -->|"Renders"| contact
    main -->|"Renders"| projects

    %% Component Composition
    about -->|"Uses"| abilities
    about -->|"Uses"| education
    about -->|"Uses"| experiences
    about -->|"Uses"| introduction
    projects -->|"Uses"| eachProject
    projects -->|"Uses"| footer
    welcome -->|"Includes"| comp1
    welcome -->|"Includes"| comp2

    %% Data Flow Connections
    data1 -->|"FeedsData"| contact
    data2 -->|"FeedsData"| about
    func1 -->|"ProvidesLogic"| projects
    func2 -->|"ProvidesData"| projects
    func3 -->|"ChecksDevice"| welcome

    %% Localization Dependency
    i18n -->|"Initializes"| welcome
    i18n -->|"Initializes"| hero
    i18n -->|"Initializes"| about
    i18n -->|"Initializes"| contact
    i18n -->|"Initializes"| projects
    transEN --- i18n
    transTR --- i18n

    %% Tooling and Build Flow
    vite -->|"Bundles"| main
    tailwind -->|"Configures"| inputcss
    postcss -->|"Processes"| inputcss
    libraries -->|"EnhancesUI"| main
    vite -->|"BuildsSPA"| main
    tailwind -->|"Styles"| about
    tailwind -->|"Styles"| welcome
    inputcss -->|"AppliesStyles"| comp1
    inputcss -->|"AppliesStyles"| comp2

    %% Click Events
    click index "https://github.com/aemre23/portfolio-website/blob/main/index.html"
    click main "https://github.com/aemre23/portfolio-website/blob/main/src/main.jsx"
    click welcome "https://github.com/aemre23/portfolio-website/blob/main/src/pages/Welcome.jsx"
    click hero "https://github.com/aemre23/portfolio-website/blob/main/src/pages/Hero.jsx"
    click about "https://github.com/aemre23/portfolio-website/blob/main/src/pages/About/About.jsx"
    click contact "https://github.com/aemre23/portfolio-website/blob/main/src/pages/Contact.jsx"
    click projects "https://github.com/aemre23/portfolio-website/blob/main/src/pages/Projects/Projects.jsx"
    click comp1 "https://github.com/aemre23/portfolio-website/blob/main/src/components/AboutSkills.jsx"
    click comp2 "https://github.com/aemre23/portfolio-website/blob/main/src/components/goTop.jsx"
    click abilities "https://github.com/aemre23/portfolio-website/blob/main/src/pages/About/components/Abilities.jsx"
    click education "https://github.com/aemre23/portfolio-website/blob/main/src/pages/About/components/Education.jsx"
    click experiences "https://github.com/aemre23/portfolio-website/blob/main/src/pages/About/components/Experiences.jsx"
    click introduction "https://github.com/aemre23/portfolio-website/blob/main/src/pages/About/components/Introduction.jsx"
    click eachProject "https://github.com/aemre23/portfolio-website/blob/main/src/pages/Projects/components/EachProject.jsx"
    click footer "https://github.com/aemre23/portfolio-website/blob/main/src/pages/Projects/components/Footer.jsx"
    click data1 "https://github.com/aemre23/portfolio-website/blob/main/src/data/contactObject.jsx"
    click data2 "https://github.com/aemre23/portfolio-website/blob/main/src/data/skillsObject.jsx"
    click func1 "https://github.com/aemre23/portfolio-website/blob/main/src/functions/calculateRelativeDate.js"
    click func2 "https://github.com/aemre23/portfolio-website/blob/main/src/functions/getProjectInfos.jsx"
    click func3 "https://github.com/aemre23/portfolio-website/blob/main/src/functions/mobileChecker.js"
    click i18n "https://github.com/aemre23/portfolio-website/blob/main/src/i18n.js"
    click transEN "https://github.com/aemre23/portfolio-website/blob/main/public/locales/en/translation.json"
    click transTR "https://github.com/aemre23/portfolio-website/blob/main/public/locales/tr/translation.json"
    click tailwind "https://github.com/aemre23/portfolio-website/blob/main/tailwind.config.cjs"
    click inputcss "https://github.com/aemre23/portfolio-website/blob/main/src/input.css"
    click postcss "https://github.com/aemre23/portfolio-website/blob/main/postcss.config.cjs"
    click vite "https://github.com/aemre23/portfolio-website/blob/main/vite.config.js"
    click assets "https://github.com/aemre23/portfolio-website/tree/main/src/assets"

    %% Styles
    classDef client fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef entry fill:#F9E79F,stroke:#B9770E,stroke-width:2px;
    classDef react fill:#A9DFBF,stroke:#145A32,stroke-width:2px;
    classDef util fill:#F5B7B1,stroke:#922B21,stroke-width:2px;
    classDef config fill:#D2B4DE,stroke:#6C3483,stroke-width:2px;
    classDef build fill:#FAD7A0,stroke:#E67E22,stroke-width:2px;
```
