# amirka2/portfolio-page architecture

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

- Interactive diagram: https://gitdiagram.com/amirka2/portfolio-page
- Repository: https://github.com/amirka2/portfolio-page

## Overview

##### Project Type & Purpose
- The project is clearly a front-end web application written in TypeScript and React.
- It serves as a multi-page website (with pages such as Home, About, Contacts, Events, Jobs, Publications, etc.) and uses the feature-sliced-design methodology to separate concerns and scale features effectively.
- The README also lists technologies – React, webpack, i18next (for internationalization), axios, tanstackQuery (for data fetching & caching), and react-slick – which gives clues about external dependencies and dynamic UI behaviors.

##### Analyzing the File Structure
- At the top level, you have configuration files (webpack.config.ts, tsconfig.json, .env.example, etc.) along with package.json and README – indicating general project setup and build/deployment configurations.
- The src directory is organized according to the feature-sliced design:
- “app” contains the entry point, main application setup, router, and global styles.
- “entities” encapsulates core domain objects (e.g., Event, Jobs, MainSlider, PhotoWatch, Publication, Work, bio). Within each entity, further subdirectories exist to separate models, UI components, and libraries.
- “features” holds shared functionality that isn’t tied to a specific domain entity (e.g., LanguageSwitcher, navigation elements).
- “pages” organizes the actual routes of the application by page (e.g., Home, About, Contacts, various Job pages) and further divides them into API logic, library functions, and UI components.
- “shared” provides global constants, hooks, libraries, and generic UI components (e.g., Button, Layout, Loader) that can be reused across features and entities.
- “widgets” include major composite UI pieces that are likely used across multiple pages (e.g., Header, Footer, Gallery).
- “static” stores static assets, images, and locale files relevant for i18next.
- This clear separation is a hallmark of the feature-sliced design, aiming to separate concerns by layers (app, entities, features, pages, shared, widgets).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Application Layer"
        A["App/Router"]:::app
    end

    subgraph "Pages Layer"
        P["Pages (Route-Specific UIs)"]:::pages
    end

    subgraph "Entities Layer"
        E["Entities (Domain Logic & UI)"]:::entities
    end

    subgraph "Features Layer"
        F["Features (Cross-Cutting)"]:::features
    end

    subgraph "Widgets Layer"
        W["Widgets (Composite UI)"]:::widgets
    end

    subgraph "Shared Modules"
        S["Shared (Global Utilities)"]:::shared
    end

    subgraph "External Libraries"
        X["External: i18next, axios, tanstackQuery, react-slick, webpack"]:::external
    end

    A -->|"routes"| P
    P -->|"composes"| E
    P -->|"includes"| F
    P -->|"embeds"| W
    E -->|"uses"| S
    F -->|"uses"| S
    W -->|"uses"| S
    X -->|"configures"| A
    X -->|"supports"| E
    X -->|"supports"| F
    X -->|"supports"| P

    click A "https://github.com/amirka2/portfolio-page/tree/dev/src/app"
    click P "https://github.com/amirka2/portfolio-page/tree/dev/src/pages"
    click E "https://github.com/amirka2/portfolio-page/tree/dev/src/entities"
    click F "https://github.com/amirka2/portfolio-page/tree/dev/src/features"
    click S "https://github.com/amirka2/portfolio-page/tree/dev/src/shared"
    click W "https://github.com/amirka2/portfolio-page/tree/dev/src/widgets"

    classDef app fill:#ADD8E6,stroke:#00008B,stroke-width:2px;
    classDef pages fill:#90EE90,stroke:#008000,stroke-width:2px;
    classDef entities fill:#FFFFE0,stroke:#DAA520,stroke-width:2px;
    classDef features fill:#FFB6C1,stroke:#FF69B4,stroke-width:2px;
    classDef shared fill:#D3D3D3,stroke:#808080,stroke-width:2px;
    classDef widgets fill:#E0FFFF,stroke:#00CED1,stroke-width:2px;
    classDef external fill:#F08080,stroke:#FF0000,stroke-width:2px;
```
